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..b7c16a6b6bb6 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; } @@ -349,10 +353,10 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Pageable GetPools(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPoolsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } public virtual Azure.AsyncPageable GetPoolsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? starttime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? starttime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? starttime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? starttime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? startTime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? startTime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } public virtual Azure.Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSubTasksAsync(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { 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..b7c16a6b6bb6 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; } @@ -349,10 +353,10 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Pageable GetPools(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPoolsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } public virtual Azure.AsyncPageable GetPoolsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? starttime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? starttime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? starttime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? starttime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? startTime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? startTime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } public virtual Azure.Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSubTasksAsync(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { 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..b636a4de9707 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) @@ -7024,7 +7428,7 @@ public virtual Pageable GetApplications(int? timeOutInSeconds, DateT /// The maximum number of items to return in the response. A maximum of 1000 /// applications can be returned. /// - /// + /// /// The earliest time from which to include metrics. This must be at least two and /// a half hours before the current time. If not specified this defaults to the /// start time of the last aggregation interval currently available. @@ -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. /// @@ -7048,11 +7452,11 @@ public virtual Pageable GetApplications(int? timeOutInSeconds, DateT /// last aggregation interval is returned. /// /// - public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, DateTimeOffset? starttime = null, DateTimeOffset? endtime = null, string filter = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, DateTimeOffset? startTime = null, DateTimeOffset? endtime = null, string filter = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchPoolUsageMetrics.DeserializeBatchPoolUsageMetrics(e), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); } @@ -7070,7 +7474,7 @@ public virtual AsyncPageable GetPoolUsageMetricsAsync(int /// The maximum number of items to return in the response. A maximum of 1000 /// applications can be returned. /// - /// + /// /// The earliest time from which to include metrics. This must be at least two and /// a half hours before the current time. If not specified this defaults to the /// start time of the last aggregation interval currently available. @@ -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. /// @@ -7094,11 +7498,11 @@ public virtual AsyncPageable GetPoolUsageMetricsAsync(int /// last aggregation interval is returned. /// /// - public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, DateTimeOffset? starttime = null, DateTimeOffset? endtime = null, string filter = null, CancellationToken cancellationToken = default) + public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, DateTimeOffset? startTime = null, DateTimeOffset? endtime = null, string filter = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchPoolUsageMetrics.DeserializeBatchPoolUsageMetrics(e), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); } @@ -7128,7 +7532,7 @@ public virtual Pageable GetPoolUsageMetrics(int? timeOutI /// The maximum number of items to return in the response. A maximum of 1000 /// applications can be returned. /// - /// + /// /// The earliest time from which to include metrics. This must be at least two and /// a half hours before the current time. If not specified this defaults to the /// start time of the last aggregation interval currently available. @@ -7140,16 +7544,16 @@ 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. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. /// - public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? startTime, DateTimeOffset? endtime, string filter, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); } @@ -7179,7 +7583,7 @@ public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutIn /// The maximum number of items to return in the response. A maximum of 1000 /// applications can be returned. /// - /// + /// /// The earliest time from which to include metrics. This must be at least two and /// a half hours before the current time. If not specified this defaults to the /// start time of the last aggregation interval currently available. @@ -7191,20 +7595,20 @@ 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. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. /// - public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? startTime, DateTimeOffset? endtime, string filter, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, startTime, endtime, filter, context); 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. @@ -9223,7 +9627,7 @@ internal HttpMessage CreateGetApplicationRequest(string applicationId, int? time return message; } - internal HttpMessage CreateGetPoolUsageMetricsRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + internal HttpMessage CreateGetPoolUsageMetricsRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? startTime, DateTimeOffset? endtime, string filter, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -9240,9 +9644,9 @@ internal HttpMessage CreateGetPoolUsageMetricsRequest(int? timeOutInSeconds, Dat { uri.AppendQuery("maxresults", maxresults.Value, true); } - if (starttime != null) + if (startTime != null) { - uri.AppendQuery("startTime", starttime.Value, "O", true); + uri.AppendQuery("startTime", startTime.Value, "O", true); } if (endtime != null) { @@ -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); @@ -11410,7 +11918,7 @@ internal HttpMessage CreateGetApplicationsNextPageRequest(string nextLink, int? return message; } - internal HttpMessage CreateGetPoolUsageMetricsNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + internal HttpMessage CreateGetPoolUsageMetricsNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? startTime, DateTimeOffset? endtime, string filter, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; 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/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.Serialization.cs new file mode 100644 index 000000000000..aedc552556b7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.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 BatchNodeDeallocateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NodeDeallocateOption)) + { + writer.WritePropertyName("nodeDeallocateOption"u8); + writer.WriteStringValue(NodeDeallocateOption.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 + } + } + } + + BatchNodeDeallocateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeDeallocateContent(document.RootElement, options); + } + + internal static BatchNodeDeallocateContent DeserializeBatchNodeDeallocateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchNodeDeallocateOption? nodeDeallocateOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeDeallocateOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeDeallocateOption = new BatchNodeDeallocateOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeDeallocateContent(nodeDeallocateOption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeDeallocateContent IPersistableModel.Create(BinaryData 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 DeserializeBatchNodeDeallocateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} 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 BatchNodeDeallocateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeDeallocateContent(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/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 2ee0a19d69f9..0d049eba26c8 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: 54ba891230da9c06f73b697a2192a1937575dfef +commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c 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/Azure.AI.Language.Conversations.Authoring.sln b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Azure.AI.Language.Conversations.Authoring.sln new file mode 100644 index 000000000000..0b78b10ce73c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Azure.AI.Language.Conversations.Authoring.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.Conversations.Authoring", "src\Azure.AI.Language.Conversations.Authoring.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Conversations.Authoring.Tests", "tests\Azure.AI.Language.Conversations.Authoring.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.Conversations.Authoring/CHANGELOG.md b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring/Directory.Build.props b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/README.md b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/README.md new file mode 100644 index 000000000000..3dbd80f7e359 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/README.md @@ -0,0 +1,107 @@ +# Azure.AI.Language.Conversations.Authoring client library for .NET + +Azure.AI.Language.Conversations.Authoring 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.Conversations.Authoring/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.Conversations.Authoring --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.Conversations.Authoring/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.Conversations.Authoring/README.png) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.net8.0.cs new file mode 100644 index 000000000000..7c36879a4169 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.net8.0.cs @@ -0,0 +1,1574 @@ +namespace Azure.AI.Language.Conversations.Authoring +{ + public partial class AnalyzeConversationAuthoring + { + protected AnalyzeConversationAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignedResourceDeploymentsAsync(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignedResourceDeploymentsAsync(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedLanguagesAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedLanguagesAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedPrebuiltEntitiesAsync(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedPrebuiltEntitiesAsync(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingConfigVersionsAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingConfigVersionsAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Conversations.Authoring.AnalyzeConversationAuthoring GetAnalyzeConversationAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } +} +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public static partial class AILanguageConversationsAuthoringModelFactory + { + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata AssignedResourceDeploymentsMetadata(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError AuthoringConversationsError(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning AuthoringConversationsWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity ConversationExportedEntity(string category = null, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? compositionSetting = default(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting?), Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList list = null, System.Collections.Generic.IEnumerable prebuilts = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex regex = null, System.Collections.Generic.IEnumerable requiredComponents = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance ConversationExportedUtterance(System.Collections.Generic.IEnumerable entities = null, string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState DeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary EvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary entitiesEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary intentsEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration ExportedLuisOrchestration(System.Guid appId = default(System.Guid), string appVersion = null, string slotName = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType), Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary IntentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary intents = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent OrchestrationExportedIntent(Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails orchestration = null, string category = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance OrchestrationExportedUtterance(string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities PrebuiltEntities(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages SupportedLanguages(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions TrainingConfigVersions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode), Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode?), Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult UtteranceEntitiesEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult UtteranceEntityEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult UtteranceEvaluationResult(string text = null, string language = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult entitiesResult = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult intentsResult = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult UtteranceIntentsEvaluationResult(string expectedIntent = null, string predictedIntent = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedResourceDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedResourceDeploymentsMetadata() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsError() { } + public Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting RequireExactOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting ReturnLongestOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting 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.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedEntity(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex Regex { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredComponents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedIntent(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedProjectAssets() { } + public System.Collections.Generic.IList Entities { get { throw null; } } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntitiesEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode 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.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind 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.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluation { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestration(string projectName, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration ConversationOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegex() { } + public System.Collections.Generic.IList Expressions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegexExpression : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegexExpression() { } + public string Language { get { throw null; } set { } } + public string RegexKey { get { throw null; } set { } } + public string RegexPattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestration(System.Guid appId) { } + public System.Guid AppId { get { throw null; } } + public string AppVersion { get { throw null; } set { } } + public string SlotName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration LuisOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExportedOrchestrationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedOrchestrationDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ExportedProjectFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExportedProjectFormat(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Luis { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat 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.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestration(string projectName) { } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration QuestionAnsweringOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedUtteranceEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedUtteranceEntityLabel(string category, int offset, int length) { } + public string Category { get { throw null; } } + 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.Conversations.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.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.Conversations.Authoring.Models.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 IntentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IntentsEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentsEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Intents { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.JobStatus 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.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedIntent(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails Orchestration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedProjectAssets() { } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntities() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind CustomConversationSummarization { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Orchestration { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind 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.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings(float confidenceThreshold) { } + public float ConfidenceThreshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 StringIndexType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StringIndexType(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguages : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguages() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersions() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode) { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode TrainingMode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? TrainingMode { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 TrainingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TrainingMode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Advanced { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Standard { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode 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.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.TrainingMode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntitiesEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntitiesEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntityEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntityEvaluationResult() { } + public string Category { get { throw null; } } + 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.Conversations.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEvaluationResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult EntitiesResult { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult IntentsResult { get { throw null; } } + public string Language { 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.Conversations.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceIntentsEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceIntentsEvaluationResult() { } + public string ExpectedIntent { get { throw null; } } + public string PredictedIntent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageConversationsAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.netstandard2.0.cs new file mode 100644 index 000000000000..7c36879a4169 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.netstandard2.0.cs @@ -0,0 +1,1574 @@ +namespace Azure.AI.Language.Conversations.Authoring +{ + public partial class AnalyzeConversationAuthoring + { + protected AnalyzeConversationAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignedResourceDeploymentsAsync(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignedResourceDeploymentsAsync(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedLanguagesAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedLanguagesAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedPrebuiltEntitiesAsync(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedPrebuiltEntitiesAsync(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingConfigVersionsAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingConfigVersionsAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Conversations.Authoring.AnalyzeConversationAuthoring GetAnalyzeConversationAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } +} +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public static partial class AILanguageConversationsAuthoringModelFactory + { + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata AssignedResourceDeploymentsMetadata(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError AuthoringConversationsError(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning AuthoringConversationsWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity ConversationExportedEntity(string category = null, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? compositionSetting = default(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting?), Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList list = null, System.Collections.Generic.IEnumerable prebuilts = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex regex = null, System.Collections.Generic.IEnumerable requiredComponents = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance ConversationExportedUtterance(System.Collections.Generic.IEnumerable entities = null, string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState DeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary EvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary entitiesEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary intentsEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration ExportedLuisOrchestration(System.Guid appId = default(System.Guid), string appVersion = null, string slotName = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType), Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary IntentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary intents = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent OrchestrationExportedIntent(Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails orchestration = null, string category = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance OrchestrationExportedUtterance(string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities PrebuiltEntities(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages SupportedLanguages(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions TrainingConfigVersions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode), Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode?), Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult UtteranceEntitiesEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult UtteranceEntityEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult UtteranceEvaluationResult(string text = null, string language = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult entitiesResult = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult intentsResult = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult UtteranceIntentsEvaluationResult(string expectedIntent = null, string predictedIntent = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedResourceDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedResourceDeploymentsMetadata() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsError() { } + public Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting RequireExactOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting ReturnLongestOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting 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.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedEntity(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex Regex { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredComponents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedIntent(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedProjectAssets() { } + public System.Collections.Generic.IList Entities { get { throw null; } } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntitiesEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode 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.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind 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.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluation { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestration(string projectName, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration ConversationOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegex() { } + public System.Collections.Generic.IList Expressions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegexExpression : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegexExpression() { } + public string Language { get { throw null; } set { } } + public string RegexKey { get { throw null; } set { } } + public string RegexPattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestration(System.Guid appId) { } + public System.Guid AppId { get { throw null; } } + public string AppVersion { get { throw null; } set { } } + public string SlotName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration LuisOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExportedOrchestrationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedOrchestrationDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ExportedProjectFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExportedProjectFormat(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Luis { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat 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.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestration(string projectName) { } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration QuestionAnsweringOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedUtteranceEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedUtteranceEntityLabel(string category, int offset, int length) { } + public string Category { get { throw null; } } + 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.Conversations.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.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.Conversations.Authoring.Models.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 IntentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IntentsEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentsEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Intents { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.JobStatus 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.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedIntent(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails Orchestration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedProjectAssets() { } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntities() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind CustomConversationSummarization { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Orchestration { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind 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.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings(float confidenceThreshold) { } + public float ConfidenceThreshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 StringIndexType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StringIndexType(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.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.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguages : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguages() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersions() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode) { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode TrainingMode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? TrainingMode { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { 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.Conversations.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 TrainingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TrainingMode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Advanced { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Standard { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode 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.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.TrainingMode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntitiesEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntitiesEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntityEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntityEvaluationResult() { } + public string Category { get { throw null; } } + 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.Conversations.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEvaluationResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult EntitiesResult { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult IntentsResult { get { throw null; } } + public string Language { 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.Conversations.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceIntentsEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceIntentsEvaluationResult() { } + public string ExpectedIntent { get { throw null; } } + public string PredictedIntent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageConversationsAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Azure.AI.Language.Conversations.Authoring.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Azure.AI.Language.Conversations.Authoring.csproj new file mode 100644 index 000000000000..56bcc140bc62 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Azure.AI.Language.Conversations.Authoring.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.AI.Language.Conversations.Authoring client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.AI.Language.Conversations.Authoring for Azure Data Plane + 1.0.0-beta.1 + Azure.AI.Language.Conversations.Authoring + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringClientBuilderExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringClientBuilderExtensions.cs new file mode 100644 index 000000000000..88f288af003c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringClientBuilderExtensions.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.AI.Language.Conversations.Authoring; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AILanguageConversationsAuthoringClientBuilderExtensions + { + /// 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 AddAuthoringClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new AuthoringClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new AuthoringClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringModelFactory.cs new file mode 100644 index 000000000000..3c4370eb609e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringModelFactory.cs @@ -0,0 +1,961 @@ +// 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.Conversations.Authoring.Models +{ + /// Model factory for models. + public static partial class AILanguageConversationsAuthoringModelFactory + { + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project creation datetime. + /// Represents the project last trained datetime. + /// Represents the project last deployed datetime. + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static ProjectMetadata ProjectMetadata(DateTimeOffset createdDateTime = default, DateTimeOffset lastModifiedDateTime = default, DateTimeOffset? lastTrainedDateTime = null, DateTimeOffset? lastDeployedDateTime = null, ProjectKind projectKind = default, ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + language, + 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 AuthoringConversationsError AuthoringConversationsError(ErrorCode code = default, string message = null, string target = null, IEnumerable details = null, InnerErrorModel innererror = null) + { + details ??= new List(); + + return new AuthoringConversationsError( + 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 . + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static CreateProjectDetails CreateProjectDetails(ProjectKind projectKind = default, ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new CreateProjectDetails( + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 ExportedProject ExportedProject(string projectFileVersion = null, StringIndexType stringIndexType = default, CreateProjectDetails metadata = null, ExportedProjectAssets assets = null) + { + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The category of the entity. + /// The behavior to follow when the entity's components overlap with each other. + /// The list component of the entity. + /// The prebuilt entities components. + /// The regex component of the entity. + /// The required components. Allowed values are 'learned', 'list', 'prebuilts' and 'regex'. + /// A new instance for mocking. + public static ConversationExportedEntity ConversationExportedEntity(string category = null, CompositionSetting? compositionSetting = null, ExportedEntityList list = null, IEnumerable prebuilts = null, ExportedEntityRegex regex = null, IEnumerable requiredComponents = null) + { + prebuilts ??= new List(); + requiredComponents ??= new List(); + + return new ConversationExportedEntity( + category, + compositionSetting, + list, + prebuilts?.ToList(), + regex, + requiredComponents?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the entity labels of the utterance. + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// A new instance for mocking. + public static ConversationExportedUtterance ConversationExportedUtterance(IEnumerable entities = null, string text = null, string language = null, string intent = null, string dataset = null) + { + entities ??= new List(); + + return new ConversationExportedUtterance( + entities?.ToList(), + text, + language, + intent, + dataset, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// Specifies the behavior of this intent in the orchestration flow. + /// 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 intent category. + /// A new instance for mocking. + public static OrchestrationExportedIntent OrchestrationExportedIntent(ExportedOrchestrationDetails orchestration = null, string category = null) + { + return new OrchestrationExportedIntent(orchestration, category, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Conversational project target details. + /// A new instance for mocking. + public static ExportedConversationOrchestrationDetails ExportedConversationOrchestrationDetails(ExportedConversationOrchestration conversationOrchestration = null) + { + return new ExportedConversationOrchestrationDetails(OrchestrationTargetProjectKind.Conversation, serializedAdditionalRawData: null, conversationOrchestration); + } + + /// Initializes a new instance of . + /// The LUIS application target details. + /// A new instance for mocking. + public static ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(ExportedLuisOrchestration luisOrchestration = null) + { + return new ExportedLuisOrchestrationDetails(OrchestrationTargetProjectKind.Luis, serializedAdditionalRawData: null, luisOrchestration); + } + + /// Initializes a new instance of . + /// The LUIS application ID. + /// The targeted version Id. + /// The targeted slot name. + /// A new instance for mocking. + public static ExportedLuisOrchestration ExportedLuisOrchestration(Guid appId = default, string appVersion = null, string slotName = null) + { + return new ExportedLuisOrchestration(appId, appVersion, slotName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Question Answering project details. + /// A new instance for mocking. + public static ExportedQuestionAnsweringOrchestrationDetails ExportedQuestionAnsweringOrchestrationDetails(ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = null) + { + return new ExportedQuestionAnsweringOrchestrationDetails(OrchestrationTargetProjectKind.QuestionAnswering, serializedAdditionalRawData: null, questionAnsweringOrchestration); + } + + /// Initializes a new instance of . + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// A new instance for mocking. + public static OrchestrationExportedUtterance OrchestrationExportedUtterance(string text = null, string language = null, string intent = null, string dataset = null) + { + return new OrchestrationExportedUtterance(text, language, intent, dataset, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. By default, "latest" value is used which uses the latest released training config version. + /// Represents the mode of the training operation. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// A new instance for mocking. + public static TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, TrainingMode trainingMode = default, EvaluationDetails evaluationOptions = null) + { + return new TrainingJobDetails(modelLabel, trainingConfigVersion, trainingMode, evaluationOptions, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents the mode of the training operation. + /// Represents the model training status. + /// Represents model evaluation status. + /// Represents the estimated end date time for training and evaluation. + /// A new instance for mocking. + public static TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, TrainingMode? trainingMode = null, SubTrainingJobState trainingStatus = null, SubTrainingJobState evaluationStatus = null, DateTimeOffset? estimatedEndDateTime = null) + { + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingMode, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// A new instance for mocking. + public static SubTrainingJobState SubTrainingJobState(int percentComplete = default, DateTimeOffset? startDateTime = null, DateTimeOffset? endDateTime = null, JobStatus status = default) + { + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// A new instance for mocking. + public static TrainingJobState TrainingJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, TrainingJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// A new instance for mocking. + public static AuthoringConversationsWarning AuthoringConversationsWarning(string code = null, string message = null) + { + return new AuthoringConversationsWarning(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static CopyProjectJobState CopyProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// A new instance for mocking. + public static ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default, string modelTrainingConfigVersion = null, IEnumerable assignedResources = null) + { + assignedResources ??= new List(); + + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// A new instance for mocking. + public static DeploymentResource DeploymentResource(string resourceId = null, string region = null) + { + return new DeploymentResource(resourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// A new instance for mocking. + public static CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, IEnumerable assignedResourceIds = null) + { + assignedResourceIds ??= new List(); + + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentJobState DeploymentJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// A new instance for mocking. + public static ExportProjectJobState ExportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, string resultUrl = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + resultUrl, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ImportProjectJobState ImportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// A new instance for mocking. + public static ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, int lastTrainingDurationInSeconds = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null, bool hasSnapshot = default) + { + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// A new instance for mocking. + public static EvaluationJobResult EvaluationJobResult(EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = default) + { + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// A new instance for mocking. + public static EvaluationJobState EvaluationJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, EvaluationJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the utterance text. + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the entities results for the utterance. + /// Represents the intents results for the utterance. + /// A new instance for mocking. + public static UtteranceEvaluationResult UtteranceEvaluationResult(string text = null, string language = null, UtteranceEntitiesEvaluationResult entitiesResult = null, UtteranceIntentsEvaluationResult intentsResult = null) + { + return new UtteranceEvaluationResult(text, language, entitiesResult, intentsResult, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the expected entity labels. + /// Represents the predicted entity labels. + /// A new instance for mocking. + public static UtteranceEntitiesEvaluationResult UtteranceEntitiesEvaluationResult(IEnumerable expectedEntities = null, IEnumerable predictedEntities = null) + { + expectedEntities ??= new List(); + predictedEntities ??= new List(); + + return new UtteranceEntitiesEvaluationResult(expectedEntities?.ToList(), predictedEntities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// A new instance for mocking. + public static UtteranceEntityEvaluationResult UtteranceEntityEvaluationResult(string category = null, int offset = default, int length = default) + { + return new UtteranceEntityEvaluationResult(category, offset, length, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the utterance's expected intent. + /// Represents the utterance's predicted intent. + /// A new instance for mocking. + public static UtteranceIntentsEvaluationResult UtteranceIntentsEvaluationResult(string expectedIntent = null, string predictedIntent = null) + { + return new UtteranceIntentsEvaluationResult(expectedIntent, predictedIntent, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Contains the data related to entities evaluation. + /// Contains the data related to intents evaluation. + /// The options that were used while running the evaluation. + /// A new instance for mocking. + public static EvaluationSummary EvaluationSummary(EntitiesEvaluationSummary entitiesEvaluation = null, IntentsEvaluationSummary intentsEvaluation = null, EvaluationDetails evaluationOptions = null) + { + return new EvaluationSummary(entitiesEvaluation, intentsEvaluation, evaluationOptions, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static EntitiesEvaluationSummary EntitiesEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary entities = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + entities ??= new Dictionary(); + + return new EntitiesEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrix ConfusionMatrix(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrix(additionalProperties); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrixRow ConfusionMatrixRow(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrixRow(additionalProperties); + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// A new instance for mocking. + public static ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = default, float rawValue = default) + { + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static EntityEvaluationSummary EntityEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + /// Represents the intents evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static IntentsEvaluationSummary IntentsEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary intents = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + intents ??= new Dictionary(); + + return new IntentsEvaluationSummary( + confusionMatrix, + intents, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static IntentEvaluationSummary IntentEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new IntentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// A new instance for mocking. + public static AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) + { + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentResourcesJobState DeploymentResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The list of retrieved assigned project deployments. + /// The next page link. + /// A new instance for mocking. + public static AssignedResourceDeploymentsMetadata AssignedResourceDeploymentsMetadata(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new AssignedResourceDeploymentsMetadata(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// A new instance for mocking. + public static AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, IEnumerable deploymentsMetadata = null) + { + deploymentsMetadata ??= new List(); + + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// A new instance for mocking. + public static AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default) + { + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The list of the languages. + /// The next page link. + /// A new instance for mocking. + public static SupportedLanguages SupportedLanguages(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new SupportedLanguages(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) + { + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The supported prebuilt entities. + /// The next page link. + /// A new instance for mocking. + public static PrebuiltEntities PrebuiltEntities(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new PrebuiltEntities(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// A new instance for mocking. + public static PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) + { + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The list of the training config versions. + /// The next page link. + /// A new instance for mocking. + public static TrainingConfigVersions TrainingConfigVersions(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new TrainingConfigVersions(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// A new instance for mocking. + public static TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, DateTimeOffset modelExpirationDate = default) + { + return new TrainingConfigVersion(trainingConfigVersionProperty, modelExpirationDate, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// A new instance for mocking. + public static ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastExportedModelDateTime = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null) + { + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ExportedModelJobState ExportedModelJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AnalyzeConversationAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AnalyzeConversationAuthoring.cs new file mode 100644 index 000000000000..2cb83fc5d18d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AnalyzeConversationAuthoring.cs @@ -0,0 +1,6630 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.AI.Language.Conversations.Authoring.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Language.Conversations.Authoring +{ + // Data plane generated sub-client. + /// The AnalyzeConversationAuthoring sub-client. + public partial class AnalyzeConversationAuthoring + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of AnalyzeConversationAuthoring for mocking. + protected AnalyzeConversationAuthoring() + { + } + + /// Initializes a new instance of AnalyzeConversationAuthoring. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The key credential to copy. + /// The token credential to copy. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// The API version to use for this operation. + internal AnalyzeConversationAuthoring(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _keyCredential = keyCredential; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectAsync(projectName, context).ConfigureAwait(false); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProject(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProject(projectName, context); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project name. + /// 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 GetProjectAsync(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project name. + /// 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 GetProject(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new project or updates an existing one. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateProjectAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new project or updates an existing one. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateProject(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CopyProjectAuthorizationAsync(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CopyProjectAuthorizationAsync(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CopyProjectAuthorization(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CopyProjectAuthorization(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure resource. + /// + /// + /// + /// 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 new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CopyProjectAuthorizationAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure resource. + /// + /// + /// + /// 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 new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CopyProjectAuthorization(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetCopyProjectStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCopyProjectStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetCopyProjectStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCopyProjectStatus(projectName, jobId, context); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetCopyProjectStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetCopyProjectStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentAsync(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentAsync(projectName, deploymentName, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeployment(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeployment(projectName, deploymentName, context); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// 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 GetDeploymentAsync(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// 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 GetDeployment(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentDeleteFromResourcesStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentDeleteFromResourcesStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSwapDeploymentsStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetSwapDeploymentsStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSwapDeploymentsStatus(projectName, jobId, context); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetSwapDeploymentsStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetSwapDeploymentsStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportStatus(projectName, jobId, context); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetExportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetExportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetImportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetImportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetImportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetImportStatus(projectName, jobId, context); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetImportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetImportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainedModelAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainedModel(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainedModel(projectName, trainedModelLabel, context); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a trained model. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// 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 GetTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a trained model. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// 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 GetTrainedModel(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + 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] Deletes an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// 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 DeleteTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, 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] Deletes an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// 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 DeleteTrainedModel(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEvaluationStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEvaluationStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetModelEvaluationSummaryAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetModelEvaluationSummary(projectName, trainedModelLabel, context); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 GetModelEvaluationSummary(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLoadSnapshotStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLoadSnapshotStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAssignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAssignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetAssignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing unassign deployment resources job. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetUnassignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing unassign deployment resources job. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetUnassignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// 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 GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// 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 GetUnassignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainingStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainingStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingStatus(projectName, jobId, context); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetTrainingStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetTrainingStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectDeletionStatusAsync(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectDeletionStatusAsync(jobId, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProjectDeletionStatus(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProjectDeletionStatus(jobId, context); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatusAsync(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatus(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetAssignedResourceDeploymentsAsync(int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAssignedResourceDeploymentsAsync(top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(AssignedResourceDeploymentsMetadata.FromResponse(response), response); + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetAssignedResourceDeployments(int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAssignedResourceDeployments(top, skip, maxpagesize, context); + return Response.FromValue(AssignedResourceDeploymentsMetadata.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetAssignedResourceDeploymentsAsync(int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignedResourceDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignedResourceDeploymentsRequest(top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetAssignedResourceDeployments(int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignedResourceDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignedResourceDeploymentsRequest(top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the supported languages for the given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetSupportedLanguagesAsync(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSupportedLanguagesAsync(projectKind.ToString(), top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(SupportedLanguages.FromResponse(response), response); + } + + /// Lists the supported languages for the given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetSupportedLanguages(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSupportedLanguages(projectKind.ToString(), top, skip, maxpagesize, context); + return Response.FromValue(SupportedLanguages.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the supported languages for the given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 response returned from the service. + /// + public virtual async Task GetSupportedLanguagesAsync(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedLanguages"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedLanguagesRequest(projectKind, top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the supported languages for the given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 response returned from the service. + /// + public virtual Response GetSupportedLanguages(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedLanguages"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedLanguagesRequest(projectKind, top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetSupportedPrebuiltEntitiesAsync(string language = null, string multilingual = null, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSupportedPrebuiltEntitiesAsync(language, multilingual, top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(PrebuiltEntities.FromResponse(response), response); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetSupportedPrebuiltEntities(string language = null, string multilingual = null, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSupportedPrebuiltEntities(language, multilingual, top, skip, maxpagesize, context); + return Response.FromValue(PrebuiltEntities.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetSupportedPrebuiltEntitiesAsync(string language, string multilingual, int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedPrebuiltEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedPrebuiltEntitiesRequest(language, multilingual, top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetSupportedPrebuiltEntities(string language, string multilingual, int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedPrebuiltEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedPrebuiltEntitiesRequest(language, multilingual, top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the support training config version for a given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetTrainingConfigVersionsAsync(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingConfigVersionsAsync(projectKind.ToString(), top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(TrainingConfigVersions.FromResponse(response), response); + } + + /// Lists the support training config version for a given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetTrainingConfigVersions(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingConfigVersions(projectKind.ToString(), top, skip, maxpagesize, context); + return Response.FromValue(TrainingConfigVersions.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 response returned from the service. + /// + public virtual async Task GetTrainingConfigVersionsAsync(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingConfigVersions"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingConfigVersionsRequest(projectKind, top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 response returned from the service. + /// + public virtual Response GetTrainingConfigVersions(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingConfigVersions"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingConfigVersionsRequest(projectKind, top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelAsync(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelAsync(projectName, exportedModelName, context).ConfigureAwait(false); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModel(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModel(projectName, exportedModelName, context); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// 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 GetExportedModelAsync(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// 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 GetExportedModel(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelJobStatusAsync(projectName, exportedModelName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModelJobStatus(projectName, exportedModelName, jobId, context); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// The job ID. + /// 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 GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// The job ID. + /// 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 GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetProjectsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetProjects(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeployments(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeploymentResources(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainingJobs(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetExportedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task DeleteProjectAsync(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteProject", 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] Deletes a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation DeleteProject(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Copies an existing project to another Azure resource. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task CopyProjectAsync(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CopyProjectAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Copies an existing project to another Azure resource. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation CopyProject(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CopyProject(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Copies an existing project to another Azure resource. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task CopyProjectAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Copies an existing project to another Azure resource. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation CopyProject(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to export a project's data. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The format of the exported project file to use. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ExportAsync(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, ExportedProjectFormat? exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return await ExportAsync(waitUntil, projectName, stringIndexType.ToString(), exportedProjectFormat?.ToString(), assetKind, trainedModelLabel, context).ConfigureAwait(false); + } + + /// Triggers a job to export a project's data. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The format of the exported project file to use. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Export(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, ExportedProjectFormat? exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return Export(waitUntil, projectName, stringIndexType.ToString(), exportedProjectFormat?.ToString(), assetKind, trainedModelLabel, context); + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task ExportAsync(WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Export(WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The project data to import. + /// The format of the exported project file to use. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ImportAsync(WaitUntil waitUntil, string projectName, ExportedProject body, ExportedProjectFormat? exportedProjectFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await ImportAsync(waitUntil, projectName, content, exportedProjectFormat?.ToString(), context).ConfigureAwait(false); + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The project data to import. + /// The format of the exported project file to use. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Import(WaitUntil waitUntil, string projectName, ExportedProject body, ExportedProjectFormat? exportedProjectFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return Import(waitUntil, projectName, content, exportedProjectFormat?.ToString(), context); + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task ImportAsync(WaitUntil waitUntil, string projectName, RequestContent content, string exportedProjectFormat = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Import(WaitUntil waitUntil, string projectName, RequestContent content, string exportedProjectFormat = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a training job for a project. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> TrainAsync(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await TrainAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.Train"); + } + + /// Triggers a training job for a project. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Train(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = Train(waitUntil, projectName, content, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.Train"); + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> TrainAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Train(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Swaps two existing deployments with each other. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await SwapDeploymentsAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Swaps two existing deployments with each other. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation SwapDeployments(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return SwapDeployments(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation SwapDeployments(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new deployment or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeployProjectAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Creates a new deployment or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeployProject(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeployProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeployProject", 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] Deletes a project deployment. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task DeleteDeploymentAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeployment", 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] Deletes a project deployment. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation DeleteDeployment(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeployment", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a project deployment from the specified assigned resources. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeleteDeploymentFromResourcesAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Deletes a project deployment from the specified assigned resources. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeleteDeploymentFromResources(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers evaluation operation on a trained model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await EvaluateModelAsync(waitUntil, projectName, trainedModelLabel, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel"); + } + + /// Triggers evaluation operation on a trained model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = EvaluateModel(waitUntil, projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel"); + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained model. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained model. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel", 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] Restores the snapshot of this trained model to be the current working directory of the project. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task LoadSnapshotAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.LoadSnapshot", 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] Restores the snapshot of this trained model to be the current working directory of the project. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation LoadSnapshot(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.LoadSnapshot", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await AssignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation AssignDeploymentResources(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return AssignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation AssignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await UnassignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation UnassignDeploymentResources(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return UnassignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation UnassignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a cancellation for a running training job. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await CancelTrainingJobAsync(waitUntil, projectName, jobId, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob"); + } + + /// Triggers a cancellation for a running training job. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = CancelTrainingJob(waitUntil, projectName, jobId, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob"); + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob", 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] Deletes an existing exported model. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task DeleteExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteExportedModel", 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] Deletes an existing exported model. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation DeleteExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new exported model or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CreateOrUpdateExportedModelAsync(waitUntil, projectName, exportedModelName, content, context).ConfigureAwait(false); + } + + /// Creates a new exported model or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CreateOrUpdateExportedModel(waitUntil, projectName, exportedModelName, content, context); + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetProjectsRequest(int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectRequest(string projectName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateProjectRequest(string projectName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteProjectRequest(string projectName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCopyProjectAuthorizationRequest(string projectName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:authorize-copy", 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 CreateCopyProjectRequest(string projectName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:copy", 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 CreateExportRequest(string projectName, string stringIndexType, string exportedProjectFormat, string assetKind, string trainedModelLabel, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:export", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (exportedProjectFormat != null) + { + uri.AppendQuery("format", exportedProjectFormat, true); + } + if (assetKind != null) + { + uri.AppendQuery("assetKind", assetKind, true); + } + if (trainedModelLabel != null) + { + uri.AppendQuery("trainedModelLabel", trainedModelLabel, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateImportRequest(string projectName, RequestContent content, string exportedProjectFormat, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:import", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (exportedProjectFormat != null) + { + uri.AppendQuery("format", exportedProjectFormat, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateTrainRequest(string projectName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:train", 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 CreateGetCopyProjectStatusRequest(string projectName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/copy/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateSwapDeploymentsRequest(string projectName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/:swap", 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 CreateGetDeploymentRequest(string projectName, string deploymentName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeployProjectRequest(string projectName, string deploymentName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + 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 CreateDeleteDeploymentRequest(string projectName, string deploymentName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteDeploymentFromResourcesRequest(string projectName, string deploymentName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/:delete-from-resources", 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 CreateGetDeploymentDeleteFromResourcesStatusRequest(string projectName, string deploymentName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/delete-from-resources/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentStatusRequest(string projectName, string deploymentName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSwapDeploymentsStatusRequest(string projectName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/swap/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportStatusRequest(string projectName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/export/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetImportStatusRequest(string projectName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/import/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteTrainedModelRequest(string projectName, string trainedModelLabel, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateEvaluateModelRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:evaluate", 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 CreateLoadSnapshotRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:load-snapshot", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEvaluationStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluate/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsRequest(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/result", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationSummaryRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/summary-result", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetLoadSnapshotStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/load-snapshot/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAssignDeploymentResourcesRequest(string projectName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:assign", 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 CreateUnassignDeploymentResourcesRequest(string projectName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:unassign", 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 CreateGetAssignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/assign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetUnassignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/unassign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingStatusRequest(string projectName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCancelTrainingJobRequest(string projectName, string 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/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; + } + + internal HttpMessage CreateGetProjectDeletionStatusRequest(string jobId, 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("/authoring/analyze-conversations/projects/global/deletion-jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAssignedResourceDeploymentsRequest(int? top, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/global/deployments/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedLanguagesRequest(string projectKind, int? top, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/global/languages", false); + uri.AppendQuery("projectKind", projectKind, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedPrebuiltEntitiesRequest(string language, string multilingual, int? top, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/global/prebuilt-entities", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (language != null) + { + uri.AppendQuery("language", language, true); + } + if (multilingual != null) + { + uri.AppendQuery("multilingual", multilingual, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingConfigVersionsRequest(string projectKind, int? top, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/global/training-config-versions", false); + uri.AppendQuery("projectKind", projectKind, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelRequest(string projectName, string exportedModelName, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteExportedModelRequest(string projectName, string exportedModelName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrUpdateExportedModelRequest(string projectName, string exportedModelName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + 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 CreateGetExportedModelJobStatusRequest(string projectName, string exportedModelName, string jobId, 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("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsNextPageRequest(string nextLink, string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + 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 _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + + private TrainingJobResult FetchTrainingJobResultFromTrainingJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return TrainingJobResult.DeserializeTrainingJobResult(resultJsonElement); + } + + private EvaluationJobResult FetchEvaluationJobResultFromEvaluationJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return EvaluationJobResult.DeserializeEvaluationJobResult(resultJsonElement); + } + } +} 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 new file mode 100644 index 000000000000..81b4584b3626 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +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://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"; + private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// 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 AuthoringClient for mocking. + protected AuthoringClient() + { + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, AzureKeyCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, TokenCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AnalyzeConversationAuthoring. + /// The API version to use for this operation. + /// is null. + public virtual AnalyzeConversationAuthoring GetAnalyzeConversationAuthoringClient(string apiVersion = "2024-11-15-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new AnalyzeConversationAuthoring(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClientOptions.cs new file mode 100644 index 000000000000..1faa972821a7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClientOptions.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring +{ + /// Client options for AuthoringClient. + public partial class AuthoringClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-04-01". + V2023_04_01 = 1, + /// Service version "2023-04-15-preview". + V2023_04_15_Preview = 2, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 3, + } + + internal string Version { get; } + + /// Initializes new instance of AuthoringClientOptions. + public AuthoringClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_04_01 => "2023-04-01", + ServiceVersion.V2023_04_15_Preview => "2023-04-15-preview", + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AnalyzeConversationAuthoring.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AnalyzeConversationAuthoring.xml new file mode 100644 index 000000000000..ad7f0d4545c2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AnalyzeConversationAuthoring.xml @@ -0,0 +1,5911 @@ + + + + + +This sample shows how to call GetProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> +This sample shows how to call GetProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> + + + +This sample shows how to call GetProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> +This sample shows how to call GetProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> + + + +This sample shows how to call GetProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProjectAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call GetProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProject with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + projectName = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProjectAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + projectName = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProject with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorization. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorization and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> +This sample shows how to call GetDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> + + + +This sample shows how to call GetDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> +This sample shows how to call GetDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> + + + +This sample shows how to call GetDeploymentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeploymentAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeployment and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeployment with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> +This sample shows how to call GetExportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetExportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> +This sample shows how to call GetExportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> + + + +This sample shows how to call GetExportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetExportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetImportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> +This sample shows how to call GetImportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetImportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> +This sample shows how to call GetImportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> + + + +This sample shows how to call GetImportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetImportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> + + + +This sample shows how to call GetTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> +This sample shows how to call GetTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> + + + +This sample shows how to call GetTrainedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call GetTrainedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call DeleteTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> +This sample shows how to call GetEvaluationStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetEvaluationStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummary. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummary and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> + + + +This sample shows how to call GetTrainingStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> +This sample shows how to call GetTrainingStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> + + + +This sample shows how to call GetTrainingStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(); +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetAssignedResourceDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(); +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetAssignedResourceDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation); +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedLanguages. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages(ProjectKind.Conversation); +]]> +This sample shows how to call GetSupportedLanguages with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedLanguages and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +]]> +This sample shows how to call GetSupportedLanguages with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync(); +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities(); +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync(null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync("", "", 1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities(null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities("", "", 1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation); +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetTrainingConfigVersions. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation); +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetTrainingConfigVersions and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> +This sample shows how to call GetExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> + + + +This sample shows how to call GetExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> +This sample shows how to call GetExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> + + + +This sample shows how to call GetExportedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync()) +{ +} +]]> +This sample shows how to call GetProjectsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjects. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects()) +{ +} +]]> +This sample shows how to call GetProjects with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjectsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjectsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetProjects and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjects with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("")) +{ +} +]]> +This sample shows how to call GetDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("")) +{ +} +]]> +This sample shows how to call GetTrainedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResults. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResults and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) +{ +} +]]> +This sample shows how to call GetDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResources and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResources with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobs. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("")) +{ +} +]]> +This sample shows how to call GetTrainingJobs with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobs and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobs with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("")) +{ +} +]]> +This sample shows how to call GetExportedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call DeleteProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call DeleteProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call ImportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") +{ + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", +}) +{ + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") + { + CompositionSetting = CompositionSetting.ReturnLongestOverlap, + List = new ExportedEntityList + { + Sublists = {new ExportedEntitySublist + { + ListKey = "", + Synonyms = {new ExportedEntityListSynonym + { + Language = "", + Values = {""}, + }}, + }}, + }, + Prebuilts = {new ExportedPrebuiltEntity("")}, + Regex = new ExportedEntityRegex + { + Expressions = {new ExportedEntityRegexExpression + { + RegexKey = "", + Language = "", + RegexPattern = "", + }}, + }, + RequiredComponents = {""}, + }}, + Utterances = {new ConversationExportedUtterance("", "") + { + Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); +Operation operation = client.Import(WaitUntil.Completed, "", body); +]]> +This sample shows how to call Import with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") +{ + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", +}) +{ + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") + { + CompositionSetting = CompositionSetting.ReturnLongestOverlap, + List = new ExportedEntityList + { + Sublists = {new ExportedEntitySublist + { + ListKey = "", + Synonyms = {new ExportedEntityListSynonym + { + Language = "", + Values = {""}, + }}, + }}, + }, + Prebuilts = {new ExportedPrebuiltEntity("")}, + Regex = new ExportedEntityRegex + { + Expressions = {new ExportedEntityRegexExpression + { + RegexKey = "", + Language = "", + RegexPattern = "", + }}, + }, + RequiredComponents = {""}, + }}, + Utterances = {new ConversationExportedUtterance("", "") + { + Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = client.Import(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call ImportAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { + new + { + category = "", + } + }, + entities = new object[] + { + new + { + category = "", + compositionSetting = "returnLongestOverlap", + list = new + { + sublists = new object[] + { + new + { + listKey = "", + synonyms = new object[] + { + new + { + language = "", + values = new object[] + { + "" + }, + } + }, + } + }, + }, + prebuilts = new object[] + { + new + { + category = "", + } + }, + regex = new + { + expressions = new object[] + { + new + { + regexKey = "", + language = "", + regexPattern = "", + } + }, + }, + requiredComponents = new object[] + { + "" + }, + } + }, + utterances = new object[] + { + new + { + entities = new object[] + { + new + { + category = "", + offset = 1234, + length = 1234, + } + }, + text = "", + language = "", + intent = "", + dataset = "", + } + }, + projectKind = "Conversation", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content); +]]> +This sample shows how to call Import with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { + new + { + category = "", + } + }, + entities = new object[] + { + new + { + category = "", + compositionSetting = "returnLongestOverlap", + list = new + { + sublists = new object[] + { + new + { + listKey = "", + synonyms = new object[] + { + new + { + language = "", + values = new object[] + { + "" + }, + } + }, + } + }, + }, + prebuilts = new object[] + { + new + { + category = "", + } + }, + regex = new + { + expressions = new object[] + { + new + { + regexKey = "", + language = "", + regexPattern = "", + } + }, + }, + requiredComponents = new object[] + { + "" + }, + } + }, + utterances = new object[] + { + new + { + entities = new object[] + { + new + { + category = "", + offset = 1234, + length = 1234, + } + }, + text = "", + language = "", + intent = "", + dataset = "", + } + }, + projectKind = "Conversation", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); +]]> + + + +This sample shows how to call TrainAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call TrainAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) +{ + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, +}; +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call Train. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call Train with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) +{ + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, +}; +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call TrainAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingMode = "advanced", +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call TrainAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call Train and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingMode = "advanced", +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call Train with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeployments with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call EvaluateModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModelAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call EvaluateModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModel with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call LoadSnapshotAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshotAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call LoadSnapshot. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshot with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CancelTrainingJobAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJob. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJob with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJobAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call CancelTrainingJob and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJob with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call DeleteExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Argument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..be9eb20389c2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring +{ + 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.Conversations.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..ebd5ffcd7101 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring +{ + 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.Conversations.Authoring/src/Generated/Internal/ChangeTrackingList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..4eacbc67f6b6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring +{ + 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.Conversations.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..5d5876cd582a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring +{ + 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.Conversations.Authoring/src/Generated/Internal/Optional.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..34b62b5f93f3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring +{ + 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.Conversations.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..ff047ca8dbe7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring +{ + 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.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs new file mode 100644 index 000000000000..60bee30edf13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignDeploymentResourcesDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourcesMetadata"u8); + writer.WriteStartArray(); + foreach (var item in ResourcesMetadata) + { + 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 + } + } + } + + AssignDeploymentResourcesDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + + internal static AssignDeploymentResourcesDetails DeserializeAssignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resourcesMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourcesMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceMetadata.DeserializeResourceMetadata(item, options)); + } + resourcesMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignDeploymentResourcesDetails(resourcesMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); + } + } + + AssignDeploymentResourcesDetails IPersistableModel.Create(BinaryData 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 DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} 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 AssignDeploymentResourcesDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignDeploymentResourcesDetails(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.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..afaf75245625 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for assigning Azure resources to a project. + public partial class AssignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// is null. + public AssignDeploymentResourcesDetails(IEnumerable resourcesMetadata) + { + Argument.AssertNotNull(resourcesMetadata, nameof(resourcesMetadata)); + + ResourcesMetadata = resourcesMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// Keeps track of any properties unknown to the library. + internal AssignDeploymentResourcesDetails(IList resourcesMetadata, IDictionary serializedAdditionalRawData) + { + ResourcesMetadata = resourcesMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignDeploymentResourcesDetails() + { + } + + /// Represents the metadata for the resources to be assigned. + public IList ResourcesMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs new file mode 100644 index 000000000000..9f5ca609d99b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedDeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + } + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + AssignedDeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedDeploymentResource(document.RootElement, options); + } + + internal static AssignedDeploymentResource DeserializeAssignedDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + AssignedDeploymentResource IPersistableModel.Create(BinaryData 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 DeserializeAssignedDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} 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 AssignedDeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedDeploymentResource(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.Authoring/src/Generated/Models/AssignedDeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.cs new file mode 100644 index 000000000000..618f6d01d66e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the assigned deployment resource. + public partial class AssignedDeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 resource region. + /// is null. + internal AssignedDeploymentResource(string region) + { + Argument.AssertNotNull(region, nameof(region)); + + Region = region; + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedDeploymentResource(string azureResourceId, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedDeploymentResource() + { + } + + /// The resource ID. + public string AzureResourceId { get; } + /// The resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs new file mode 100644 index 000000000000..04c1e3d2fe12 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.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.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedProjectDeploymentMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + AssignedProjectDeploymentMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentMetadata DeserializeAssignedProjectDeploymentMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentMetadata IPersistableModel.Create(BinaryData 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 DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} 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 AssignedProjectDeploymentMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentMetadata(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.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs new file mode 100644 index 000000000000..fae2ecce4b15 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata for an assigned deployment. + public partial class AssignedProjectDeploymentMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// is null. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate) + { + Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentMetadata() + { + } + + /// Represents the deployment name. + public string DeploymentName { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs new file mode 100644 index 000000000000..5b597fcb1be1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedProjectDeploymentsMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + writer.WritePropertyName("deploymentsMetadata"u8); + writer.WriteStartArray(); + foreach (var item in DeploymentsMetadata) + { + 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 + } + } + } + + AssignedProjectDeploymentsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentsMetadata DeserializeAssignedProjectDeploymentsMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectName = default; + IReadOnlyList deploymentsMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentsMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AssignedProjectDeploymentMetadata.DeserializeAssignedProjectDeploymentMetadata(item, options)); + } + deploymentsMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentsMetadata IPersistableModel.Create(BinaryData 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 DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} 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 AssignedProjectDeploymentsMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentsMetadata(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.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs new file mode 100644 index 000000000000..9f66a10adc3a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.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 System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata for assigned deployments for a project. + public partial class AssignedProjectDeploymentsMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// or is null. + internal AssignedProjectDeploymentsMetadata(string projectName, IEnumerable deploymentsMetadata) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(deploymentsMetadata, nameof(deploymentsMetadata)); + + ProjectName = projectName; + DeploymentsMetadata = deploymentsMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentsMetadata(string projectName, IReadOnlyList deploymentsMetadata, IDictionary serializedAdditionalRawData) + { + ProjectName = projectName; + DeploymentsMetadata = deploymentsMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentsMetadata() + { + } + + /// Represents the project name. + public string ProjectName { get; } + /// Represents the resource region. + public IReadOnlyList DeploymentsMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.Serialization.cs new file mode 100644 index 000000000000..abfd17b13326 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.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.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedResourceDeploymentsMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedResourceDeploymentsMetadata)} 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); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + AssignedResourceDeploymentsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedResourceDeploymentsMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedResourceDeploymentsMetadata(document.RootElement, options); + } + + internal static AssignedResourceDeploymentsMetadata DeserializeAssignedResourceDeploymentsMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string 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(AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedResourceDeploymentsMetadata(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(AssignedResourceDeploymentsMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedResourceDeploymentsMetadata IPersistableModel.Create(BinaryData 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 DeserializeAssignedResourceDeploymentsMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedResourceDeploymentsMetadata)} 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 AssignedResourceDeploymentsMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedResourceDeploymentsMetadata(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.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.cs new file mode 100644 index 000000000000..30cb10584f98 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata for deployments assigned to a resource. + public partial class AssignedResourceDeploymentsMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of retrieved assigned project deployments. + /// is null. + internal AssignedResourceDeploymentsMetadata(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of retrieved assigned project deployments. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal AssignedResourceDeploymentsMetadata(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedResourceDeploymentsMetadata() + { + } + + /// The list of retrieved assigned project deployments. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.Serialization.cs new file mode 100644 index 000000000000..e10a01cd735b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.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.Conversations.Authoring.Models +{ + public partial class AuthoringConversationsError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsError)} 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 + } + } + } + + AuthoringConversationsError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthoringConversationsError(document.RootElement, options); + } + + internal static AuthoringConversationsError DeserializeAuthoringConversationsError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorCode 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 ErrorCode(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(DeserializeAuthoringConversationsError(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 AuthoringConversationsError( + 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(AuthoringConversationsError)} does not support writing '{options.Format}' format."); + } + } + + AuthoringConversationsError IPersistableModel.Create(BinaryData 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 DeserializeAuthoringConversationsError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthoringConversationsError)} 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 AuthoringConversationsError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAuthoringConversationsError(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.Authoring/src/Generated/Models/AuthoringConversationsError.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.cs new file mode 100644 index 000000000000..ce1afc865676 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.cs @@ -0,0 +1,100 @@ +// 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.Authoring.Models +{ + /// The error object. + public partial class AuthoringConversationsError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 AuthoringConversationsError(ErrorCode 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 AuthoringConversationsError(ErrorCode 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 AuthoringConversationsError() + { + } + + /// One of a server-defined set of error codes. + public ErrorCode 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.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.Serialization.cs new file mode 100644 index 000000000000..48ce205e2308 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.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.Conversations.Authoring.Models +{ + public partial class AuthoringConversationsWarning : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AuthoringConversationsWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthoringConversationsWarning(document.RootElement, options); + } + + internal static AuthoringConversationsWarning DeserializeAuthoringConversationsWarning(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthoringConversationsWarning(code, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} does not support writing '{options.Format}' format."); + } + } + + AuthoringConversationsWarning IPersistableModel.Create(BinaryData 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 DeserializeAuthoringConversationsWarning(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} 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 AuthoringConversationsWarning FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAuthoringConversationsWarning(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.Authoring/src/Generated/Models/AuthoringConversationsWarning.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.cs new file mode 100644 index 000000000000..d95d8f4f8f5c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.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.Conversations.Authoring.Models +{ + /// Represents a warning that was encountered while executing the request. + public partial class AuthoringConversationsWarning + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 warning code. + /// The warning message. + /// or is null. + internal AuthoringConversationsWarning(string code, string message) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// Keeps track of any properties unknown to the library. + internal AuthoringConversationsWarning(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AuthoringConversationsWarning() + { + } + + /// The warning code. + public string Code { get; } + /// The warning message. + public string Message { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CompositionSetting.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CompositionSetting.cs new file mode 100644 index 000000000000..b4be981ec617 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CompositionSetting.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.AI.Language.Conversations.Authoring.Models +{ + /// The CompositionSetting. + public readonly partial struct CompositionSetting : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CompositionSetting(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReturnLongestOverlapValue = "returnLongestOverlap"; + private const string RequireExactOverlapValue = "requireExactOverlap"; + private const string SeparateComponentsValue = "separateComponents"; + private const string CombineComponentsValue = "combineComponents"; + + /// When two or more components are found in the text and overlap, the component with the longest set of characters is returned. + public static CompositionSetting ReturnLongestOverlap { get; } = new CompositionSetting(ReturnLongestOverlapValue); + /// All components must overlap at the exact same characters in the text for the entity to return. If one of the defined components is not matched or predicted, the entity will not return. + public static CompositionSetting RequireExactOverlap { get; } = new CompositionSetting(RequireExactOverlapValue); + /// Every component's match or prediction is returned as a separate instance of the entity. + public static CompositionSetting SeparateComponents { get; } = new CompositionSetting(SeparateComponentsValue); + /// When two or more components are found in the text and overlap, the components' spans are merged together into one span combining all of them. + public static CompositionSetting CombineComponents { get; } = new CompositionSetting(CombineComponentsValue); + /// Determines if two values are the same. + public static bool operator ==(CompositionSetting left, CompositionSetting right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CompositionSetting left, CompositionSetting right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CompositionSetting(string value) => new CompositionSetting(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CompositionSetting other && Equals(other); + /// + public bool Equals(CompositionSetting other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs new file mode 100644 index 000000000000..289628a1b94e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ConfusionMatrix : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + 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 + } + } + + ConfusionMatrix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrix(document.RootElement, options); + } + + internal static ConfusionMatrix DeserializeConfusionMatrix(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrix(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrix IPersistableModel.Create(BinaryData 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 DeserializeConfusionMatrix(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} 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 ConfusionMatrix FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrix(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.Authoring/src/Generated/Models/ConfusionMatrix.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.cs new file mode 100644 index 000000000000..0334a2da03b5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.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.Authoring.Models +{ + /// The ConfusionMatrix. + public partial class ConfusionMatrix + { + /// Initializes a new instance of . + internal ConfusionMatrix() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrix(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs new file mode 100644 index 000000000000..cc2df8970195 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.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.Conversations.Authoring.Models +{ + public partial class ConfusionMatrixCell : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("normalizedValue"u8); + writer.WriteNumberValue(NormalizedValue); + writer.WritePropertyName("rawValue"u8); + writer.WriteNumberValue(RawValue); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ConfusionMatrixCell IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixCell(document.RootElement, options); + } + + internal static ConfusionMatrixCell DeserializeConfusionMatrixCell(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float normalizedValue = default; + float rawValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("normalizedValue"u8)) + { + normalizedValue = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("rawValue"u8)) + { + rawValue = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixCell IPersistableModel.Create(BinaryData 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 DeserializeConfusionMatrixCell(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} 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 ConfusionMatrixCell FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixCell(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.Authoring/src/Generated/Models/ConfusionMatrixCell.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.cs new file mode 100644 index 000000000000..f1d43695af13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.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.Conversations.Authoring.Models +{ + /// Represents a cell in a confusion matrix. + public partial class ConfusionMatrixCell + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + internal ConfusionMatrixCell(float normalizedValue, float rawValue) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// Keeps track of any properties unknown to the library. + internal ConfusionMatrixCell(float normalizedValue, float rawValue, IDictionary serializedAdditionalRawData) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConfusionMatrixCell() + { + } + + /// Represents normalized value in percentages. + public float NormalizedValue { get; } + /// Represents raw value. + public float RawValue { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs new file mode 100644 index 000000000000..05e9346b88b7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ConfusionMatrixRow : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + 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 + } + } + + ConfusionMatrixRow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixRow(document.RootElement, options); + } + + internal static ConfusionMatrixRow DeserializeConfusionMatrixRow(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrixRow(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixRow IPersistableModel.Create(BinaryData 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 DeserializeConfusionMatrixRow(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} 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 ConfusionMatrixRow FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixRow(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.Authoring/src/Generated/Models/ConfusionMatrixRow.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.cs new file mode 100644 index 000000000000..f83b84299f2e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.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.Authoring.Models +{ + /// The ConfusionMatrixRow. + public partial class ConfusionMatrixRow + { + /// Initializes a new instance of . + internal ConfusionMatrixRow() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrixRow(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.Serialization.cs new file mode 100644 index 000000000000..ffc9ece17b27 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ConversationExportedEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (Optional.IsDefined(CompositionSetting)) + { + writer.WritePropertyName("compositionSetting"u8); + writer.WriteStringValue(CompositionSetting.Value.ToString()); + } + if (Optional.IsDefined(List)) + { + writer.WritePropertyName("list"u8); + writer.WriteObjectValue(List, options); + } + if (Optional.IsCollectionDefined(Prebuilts)) + { + writer.WritePropertyName("prebuilts"u8); + writer.WriteStartArray(); + foreach (var item in Prebuilts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Regex)) + { + writer.WritePropertyName("regex"u8); + writer.WriteObjectValue(Regex, options); + } + if (Optional.IsCollectionDefined(RequiredComponents)) + { + writer.WritePropertyName("requiredComponents"u8); + writer.WriteStartArray(); + foreach (var item in RequiredComponents) + { + 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 + } + } + } + + ConversationExportedEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationExportedEntity(document.RootElement, options); + } + + internal static ConversationExportedEntity DeserializeConversationExportedEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + CompositionSetting? compositionSetting = default; + ExportedEntityList list = default; + IList prebuilts = default; + ExportedEntityRegex regex = default; + IList requiredComponents = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("compositionSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compositionSetting = new CompositionSetting(property.Value.GetString()); + continue; + } + if (property.NameEquals("list"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + list = ExportedEntityList.DeserializeExportedEntityList(property.Value, options); + continue; + } + if (property.NameEquals("prebuilts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedPrebuiltEntity.DeserializeExportedPrebuiltEntity(item, options)); + } + prebuilts = array; + continue; + } + if (property.NameEquals("regex"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regex = ExportedEntityRegex.DeserializeExportedEntityRegex(property.Value, options); + continue; + } + if (property.NameEquals("requiredComponents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredComponents = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedEntity( + category, + compositionSetting, + list, + prebuilts ?? new ChangeTrackingList(), + regex, + requiredComponents ?? 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(ConversationExportedEntity)} does not support writing '{options.Format}' format."); + } + } + + ConversationExportedEntity IPersistableModel.Create(BinaryData 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 DeserializeConversationExportedEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationExportedEntity)} 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 ConversationExportedEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConversationExportedEntity(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.Authoring/src/Generated/Models/ConversationExportedEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.cs new file mode 100644 index 000000000000..1c617fcdfbb1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an entity with its components. + public partial class ConversationExportedEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 category of the entity. + /// is null. + public ConversationExportedEntity(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Prebuilts = new ChangeTrackingList(); + RequiredComponents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The category of the entity. + /// The behavior to follow when the entity's components overlap with each other. + /// The list component of the entity. + /// The prebuilt entities components. + /// The regex component of the entity. + /// The required components. Allowed values are 'learned', 'list', 'prebuilts' and 'regex'. + /// Keeps track of any properties unknown to the library. + internal ConversationExportedEntity(string category, CompositionSetting? compositionSetting, ExportedEntityList list, IList prebuilts, ExportedEntityRegex regex, IList requiredComponents, IDictionary serializedAdditionalRawData) + { + Category = category; + CompositionSetting = compositionSetting; + List = list; + Prebuilts = prebuilts; + Regex = regex; + RequiredComponents = requiredComponents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConversationExportedEntity() + { + } + + /// The category of the entity. + public string Category { get; } + /// The behavior to follow when the entity's components overlap with each other. + public CompositionSetting? CompositionSetting { get; set; } + /// The list component of the entity. + public ExportedEntityList List { get; set; } + /// The prebuilt entities components. + public IList Prebuilts { get; } + /// The regex component of the entity. + public ExportedEntityRegex Regex { get; set; } + /// The required components. Allowed values are 'learned', 'list', 'prebuilts' and 'regex'. + public IList RequiredComponents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.Serialization.cs similarity index 58% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.Serialization.cs index 38665062d81a..2a9de3a64a43 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.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.AI.Language.Conversations.Authoring.Models { - [PersistableModelProxy(typeof(UnknownEntityComponentInformation))] - public partial class EntityComponentInformation : IUtf8JsonSerializable, IJsonModel + public partial class ConversationExportedIntent : 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,14 @@ 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(ConversationExportedIntent)} does not support writing '{format}' format."); } - writer.WritePropertyName("entityComponentKind"u8); - writer.WriteStringValue(EntityComponentKind.ToString()); + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -53,19 +53,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - EntityComponentInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationExportedIntent 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(ConversationExportedIntent)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeConversationExportedIntent(document.RootElement, options); } - internal static EntityComponentInformation DeserializeEntityComponentInformation(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationExportedIntent DeserializeConversationExportedIntent(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -73,55 +73,62 @@ internal static EntityComponentInformation DeserializeEntityComponentInformation { return null; } - if (element.TryGetProperty("entityComponentKind", out JsonElement discriminator)) + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) { - switch (discriminator.GetString()) + if (property.NameEquals("category"u8)) { - case "LearnedComponent": return LearnedComponent.DeserializeLearnedComponent(element, options); - case "ListComponent": return ListComponent.DeserializeListComponent(element, options); - case "PrebuiltComponent": return PrebuiltComponent.DeserializePrebuiltComponent(element, options); + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } - return UnknownEntityComponentInformation.DeserializeUnknownEntityComponentInformation(element, options); + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedIntent(category, 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(ConversationExportedIntent)} does not support writing '{options.Format}' format."); } } - EntityComponentInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ConversationExportedIntent 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 DeserializeConversationExportedIntent(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationExportedIntent)} 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 ConversationExportedIntent FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEntityComponentInformation(document.RootElement); + return DeserializeConversationExportedIntent(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.cs new file mode 100644 index 000000000000..4409a0b0c7ec --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported intent of a conversational project. + public partial class ConversationExportedIntent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 intent category. + /// is null. + public ConversationExportedIntent(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// The intent category. + /// Keeps track of any properties unknown to the library. + internal ConversationExportedIntent(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConversationExportedIntent() + { + } + + /// The intent category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..ac8e5daf98a1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ConversationExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ConversationExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Intents)) + { + writer.WritePropertyName("intents"u8); + writer.WriteStartArray(); + foreach (var item in Intents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Utterances)) + { + writer.WritePropertyName("utterances"u8); + writer.WriteStartArray(); + foreach (var item in Utterances) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ConversationExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationExportedProjectAssets(document.RootElement, options); + } + + internal static ConversationExportedProjectAssets DeserializeConversationExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList intents = default; + IList entities = default; + IList utterances = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("intents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConversationExportedIntent.DeserializeConversationExportedIntent(item, options)); + } + intents = array; + continue; + } + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConversationExportedEntity.DeserializeConversationExportedEntity(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("utterances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConversationExportedUtterance.DeserializeConversationExportedUtterance(item, options)); + } + utterances = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedProjectAssets(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), entities ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ConversationExportedProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeConversationExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} 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 ConversationExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConversationExportedProjectAssets(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.Authoring/src/Generated/Models/ConversationExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.cs new file mode 100644 index 000000000000..2691cb10e99d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.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.Conversations.Authoring.Models +{ + /// Represents the exported assets of a conversational project. + public partial class ConversationExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ConversationExportedProjectAssets() + { + ProjectKind = ProjectKind.Conversation; + Intents = new ChangeTrackingList(); + Entities = new ChangeTrackingList(); + Utterances = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of project containing the assets. + /// Keeps track of any properties unknown to the library. + /// The intents defined in the project. + /// The entities defined in the project. + /// The utterances defined in the project. + internal ConversationExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList intents, IList entities, IList utterances) : base(projectKind, serializedAdditionalRawData) + { + Intents = intents; + Entities = entities; + Utterances = utterances; + } + + /// The intents defined in the project. + public IList Intents { get; } + /// The entities defined in the project. + public IList Entities { get; } + /// The utterances defined in the project. + public IList Utterances { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.Serialization.cs new file mode 100644 index 000000000000..68b49a371f93 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.Serialization.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConversationExportedUtterance : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent); + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ConversationExportedUtterance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationExportedUtterance(document.RootElement, options); + } + + internal static ConversationExportedUtterance DeserializeConversationExportedUtterance(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + string text = default; + string language = default; + string intent = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedUtteranceEntityLabel.DeserializeExportedUtteranceEntityLabel(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + intent = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedUtterance( + entities ?? new ChangeTrackingList(), + text, + language, + intent, + dataset, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} does not support writing '{options.Format}' format."); + } + } + + ConversationExportedUtterance IPersistableModel.Create(BinaryData 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 DeserializeConversationExportedUtterance(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} 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 ConversationExportedUtterance FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConversationExportedUtterance(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.Authoring/src/Generated/Models/ConversationExportedUtterance.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.cs new file mode 100644 index 000000000000..7816b840ba05 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported utterance for a conversational project. + public partial class ConversationExportedUtterance + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 utterance text. + /// The intent of the utterance. + /// or is null. + public ConversationExportedUtterance(string text, string intent) + { + Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(intent, nameof(intent)); + + Entities = new ChangeTrackingList(); + Text = text; + Intent = intent; + } + + /// Initializes a new instance of . + /// Represents the entity labels of the utterance. + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ConversationExportedUtterance(IList entities, string text, string language, string intent, string dataset, IDictionary serializedAdditionalRawData) + { + Entities = entities; + Text = text; + Language = language; + Intent = intent; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConversationExportedUtterance() + { + } + + /// Represents the entity labels of the utterance. + public IList Entities { get; } + /// The utterance text. + public string Text { get; } + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The intent of the utterance. + public string Intent { get; } + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs new file mode 100644 index 000000000000..3267d337db0d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + internal partial class CopyProjectAuthorizationRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + if (Optional.IsDefined(AllowOverwrite)) + { + writer.WritePropertyName("allowOverwrite"u8); + writer.WriteBooleanValue(AllowOverwrite.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 + } + } + } + + CopyProjectAuthorizationRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + + internal static CopyProjectAuthorizationRequest DeserializeCopyProjectAuthorizationRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string storageInputContainerName = default; + bool? allowOverwrite = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowOverwrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowOverwrite = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectAuthorizationRequest IPersistableModel.Create(BinaryData 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 DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} 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 CopyProjectAuthorizationRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectAuthorizationRequest(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.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs new file mode 100644 index 000000000000..e09ac95e521e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.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.Conversations.Authoring.Models +{ + /// The CopyProjectAuthorizationRequest. + internal partial class CopyProjectAuthorizationRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind) + { + ProjectKind = projectKind; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// Keeps track of any properties unknown to the library. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind, string storageInputContainerName, bool? allowOverwrite, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + AllowOverwrite = allowOverwrite; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectAuthorizationRequest() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The name of the storage container. + public string StorageInputContainerName { get; } + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + public bool? AllowOverwrite { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs new file mode 100644 index 000000000000..079609f4bae5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CopyProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("targetProjectName"u8); + writer.WriteStringValue(TargetProjectName); + writer.WritePropertyName("accessToken"u8); + writer.WriteStringValue(AccessToken); + writer.WritePropertyName("expiresAt"u8); + writer.WriteStringValue(ExpiresAt, "O"); + writer.WritePropertyName("targetResourceId"u8); + writer.WriteStringValue(TargetResourceId); + writer.WritePropertyName("targetResourceRegion"u8); + writer.WriteStringValue(TargetResourceRegion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + CopyProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectDetails(document.RootElement, options); + } + + internal static CopyProjectDetails DeserializeCopyProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string targetProjectName = default; + string accessToken = default; + DateTimeOffset expiresAt = default; + string targetResourceId = default; + string targetResourceRegion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetProjectName"u8)) + { + targetProjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessToken"u8)) + { + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresAt"u8)) + { + expiresAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("targetResourceId"u8)) + { + targetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceRegion"u8)) + { + targetResourceRegion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectDetails( + projectKind, + targetProjectName, + accessToken, + expiresAt, + targetResourceId, + targetResourceRegion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectDetails IPersistableModel.Create(BinaryData 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 DeserializeCopyProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} 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 CopyProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectDetails(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.Authoring/src/Generated/Models/CopyProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.cs new file mode 100644 index 000000000000..8d0bc4bd02b4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for copying an existing project to another Azure resource. + public partial class CopyProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// , , or is null. + public CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) + { + Argument.AssertNotNull(targetProjectName, nameof(targetProjectName)); + Argument.AssertNotNull(accessToken, nameof(accessToken)); + Argument.AssertNotNull(targetResourceId, nameof(targetResourceId)); + Argument.AssertNotNull(targetResourceRegion, nameof(targetResourceRegion)); + + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// Keeps track of any properties unknown to the library. + internal CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectDetails() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; set; } + /// The project name to be copied-into. + public string TargetProjectName { get; set; } + /// The access token. + public string AccessToken { get; set; } + /// The expiration of the access token. + public DateTimeOffset ExpiresAt { get; set; } + /// Represents the target Azure resource ID. + public string TargetResourceId { get; set; } + /// Represents the target Azure resource region. + public string TargetResourceRegion { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs new file mode 100644 index 000000000000..351975e9b155 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CopyProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + CopyProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectJobState(document.RootElement, options); + } + + internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(CopyProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectJobState IPersistableModel.Create(BinaryData 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 DeserializeCopyProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectJobState)} 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 CopyProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectJobState(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.Authoring/src/Generated/Models/CopyProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.cs new file mode 100644 index 000000000000..affeb356c89a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a copy job. + public partial class CopyProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal CopyProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal CopyProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..a3ff347a4c4e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.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.Conversations.Authoring.Models +{ + public partial class CreateDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + 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 + } + } + } + + CreateDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateDeploymentDetails(document.RootElement, options); + } + + internal static CreateDeploymentDetails DeserializeCreateDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds ?? 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(CreateDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateDeploymentDetails IPersistableModel.Create(BinaryData 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 DeserializeCreateDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} 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 CreateDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateDeploymentDetails(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.Authoring/src/Generated/Models/CreateDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.cs new file mode 100644 index 000000000000..d2968ccadf5a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.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.Conversations.Authoring.Models +{ + /// Represents the options for creating or updating a project deployment. + public partial class CreateDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the trained model label. + /// is null. + public CreateDeploymentDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// Keeps track of any properties unknown to the library. + internal CreateDeploymentDetails(string trainedModelLabel, IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateDeploymentDetails() + { + } + + /// Represents the trained model label. + public string TrainedModelLabel { get; } + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs new file mode 100644 index 000000000000..5d8062fd3505 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CreateProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + CreateProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateProjectDetails(document.RootElement, options); + } + + internal static CreateProjectDetails DeserializeCreateProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + ProjectSettings settings = default; + string storageInputContainerName = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + 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 CreateProjectDetails( + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + 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(CreateProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateProjectDetails IPersistableModel.Create(BinaryData 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 DeserializeCreateProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateProjectDetails)} 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 CreateProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateProjectDetails(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.Authoring/src/Generated/Models/CreateProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.cs new file mode 100644 index 000000000000..3d21a556966e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.cs @@ -0,0 +1,104 @@ +// 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.Authoring.Models +{ + /// Represents the options used to create or update a project. + public partial class CreateProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + /// The new project name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + public CreateProjectDetails(ProjectKind projectKind, string projectName, string language) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(language, nameof(language)); + + ProjectKind = projectKind; + ProjectName = projectName; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal CreateProjectDetails(ProjectKind projectKind, ProjectSettings settings, string storageInputContainerName, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + Settings = settings; + StorageInputContainerName = storageInputContainerName; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateProjectDetails() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The project settings. + public ProjectSettings Settings { get; set; } + /// The storage container name in case of conversation summarization. + public string StorageInputContainerName { get; set; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; set; } + /// The project description. + public string Description { get; set; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..33d8c05f5bcc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.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.Conversations.Authoring.Models +{ + public partial class DeleteDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + 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 + } + } + } + + DeleteDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + + internal static DeleteDeploymentDetails DeserializeDeleteDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeleteDeploymentDetails(assignedResourceIds ?? 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(DeleteDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + DeleteDeploymentDetails IPersistableModel.Create(BinaryData 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 DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} 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 DeleteDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeleteDeploymentDetails(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.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs new file mode 100644 index 000000000000..316e05a21637 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.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.Conversations.Authoring.Models +{ + /// Represents the options for deleting a project deployment. + public partial class DeleteDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeleteDeploymentDetails() + { + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + /// Keeps track of any properties unknown to the library. + internal DeleteDeploymentDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..f2db094604c4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class DeploymentDeleteFromResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + DeploymentDeleteFromResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + + internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDeleteFromResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(DeploymentDeleteFromResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentDeleteFromResourcesJobState IPersistableModel.Create(BinaryData 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 DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} 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 DeploymentDeleteFromResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentDeleteFromResourcesJobState(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.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs new file mode 100644 index 000000000000..4e1ee9ed2c1c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of an existing delete deployment from specific resources job. + public partial class DeploymentDeleteFromResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentDeleteFromResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentDeleteFromResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentDeleteFromResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs new file mode 100644 index 000000000000..bc975cd541a8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class DeploymentJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + DeploymentJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentJobState(document.RootElement, options); + } + + internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(DeploymentJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentJobState IPersistableModel.Create(BinaryData 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 DeserializeDeploymentJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentJobState)} 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 DeploymentJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentJobState(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.Authoring/src/Generated/Models/DeploymentJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.cs new file mode 100644 index 000000000000..3b027b6d8460 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class DeploymentJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs new file mode 100644 index 000000000000..9b3584664355 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.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.Conversations.Authoring.Models +{ + public partial class DeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + DeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentResource(document.RootElement, options); + } + + internal static DeploymentResource DeserializeDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentResource(resourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + DeploymentResource IPersistableModel.Create(BinaryData 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 DeserializeDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentResource)} 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 DeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentResource(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.Authoring/src/Generated/Models/DeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.cs new file mode 100644 index 000000000000..3f4266909d51 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.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.Conversations.Authoring.Models +{ + /// Represents an Azure resource assigned to a deployment. + public partial class DeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// or is null. + internal DeploymentResource(string resourceId, string region) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + Argument.AssertNotNull(region, nameof(region)); + + ResourceId = resourceId; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal DeploymentResource(string resourceId, string region, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentResource() + { + } + + /// Represents the Azure resource Id. + public string ResourceId { get; } + /// Represents the resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..c868942c403f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class DeploymentResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + DeploymentResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentResourcesJobState(document.RootElement, options); + } + + internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(DeploymentResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentResourcesJobState IPersistableModel.Create(BinaryData 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 DeserializeDeploymentResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} 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 DeploymentResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentResourcesJobState(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.Authoring/src/Generated/Models/DeploymentResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.cs new file mode 100644 index 000000000000..1448217b4dbd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a deployment resources job. + public partial class DeploymentResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..c47755962689 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class EntitiesEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("entities"u8); + writer.WriteStartObject(); + foreach (var item in Entities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + EntitiesEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntitiesEvaluationSummary(document.RootElement, options); + } + + internal static EntitiesEvaluationSummary DeserializeEntitiesEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary entities = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("entities"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, EntityEvaluationSummary.DeserializeEntityEvaluationSummary(property0.Value, options)); + } + entities = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntitiesEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntitiesEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeEntitiesEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} 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 EntitiesEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntitiesEvaluationSummary(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.Authoring/src/Generated/Models/EntitiesEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.cs new file mode 100644 index 000000000000..1ba5c2a42ed7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.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.Conversations.Authoring.Models +{ + /// Represents the evaluation result summary for the project's entities. + public partial class EntitiesEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal EntitiesEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(entities, nameof(entities)); + + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal EntitiesEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntitiesEvaluationSummary() + { + } + + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the entities evaluation summary. + public IReadOnlyDictionary Entities { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..878ad1dcd845 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EntityEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + EntityEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityEvaluationSummary(document.RootElement, options); + } + + internal static EntityEvaluationSummary DeserializeEntityEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntityEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeEntityEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} 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 EntityEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityEvaluationSummary(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.Authoring/src/Generated/Models/EntityEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.cs new file mode 100644 index 000000000000..131743f41f7b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation result for an entity. + public partial class EntityEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntityEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ErrorCode.cs new file mode 100644 index 000000000000..977595b99c5f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ErrorCode.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.Conversations.Authoring.Models +{ + /// Human-readable error code. + public readonly partial struct ErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ErrorCode(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"; + + /// InvalidRequest. + public static ErrorCode InvalidRequest { get; } = new ErrorCode(InvalidRequestValue); + /// InvalidArgument. + public static ErrorCode InvalidArgument { get; } = new ErrorCode(InvalidArgumentValue); + /// Unauthorized. + public static ErrorCode Unauthorized { get; } = new ErrorCode(UnauthorizedValue); + /// Forbidden. + public static ErrorCode Forbidden { get; } = new ErrorCode(ForbiddenValue); + /// NotFound. + public static ErrorCode NotFound { get; } = new ErrorCode(NotFoundValue); + /// ProjectNotFound. + public static ErrorCode ProjectNotFound { get; } = new ErrorCode(ProjectNotFoundValue); + /// OperationNotFound. + public static ErrorCode OperationNotFound { get; } = new ErrorCode(OperationNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static ErrorCode AzureCognitiveSearchNotFound { get; } = new ErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchIndexNotFound. + public static ErrorCode AzureCognitiveSearchIndexNotFound { get; } = new ErrorCode(AzureCognitiveSearchIndexNotFoundValue); + /// TooManyRequests. + public static ErrorCode TooManyRequests { get; } = new ErrorCode(TooManyRequestsValue); + /// AzureCognitiveSearchThrottling. + public static ErrorCode AzureCognitiveSearchThrottling { get; } = new ErrorCode(AzureCognitiveSearchThrottlingValue); + /// AzureCognitiveSearchIndexLimitReached. + public static ErrorCode AzureCognitiveSearchIndexLimitReached { get; } = new ErrorCode(AzureCognitiveSearchIndexLimitReachedValue); + /// InternalServerError. + public static ErrorCode InternalServerError { get; } = new ErrorCode(InternalServerErrorValue); + /// ServiceUnavailable. + public static ErrorCode ServiceUnavailable { get; } = new ErrorCode(ServiceUnavailableValue); + /// Timeout. + public static ErrorCode Timeout { get; } = new ErrorCode(TimeoutValue); + /// QuotaExceeded. + public static ErrorCode QuotaExceeded { get; } = new ErrorCode(QuotaExceededValue); + /// Conflict. + public static ErrorCode Conflict { get; } = new ErrorCode(ConflictValue); + /// Warning. + 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); + /// Determines if two values are not the same. + public static bool operator !=(ErrorCode left, ErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ErrorCode(string value) => new ErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ErrorCode other && Equals(other); + /// + public bool Equals(ErrorCode other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs new file mode 100644 index 000000000000..2a72e648962b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EvaluationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } + if (Optional.IsDefined(TrainingSplitPercentage)) + { + writer.WritePropertyName("trainingSplitPercentage"u8); + writer.WriteNumberValue(TrainingSplitPercentage.Value); + } + if (Optional.IsDefined(TestingSplitPercentage)) + { + writer.WritePropertyName("testingSplitPercentage"u8); + writer.WriteNumberValue(TestingSplitPercentage.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 + } + } + } + + EvaluationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationDetails(document.RootElement, options); + } + + internal static EvaluationDetails DeserializeEvaluationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationKind? kind = default; + int? trainingSplitPercentage = default; + int? testingSplitPercentage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new EvaluationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("testingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + testingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationDetails(kind, trainingSplitPercentage, testingSplitPercentage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{options.Format}' format."); + } + } + + EvaluationDetails IPersistableModel.Create(BinaryData 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 DeserializeEvaluationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} 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 EvaluationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationDetails(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.Authoring/src/Generated/Models/EvaluationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.cs new file mode 100644 index 000000000000..c843e5d23f9b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.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.Conversations.Authoring.Models +{ + /// Represents the options used running the evaluation. + public partial class EvaluationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EvaluationDetails() + { + } + + /// Initializes a new instance of . + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationDetails(EvaluationKind? kind, int? trainingSplitPercentage, int? testingSplitPercentage, IDictionary serializedAdditionalRawData) + { + Kind = kind; + TrainingSplitPercentage = trainingSplitPercentage; + TestingSplitPercentage = testingSplitPercentage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + public EvaluationKind? Kind { get; set; } + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TrainingSplitPercentage { get; set; } + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TestingSplitPercentage { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs new file mode 100644 index 000000000000..a42d020c0f60 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.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.Conversations.Authoring.Models +{ + public partial class EvaluationJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + EvaluationJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobResult(document.RootElement, options); + } + + internal static EvaluationJobResult DeserializeEvaluationJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationDetails evaluationOptions = default; + string modelLabel = default; + string trainingConfigVersion = default; + int percentComplete = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobResult IPersistableModel.Create(BinaryData 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 DeserializeEvaluationJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} 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 EvaluationJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobResult(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.Authoring/src/Generated/Models/EvaluationJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.cs new file mode 100644 index 000000000000..66c98233abbd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.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.AI.Language.Conversations.Authoring.Models +{ + /// The EvaluationJobResult. + public partial class EvaluationJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// , or is null. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete, IDictionary serializedAdditionalRawData) + { + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobResult() + { + } + + /// Represents the options used running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents progress percentage. + public int PercentComplete { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs new file mode 100644 index 000000000000..724796e50c91 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EvaluationJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, 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 + } + } + } + + EvaluationJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobState(document.RootElement, options); + } + + internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + EvaluationJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = EvaluationJobResult.DeserializeEvaluationJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobState IPersistableModel.Create(BinaryData 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 DeserializeEvaluationJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} 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 EvaluationJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobState(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.Authoring/src/Generated/Models/EvaluationJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.cs new file mode 100644 index 000000000000..fba4e55b822e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a evaluation job. + public partial class EvaluationJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents evaluation task detailed result. + /// is null. + internal EvaluationJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, EvaluationJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, EvaluationJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents evaluation task detailed result. + public EvaluationJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationKind.cs new file mode 100644 index 000000000000..9b1349bc8470 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationKind.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.Conversations.Authoring.Models +{ + /// The EvaluationKind. + public readonly partial struct EvaluationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EvaluationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PercentageValue = "percentage"; + private const string ManualValue = "manual"; + + /// Split the data into training and test sets according to user-defined percentages. + public static EvaluationKind Percentage { get; } = new EvaluationKind(PercentageValue); + /// Split the data according to the chosen dataset for every example in the data. + public static EvaluationKind Manual { get; } = new EvaluationKind(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(EvaluationKind left, EvaluationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EvaluationKind left, EvaluationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EvaluationKind(string value) => new EvaluationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EvaluationKind other && Equals(other); + /// + public bool Equals(EvaluationKind other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..a0f36f651de7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.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.AI.Language.Conversations.Authoring.Models +{ + public partial class EvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("entitiesEvaluation"u8); + writer.WriteObjectValue(EntitiesEvaluation, options); + writer.WritePropertyName("intentsEvaluation"u8); + writer.WriteObjectValue(IntentsEvaluation, options); + if (Optional.IsDefined(EvaluationOptions)) + { + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, 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 + } + } + } + + EvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationSummary(document.RootElement, options); + } + + internal static EvaluationSummary DeserializeEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EntitiesEvaluationSummary entitiesEvaluation = default; + IntentsEvaluationSummary intentsEvaluation = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entitiesEvaluation"u8)) + { + entitiesEvaluation = EntitiesEvaluationSummary.DeserializeEntitiesEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("intentsEvaluation"u8)) + { + intentsEvaluation = IntentsEvaluationSummary.DeserializeIntentsEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationSummary(entitiesEvaluation, intentsEvaluation, evaluationOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} 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 EvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationSummary(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.Authoring/src/Generated/Models/EvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.cs new file mode 100644 index 000000000000..94a75419a4d3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation result summary. + public partial class EvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 data related to entities evaluation. + /// Contains the data related to intents evaluation. + /// or is null. + internal EvaluationSummary(EntitiesEvaluationSummary entitiesEvaluation, IntentsEvaluationSummary intentsEvaluation) + { + Argument.AssertNotNull(entitiesEvaluation, nameof(entitiesEvaluation)); + Argument.AssertNotNull(intentsEvaluation, nameof(intentsEvaluation)); + + EntitiesEvaluation = entitiesEvaluation; + IntentsEvaluation = intentsEvaluation; + } + + /// Initializes a new instance of . + /// Contains the data related to entities evaluation. + /// Contains the data related to intents evaluation. + /// The options that were used while running the evaluation. + /// Keeps track of any properties unknown to the library. + internal EvaluationSummary(EntitiesEvaluationSummary entitiesEvaluation, IntentsEvaluationSummary intentsEvaluation, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) + { + EntitiesEvaluation = entitiesEvaluation; + IntentsEvaluation = intentsEvaluation; + EvaluationOptions = evaluationOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationSummary() + { + } + + /// Contains the data related to entities evaluation. + public EntitiesEvaluationSummary EntitiesEvaluation { get; } + /// Contains the data related to intents evaluation. + public IntentsEvaluationSummary IntentsEvaluation { get; } + /// The options that were used while running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..954191e78e64 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResultUrl)) + { + writer.WritePropertyName("resultUrl"u8); + writer.WriteStringValue(ResultUrl); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportProjectJobState(document.RootElement, options); + } + + internal static ExportProjectJobState DeserializeExportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + string resultUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("resultUrl"u8)) + { + resultUrl = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + resultUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportProjectJobState IPersistableModel.Create(BinaryData 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 DeserializeExportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} 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 ExportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportProjectJobState(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.Authoring/src/Generated/Models/ExportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.cs new file mode 100644 index 000000000000..3ba56b46d8d9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of an export job. + public partial class ExportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// Keeps track of any properties unknown to the library. + internal ExportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, string resultUrl, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + ResultUrl = resultUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// The URL to use in order to download the exported project. + public string ResultUrl { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.Serialization.cs new file mode 100644 index 000000000000..41c601cc632d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.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.Conversations.Authoring.Models +{ + public partial class ExportedConversationOrchestration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedConversationOrchestration)} does not support writing '{format}' format."); + } + + 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 + } + } + } + + ExportedConversationOrchestration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedConversationOrchestration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedConversationOrchestration(document.RootElement, options); + } + + internal static ExportedConversationOrchestration DeserializeExportedConversationOrchestration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectName = default; + string deploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedConversationOrchestration(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(ExportedConversationOrchestration)} does not support writing '{options.Format}' format."); + } + } + + ExportedConversationOrchestration IPersistableModel.Create(BinaryData 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 DeserializeExportedConversationOrchestration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedConversationOrchestration)} 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 ExportedConversationOrchestration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedConversationOrchestration(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/CustomSentimentAnalysisActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.cs similarity index 54% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.cs index c5ab770779f8..f57a2d7bf8e4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Conversations.Authoring.Models { - /// Supported parameters for a Custom Sentiment Analysis task. - public partial class CustomSentimentAnalysisActionContent + /// Defines the orchestration details for a Conversational project target. + public partial class ExportedConversationOrchestration { /// /// Keeps track of any properties unknown to the library. @@ -45,11 +45,11 @@ 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. + /// Initializes a new instance of . + /// The name of the targeted project. + /// The name of the targeted deployment. /// or is null. - public CustomSentimentAnalysisActionContent(string projectName, string deploymentName) + public ExportedConversationOrchestration(string projectName, string deploymentName) { Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(deploymentName, nameof(deploymentName)); @@ -58,33 +58,25 @@ public CustomSentimentAnalysisActionContent(string projectName, string deploymen 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. + /// Initializes a new instance of . + /// The name of the targeted project. + /// The name of the targeted deployment. /// Keeps track of any properties unknown to the library. - internal CustomSentimentAnalysisActionContent(bool? loggingOptOut, string projectName, string deploymentName, StringIndexType? stringIndexType, IDictionary serializedAdditionalRawData) + internal ExportedConversationOrchestration(string projectName, string deploymentName, IDictionary serializedAdditionalRawData) { - LoggingOptOut = loggingOptOut; ProjectName = projectName; DeploymentName = deploymentName; - StringIndexType = stringIndexType; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisActionContent() + /// Initializes a new instance of for deserialization. + internal ExportedConversationOrchestration() { } - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// This field indicates the project name for the model. + /// The name of the targeted project. public string ProjectName { get; } - /// This field indicates the deployment name for the model. + /// The name of the targeted deployment. public string DeploymentName { get; } - /// Specifies the method used to interpret string offsets. - public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..a9ce67575e81 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedConversationOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedConversationOrchestrationDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("conversationOrchestration"u8); + writer.WriteObjectValue(ConversationOrchestration, options); + } + + ExportedConversationOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedConversationOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedConversationOrchestrationDetails(document.RootElement, options); + } + + internal static ExportedConversationOrchestrationDetails DeserializeExportedConversationOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedConversationOrchestration conversationOrchestration = default; + OrchestrationTargetProjectKind targetProjectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("conversationOrchestration"u8)) + { + conversationOrchestration = ExportedConversationOrchestration.DeserializeExportedConversationOrchestration(property.Value, options); + continue; + } + if (property.NameEquals("targetProjectKind"u8)) + { + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedConversationOrchestrationDetails(targetProjectKind, serializedAdditionalRawData, conversationOrchestration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedConversationOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedConversationOrchestrationDetails IPersistableModel.Create(BinaryData 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 DeserializeExportedConversationOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedConversationOrchestrationDetails)} 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 ExportedConversationOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedConversationOrchestrationDetails(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.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.cs new file mode 100644 index 000000000000..5608bc103013 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.cs @@ -0,0 +1,44 @@ +// 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.Authoring.Models +{ + /// Represents the orchestration options for a Conversational project target. + public partial class ExportedConversationOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// The Conversational project target details. + /// is null. + public ExportedConversationOrchestrationDetails(ExportedConversationOrchestration conversationOrchestration) + { + Argument.AssertNotNull(conversationOrchestration, nameof(conversationOrchestration)); + + TargetProjectKind = OrchestrationTargetProjectKind.Conversation; + ConversationOrchestration = conversationOrchestration; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The Conversational project target details. + internal ExportedConversationOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData, ExportedConversationOrchestration conversationOrchestration) : base(targetProjectKind, serializedAdditionalRawData) + { + ConversationOrchestration = conversationOrchestration; + } + + /// Initializes a new instance of for deserialization. + internal ExportedConversationOrchestrationDetails() + { + } + + /// The Conversational project target details. + public ExportedConversationOrchestration ConversationOrchestration { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs new file mode 100644 index 000000000000..31982aed6e1b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.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.Conversations.Authoring.Models +{ + public partial class ExportedEntityList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Sublists)) + { + writer.WritePropertyName("sublists"u8); + writer.WriteStartArray(); + foreach (var item in Sublists) + { + 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 + } + } + } + + ExportedEntityList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityList(document.RootElement, options); + } + + internal static ExportedEntityList DeserializeExportedEntityList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sublists = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sublists"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntitySublist.DeserializeExportedEntitySublist(item, options)); + } + sublists = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityList(sublists ?? 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(ExportedEntityList)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityList IPersistableModel.Create(BinaryData 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 DeserializeExportedEntityList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityList)} 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 ExportedEntityList FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityList(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.Authoring/src/Generated/Models/ExportedEntityList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.cs new file mode 100644 index 000000000000..cfe3c92bcbc9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.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.Conversations.Authoring.Models +{ + /// Represents a list component of an entity. + public partial class ExportedEntityList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityList() + { + Sublists = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The sub-lists of the list component. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityList(IList sublists, IDictionary serializedAdditionalRawData) + { + Sublists = sublists; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The sub-lists of the list component. + public IList Sublists { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs new file mode 100644 index 000000000000..d004442e624e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedEntityListSynonym : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + 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 + } + } + } + + ExportedEntityListSynonym IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityListSynonym(document.RootElement, options); + } + + internal static ExportedEntityListSynonym DeserializeExportedEntityListSynonym(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string language = default; + IList values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + values = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityListSynonym(language, values ?? 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(ExportedEntityListSynonym)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityListSynonym IPersistableModel.Create(BinaryData 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 DeserializeExportedEntityListSynonym(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} 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 ExportedEntityListSynonym FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityListSynonym(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.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs new file mode 100644 index 000000000000..2ba86e1499c0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of synonyms inside a list component. + public partial class ExportedEntityListSynonym + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityListSynonym() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The list of synonyms. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityListSynonym(string language, IList values, IDictionary serializedAdditionalRawData) + { + Language = language; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The list of synonyms. + public IList Values { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.Serialization.cs new file mode 100644 index 000000000000..fa55b4f257a9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.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.Conversations.Authoring.Models +{ + public partial class ExportedEntityRegex : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityRegex)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Expressions)) + { + writer.WritePropertyName("expressions"u8); + writer.WriteStartArray(); + foreach (var item in Expressions) + { + 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 + } + } + } + + ExportedEntityRegex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityRegex)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityRegex(document.RootElement, options); + } + + internal static ExportedEntityRegex DeserializeExportedEntityRegex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList expressions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expressions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntityRegexExpression.DeserializeExportedEntityRegexExpression(item, options)); + } + expressions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityRegex(expressions ?? 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(ExportedEntityRegex)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityRegex IPersistableModel.Create(BinaryData 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 DeserializeExportedEntityRegex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityRegex)} 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 ExportedEntityRegex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityRegex(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.Authoring/src/Generated/Models/ExportedEntityRegex.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.cs new file mode 100644 index 000000000000..078e0e0daf90 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.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.Conversations.Authoring.Models +{ + /// Represents a regex component of an entity. + public partial class ExportedEntityRegex + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityRegex() + { + Expressions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The regex expressions of the regex component. These expressions follow the .NET regex syntax. For reference, check here: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityRegex(IList expressions, IDictionary serializedAdditionalRawData) + { + Expressions = expressions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The regex expressions of the regex component. These expressions follow the .NET regex syntax. For reference, check here: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions. + public IList Expressions { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.Serialization.cs similarity index 55% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.Serialization.cs index 3e92247d7a2d..2d8b82b34d22 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class CustomHealthcareActionContent : IUtf8JsonSerializable, IJsonModel + public partial class ExportedEntityRegexExpression : 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,25 +28,26 @@ 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(ExportedEntityRegexExpression)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LoggingOptOut)) + if (Optional.IsDefined(RegexKey)) { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); + writer.WritePropertyName("regexKey"u8); + writer.WriteStringValue(RegexKey); } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (Optional.IsDefined(StringIndexType)) + if (Optional.IsDefined(Language)) { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(RegexPattern)) + { + writer.WritePropertyName("regexPattern"u8); + writer.WriteStringValue(RegexPattern); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -65,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomHealthcareActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportedEntityRegexExpression 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(ExportedEntityRegexExpression)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareActionContent(document.RootElement, options); + return DeserializeExportedEntityRegexExpression(document.RootElement, options); } - internal static CustomHealthcareActionContent DeserializeCustomHealthcareActionContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportedEntityRegexExpression DeserializeExportedEntityRegexExpression(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -85,40 +86,26 @@ internal static CustomHealthcareActionContent DeserializeCustomHealthcareActionC { return null; } - bool? loggingOptOut = default; - string projectName = default; - string deploymentName = default; - StringIndexType? stringIndexType = default; + string regexKey = default; + string language = default; + string regexPattern = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("loggingOptOut"u8)) + if (property.NameEquals("regexKey"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); + regexKey = property.Value.GetString(); continue; } - if (property.NameEquals("projectName"u8)) + if (property.NameEquals("language"u8)) { - projectName = property.Value.GetString(); + language = property.Value.GetString(); continue; } - if (property.NameEquals("deploymentName"u8)) + if (property.NameEquals("regexPattern"u8)) { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); + regexPattern = property.Value.GetString(); continue; } if (options.Format != "W") @@ -127,46 +114,46 @@ internal static CustomHealthcareActionContent DeserializeCustomHealthcareActionC } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData); + return new ExportedEntityRegexExpression(regexKey, language, regexPattern, 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(ExportedEntityRegexExpression)} does not support writing '{options.Format}' format."); } } - CustomHealthcareActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedEntityRegexExpression 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 DeserializeExportedEntityRegexExpression(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedEntityRegexExpression)} 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 ExportedEntityRegexExpression FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareActionContent(document.RootElement); + return DeserializeExportedEntityRegexExpression(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.cs new file mode 100644 index 000000000000..7237a35366ba --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.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.Conversations.Authoring.Models +{ + /// Represents a regex expression inside a regex component. This expression follows the .NET regex syntax. For reference, check here: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions. + public partial class ExportedEntityRegexExpression + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityRegexExpression() + { + } + + /// Initializes a new instance of . + /// The key of the regex expression. + /// Represents the language of the regex expression. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The regex pattern. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityRegexExpression(string regexKey, string language, string regexPattern, IDictionary serializedAdditionalRawData) + { + RegexKey = regexKey; + Language = language; + RegexPattern = regexPattern; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key of the regex expression. + public string RegexKey { get; set; } + /// Represents the language of the regex expression. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The regex pattern. + public string RegexPattern { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs new file mode 100644 index 000000000000..f92a3ac58325 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedEntitySublist : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ListKey)) + { + writer.WritePropertyName("listKey"u8); + writer.WriteStringValue(ListKey); + } + if (Optional.IsCollectionDefined(Synonyms)) + { + writer.WritePropertyName("synonyms"u8); + writer.WriteStartArray(); + foreach (var item in Synonyms) + { + 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 + } + } + } + + ExportedEntitySublist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntitySublist(document.RootElement, options); + } + + internal static ExportedEntitySublist DeserializeExportedEntitySublist(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string listKey = default; + IList synonyms = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("listKey"u8)) + { + listKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("synonyms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntityListSynonym.DeserializeExportedEntityListSynonym(item, options)); + } + synonyms = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntitySublist(listKey, synonyms ?? 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(ExportedEntitySublist)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntitySublist IPersistableModel.Create(BinaryData 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 DeserializeExportedEntitySublist(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntitySublist)} 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 ExportedEntitySublist FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntitySublist(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.Authoring/src/Generated/Models/ExportedEntitySublist.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.cs new file mode 100644 index 000000000000..1b8e6399c72f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents a sub-list inside a list component. + public partial class ExportedEntitySublist + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntitySublist() + { + Synonyms = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The key of the sub-list. + /// The phrases of that correspond to the sub-list. + /// Keeps track of any properties unknown to the library. + internal ExportedEntitySublist(string listKey, IList synonyms, IDictionary serializedAdditionalRawData) + { + ListKey = listKey; + Synonyms = synonyms; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key of the sub-list. + public string ListKey { get; set; } + /// The phrases of that correspond to the sub-list. + public IList Synonyms { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.Serialization.cs new file mode 100644 index 000000000000..423733bd7bc6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedLuisOrchestration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appId"u8); + writer.WriteStringValue(AppId); + if (Optional.IsDefined(AppVersion)) + { + writer.WritePropertyName("appVersion"u8); + writer.WriteStringValue(AppVersion); + } + if (Optional.IsDefined(SlotName)) + { + writer.WritePropertyName("slotName"u8); + writer.WriteStringValue(SlotName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedLuisOrchestration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedLuisOrchestration(document.RootElement, options); + } + + internal static ExportedLuisOrchestration DeserializeExportedLuisOrchestration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid appId = default; + string appVersion = default; + string slotName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appId"u8)) + { + appId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("appVersion"u8)) + { + appVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("slotName"u8)) + { + slotName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedLuisOrchestration(appId, appVersion, slotName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} does not support writing '{options.Format}' format."); + } + } + + ExportedLuisOrchestration IPersistableModel.Create(BinaryData 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 DeserializeExportedLuisOrchestration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} 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 ExportedLuisOrchestration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedLuisOrchestration(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.Authoring/src/Generated/Models/ExportedLuisOrchestration.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.cs new file mode 100644 index 000000000000..54f3c5b3567d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.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.Conversations.Authoring.Models +{ + /// Defines the orchestration details for a LUIS application target. + public partial class ExportedLuisOrchestration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 LUIS application ID. + public ExportedLuisOrchestration(Guid appId) + { + AppId = appId; + } + + /// Initializes a new instance of . + /// The LUIS application ID. + /// The targeted version Id. + /// The targeted slot name. + /// Keeps track of any properties unknown to the library. + internal ExportedLuisOrchestration(Guid appId, string appVersion, string slotName, IDictionary serializedAdditionalRawData) + { + AppId = appId; + AppVersion = appVersion; + SlotName = slotName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedLuisOrchestration() + { + } + + /// The LUIS application ID. + public Guid AppId { get; } + /// The targeted version Id. + public string AppVersion { get; set; } + /// The targeted slot name. + public string SlotName { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..7b9f2c6942fc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedLuisOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedLuisOrchestrationDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("luisOrchestration"u8); + writer.WriteObjectValue(LuisOrchestration, options); + } + + ExportedLuisOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedLuisOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedLuisOrchestrationDetails(document.RootElement, options); + } + + internal static ExportedLuisOrchestrationDetails DeserializeExportedLuisOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedLuisOrchestration luisOrchestration = default; + OrchestrationTargetProjectKind targetProjectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("luisOrchestration"u8)) + { + luisOrchestration = ExportedLuisOrchestration.DeserializeExportedLuisOrchestration(property.Value, options); + continue; + } + if (property.NameEquals("targetProjectKind"u8)) + { + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedLuisOrchestrationDetails(targetProjectKind, serializedAdditionalRawData, luisOrchestration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedLuisOrchestrationDetails IPersistableModel.Create(BinaryData 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 DeserializeExportedLuisOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestrationDetails)} 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 ExportedLuisOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedLuisOrchestrationDetails(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.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.cs new file mode 100644 index 000000000000..a8f05290d6be --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.cs @@ -0,0 +1,44 @@ +// 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.Authoring.Models +{ + /// Represents the orchestration options for a LUIS application target. + public partial class ExportedLuisOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// The LUIS application target details. + /// is null. + public ExportedLuisOrchestrationDetails(ExportedLuisOrchestration luisOrchestration) + { + Argument.AssertNotNull(luisOrchestration, nameof(luisOrchestration)); + + TargetProjectKind = OrchestrationTargetProjectKind.Luis; + LuisOrchestration = luisOrchestration; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The LUIS application target details. + internal ExportedLuisOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData, ExportedLuisOrchestration luisOrchestration) : base(targetProjectKind, serializedAdditionalRawData) + { + LuisOrchestration = luisOrchestration; + } + + /// Initializes a new instance of for deserialization. + internal ExportedLuisOrchestrationDetails() + { + } + + /// The LUIS application target details. + public ExportedLuisOrchestration LuisOrchestration { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs new file mode 100644 index 000000000000..d013d638887f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedModelDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedModelDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelDetails(document.RootElement, options); + } + + internal static ExportedModelDetails DeserializeExportedModelDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelDetails(trainedModelLabel, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelDetails IPersistableModel.Create(BinaryData 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 DeserializeExportedModelDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} 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 ExportedModelDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelDetails(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.Authoring/src/Generated/Models/ExportedModelDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.cs new file mode 100644 index 000000000000..8a3b7c00553f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for creating or replacing an exported model. + public partial class ExportedModelDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 trained model label. + /// is null. + public ExportedModelDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + } + + /// Initializes a new instance of . + /// The trained model label. + /// Keeps track of any properties unknown to the library. + internal ExportedModelDetails(string trainedModelLabel, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelDetails() + { + } + + /// The trained model label. + public string TrainedModelLabel { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs new file mode 100644 index 000000000000..2d5ee327c04c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedModelJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + ExportedModelJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelJobState(document.RootElement, options); + } + + internal static ExportedModelJobState DeserializeExportedModelJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(ExportedModelJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelJobState IPersistableModel.Create(BinaryData 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 DeserializeExportedModelJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelJobState)} 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 ExportedModelJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelJobState(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.Authoring/src/Generated/Models/ExportedModelJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.cs new file mode 100644 index 000000000000..639c21edbf42 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a job to create or updated an exported model. + public partial class ExportedModelJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportedModelJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ExportedModelJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..e02847527d4a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.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.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownExportedOrchestrationDetails))] + public partial class ExportedOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.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 + } + } + } + + ExportedOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + + internal static ExportedOrchestrationDetails DeserializeExportedOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("targetProjectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Conversation": return ExportedConversationOrchestrationDetails.DeserializeExportedConversationOrchestrationDetails(element, options); + case "Luis": return ExportedLuisOrchestrationDetails.DeserializeExportedLuisOrchestrationDetails(element, options); + case "QuestionAnswering": return ExportedQuestionAnsweringOrchestrationDetails.DeserializeExportedQuestionAnsweringOrchestrationDetails(element, options); + } + } + return UnknownExportedOrchestrationDetails.DeserializeUnknownExportedOrchestrationDetails(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(ExportedOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedOrchestrationDetails IPersistableModel.Create(BinaryData 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 DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} 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 ExportedOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedOrchestrationDetails(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.Authoring/src/Generated/Models/ExportedOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.cs new file mode 100644 index 000000000000..3316c6506c99 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.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.Authoring.Models +{ + /// + /// Represents the options used to define the orchestration behavior of an intent. + /// 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 ExportedOrchestrationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload 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 ExportedOrchestrationDetails() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData) + { + TargetProjectKind = targetProjectKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the target project kind. + internal OrchestrationTargetProjectKind TargetProjectKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..a217e3a5eaf3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedPrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedPrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + + internal static ExportedPrebuiltEntity DeserializeExportedPrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedPrebuiltEntity(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedPrebuiltEntity IPersistableModel.Create(BinaryData 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 DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} 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 ExportedPrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedPrebuiltEntity(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.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs new file mode 100644 index 000000000000..a5055390057e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported prebuilt entity component. + public partial class ExportedPrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 prebuilt entity category. + /// is null. + public ExportedPrebuiltEntity(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// Keeps track of any properties unknown to the library. + internal ExportedPrebuiltEntity(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedPrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.Serialization.cs new file mode 100644 index 000000000000..c27bdef7d60f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedProject : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectFileVersion"u8); + writer.WriteStringValue(ProjectFileVersion); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.ToString()); + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + if (Optional.IsDefined(Assets)) + { + writer.WritePropertyName("assets"u8); + writer.WriteObjectValue(Assets, 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 + } + } + } + + ExportedProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProject(document.RootElement, options); + } + + internal static ExportedProject DeserializeExportedProject(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectFileVersion = default; + StringIndexType stringIndexType = default; + CreateProjectDetails metadata = default; + ExportedProjectAssets assets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectFileVersion"u8)) + { + projectFileVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("stringIndexType"u8)) + { + stringIndexType = new StringIndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + metadata = CreateProjectDetails.DeserializeCreateProjectDetails(property.Value, options); + continue; + } + if (property.NameEquals("assets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + assets = ExportedProjectAssets.DeserializeExportedProjectAssets(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{options.Format}' format."); + } + } + + ExportedProject IPersistableModel.Create(BinaryData 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 DeserializeExportedProject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProject)} 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 ExportedProject FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProject(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.Authoring/src/Generated/Models/ExportedProject.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.cs new file mode 100644 index 000000000000..75bdf301aa5e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.cs @@ -0,0 +1,100 @@ +// 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.Authoring.Models +{ + /// Represents an exported project. + public partial class ExportedProject + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// or is null. + public ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata) + { + Argument.AssertNotNull(projectFileVersion, nameof(projectFileVersion)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata, ExportedProjectAssets assets, IDictionary serializedAdditionalRawData) + { + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + Assets = assets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedProject() + { + } + + /// The version of the exported file. + public string ProjectFileVersion { get; } + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + public StringIndexType StringIndexType { get; } + /// Represents the project metadata. + public CreateProjectDetails Metadata { get; } + /// + /// Represents the project assets. + /// 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 ExportedProjectAssets Assets { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..6fe2e7b2ffc0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.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.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownExportedProjectAssets))] + public partial class ExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.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 + } + } + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static ExportedProjectAssets DeserializeExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Conversation": return ConversationExportedProjectAssets.DeserializeConversationExportedProjectAssets(element, options); + case "Orchestration": return OrchestrationExportedProjectAssets.DeserializeOrchestrationExportedProjectAssets(element, options); + } + } + return UnknownExportedProjectAssets.DeserializeUnknownExportedProjectAssets(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(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} 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 ExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProjectAssets(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.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.cs index d0faa0838e2c..c039092126af 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.cs @@ -8,14 +8,14 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Conversations.Authoring.Models { /// - /// 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 . + /// Represents the assets of an exported project. + /// 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 ExportedProjectAssets { /// /// 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 ExportedProjectAssets() { } - /// Initializes a new instance of . - /// Kind of entity component. + /// Initializes a new instance of . + /// The type of project containing the assets. /// Keeps track of any properties unknown to the library. - internal EntityComponentInformation(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData) + internal ExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) { - EntityComponentKind = entityComponentKind; + ProjectKind = projectKind; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Kind of entity component. - internal EntityComponentKind EntityComponentKind { get; set; } + /// The type of project containing the assets. + internal ProjectKind ProjectKind { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectFormat.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectFormat.cs new file mode 100644 index 000000000000..2792adaccde8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectFormat.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.Conversations.Authoring.Models +{ + /// The ExportedProjectFormat. + public readonly partial struct ExportedProjectFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExportedProjectFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ConversationValue = "Conversation"; + private const string LuisValue = "Luis"; + + /// Specifies the format for a conversational project. + public static ExportedProjectFormat Conversation { get; } = new ExportedProjectFormat(ConversationValue); + /// Specifies the format for an application that was exported from LUIS. + public static ExportedProjectFormat Luis { get; } = new ExportedProjectFormat(LuisValue); + /// Determines if two values are the same. + public static bool operator ==(ExportedProjectFormat left, ExportedProjectFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExportedProjectFormat left, ExportedProjectFormat right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExportedProjectFormat(string value) => new ExportedProjectFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExportedProjectFormat other && Equals(other); + /// + public bool Equals(ExportedProjectFormat other) => string.Equals(_value, other._value, StringComparison.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.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.Serialization.cs similarity index 54% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.Serialization.cs index 6ed0d4ba2057..ab72de03ab0b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class AnalyzeTextDynamicClassificationResult : IUtf8JsonSerializable, IJsonModel + public partial class ExportedQuestionAnsweringOrchestration : 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,32 +26,46 @@ void IJsonModel.Write(Utf8JsonWriter wri /// 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(AnalyzeTextDynamicClassificationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestration)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results, options); + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } } - AnalyzeTextDynamicClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportedQuestionAnsweringOrchestration 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(ExportedQuestionAnsweringOrchestration)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement, options); + return DeserializeExportedQuestionAnsweringOrchestration(document.RootElement, options); } - internal static AnalyzeTextDynamicClassificationResult DeserializeAnalyzeTextDynamicClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportedQuestionAnsweringOrchestration DeserializeExportedQuestionAnsweringOrchestration(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -59,20 +73,14 @@ internal static AnalyzeTextDynamicClassificationResult DeserializeAnalyzeTextDyn { return null; } - DynamicClassificationResult results = default; - AnalyzeTextResultsKind kind = default; + string projectName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("results"u8)) - { - results = DynamicClassificationResult.DeserializeDynamicClassificationResult(property.Value, options); - continue; - } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("projectName"u8)) { - kind = new AnalyzeTextResultsKind(property.Value.GetString()); + projectName = property.Value.GetString(); continue; } if (options.Format != "W") @@ -81,50 +89,50 @@ internal static AnalyzeTextDynamicClassificationResult DeserializeAnalyzeTextDyn } } serializedAdditionalRawData = rawDataDictionary; - return new AnalyzeTextDynamicClassificationResult(kind, serializedAdditionalRawData, results); + return new ExportedQuestionAnsweringOrchestration(projectName, 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(ExportedQuestionAnsweringOrchestration)} does not support writing '{options.Format}' format."); } } - AnalyzeTextDynamicClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedQuestionAnsweringOrchestration 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 DeserializeExportedQuestionAnsweringOrchestration(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestration)} 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 ExportedQuestionAnsweringOrchestration FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement); + return DeserializeExportedQuestionAnsweringOrchestration(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.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.cs new file mode 100644 index 000000000000..af2fa03bda70 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Defines the orchestration details for a Question Answering project target. + public partial class ExportedQuestionAnsweringOrchestration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the target project. + /// is null. + public ExportedQuestionAnsweringOrchestration(string projectName) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + + ProjectName = projectName; + } + + /// Initializes a new instance of . + /// The name of the target project. + /// Keeps track of any properties unknown to the library. + internal ExportedQuestionAnsweringOrchestration(string projectName, IDictionary serializedAdditionalRawData) + { + ProjectName = projectName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedQuestionAnsweringOrchestration() + { + } + + /// The name of the target project. + public string ProjectName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.Serialization.cs similarity index 56% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.Serialization.cs index f82979a4eaca..3374fcc738a8 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class CustomAbstractiveSummarizationOperationAction : IUtf8JsonSerializable, IJsonModel + public partial class ExportedQuestionAnsweringOrchestrationDetails : 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,30 @@ 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(ExportedQuestionAnsweringOrchestrationDetails)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); + writer.WritePropertyName("questionAnsweringOrchestration"u8); + writer.WriteObjectValue(QuestionAnsweringOrchestration, options); } - CustomAbstractiveSummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportedQuestionAnsweringOrchestrationDetails 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(ExportedQuestionAnsweringOrchestrationDetails)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement, options); + return DeserializeExportedQuestionAnsweringOrchestrationDetails(document.RootElement, options); } - internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomAbstractiveSummarizationOperationAction(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportedQuestionAnsweringOrchestrationDetails DeserializeExportedQuestionAnsweringOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -59,26 +59,20 @@ internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomA { return null; } - CustomAbstractiveSummarizationActionContent parameters = default; - string taskName = default; - AnalyzeTextOperationActionKind kind = default; + ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = default; + OrchestrationTargetProjectKind targetProjectKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("parameters"u8)) + if (property.NameEquals("questionAnsweringOrchestration"u8)) { - parameters = CustomAbstractiveSummarizationActionContent.DeserializeCustomAbstractiveSummarizationActionContent(property.Value, options); + questionAnsweringOrchestration = ExportedQuestionAnsweringOrchestration.DeserializeExportedQuestionAnsweringOrchestration(property.Value, options); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("targetProjectKind"u8)) { - taskName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextOperationActionKind(property.Value.GetString()); + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -87,46 +81,46 @@ internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomA } } serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationOperationAction(taskName, kind, serializedAdditionalRawData, parameters); + return new ExportedQuestionAnsweringOrchestrationDetails(targetProjectKind, serializedAdditionalRawData, questionAnsweringOrchestration); } - 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(ExportedQuestionAnsweringOrchestrationDetails)} does not support writing '{options.Format}' format."); } } - CustomAbstractiveSummarizationOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedQuestionAnsweringOrchestrationDetails 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 DeserializeExportedQuestionAnsweringOrchestrationDetails(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestrationDetails)} 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 ExportedQuestionAnsweringOrchestrationDetails FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement); + return DeserializeExportedQuestionAnsweringOrchestrationDetails(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.cs new file mode 100644 index 000000000000..477f9b366763 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.cs @@ -0,0 +1,44 @@ +// 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.Authoring.Models +{ + /// Represents the orchestration options for a Question Answering project target. + public partial class ExportedQuestionAnsweringOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// The Question Answering project details. + /// is null. + public ExportedQuestionAnsweringOrchestrationDetails(ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) + { + Argument.AssertNotNull(questionAnsweringOrchestration, nameof(questionAnsweringOrchestration)); + + TargetProjectKind = OrchestrationTargetProjectKind.QuestionAnswering; + QuestionAnsweringOrchestration = questionAnsweringOrchestration; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The Question Answering project details. + internal ExportedQuestionAnsweringOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData, ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) : base(targetProjectKind, serializedAdditionalRawData) + { + QuestionAnsweringOrchestration = questionAnsweringOrchestration; + } + + /// Initializes a new instance of for deserialization. + internal ExportedQuestionAnsweringOrchestrationDetails() + { + } + + /// The Question Answering project details. + public ExportedQuestionAnsweringOrchestration QuestionAnsweringOrchestration { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs new file mode 100644 index 000000000000..bde241606e97 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("exportedModelName"u8); + writer.WriteStringValue(ExportedModelName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastExportedModelDateTime"u8); + writer.WriteStringValue(LastExportedModelDateTime, "O"); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedTrainedModel(document.RootElement, options); + } + + internal static ExportedTrainedModel DeserializeExportedTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string exportedModelName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastExportedModelDateTime = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exportedModelName"u8)) + { + exportedModelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastExportedModelDateTime"u8)) + { + lastExportedModelDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ExportedTrainedModel IPersistableModel.Create(BinaryData 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 DeserializeExportedTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} 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 ExportedTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedTrainedModel(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.Authoring/src/Generated/Models/ExportedTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.cs new file mode 100644 index 000000000000..6f4b7d525f73 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.cs @@ -0,0 +1,104 @@ +// 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.Authoring.Models +{ + /// Represents an exported trained model. + public partial class ExportedTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// or is null. + internal ExportedTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// Keeps track of any properties unknown to the library. + internal ExportedTrainedModel(string exportedModelName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, IDictionary serializedAdditionalRawData) + { + ExportedModelName = exportedModelName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedTrainedModel() + { + } + + /// The exported model name. + public string ExportedModelName { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The last exported date time of the model. + public DateTimeOffset LastExportedModelDateTime { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.Serialization.cs new file mode 100644 index 000000000000..57b999f1282f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedUtteranceEntityLabel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedUtteranceEntityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedUtteranceEntityLabel(document.RootElement, options); + } + + internal static ExportedUtteranceEntityLabel DeserializeExportedUtteranceEntityLabel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedUtteranceEntityLabel(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} does not support writing '{options.Format}' format."); + } + } + + ExportedUtteranceEntityLabel IPersistableModel.Create(BinaryData 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 DeserializeExportedUtteranceEntityLabel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} 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 ExportedUtteranceEntityLabel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedUtteranceEntityLabel(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.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.cs new file mode 100644 index 000000000000..e2c969ccbb38 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents an entity label for an utterance. + public partial class ExportedUtteranceEntityLabel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 category of the entity label. + /// Start position for the entity text. + /// Length for the entity text. + /// is null. + public ExportedUtteranceEntityLabel(string category, int offset, int length) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// The category of the entity label. + /// Start position for the entity text. + /// Length for the entity text. + /// Keeps track of any properties unknown to the library. + internal ExportedUtteranceEntityLabel(string category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedUtteranceEntityLabel() + { + } + + /// The category of the entity label. + public string Category { get; } + /// Start position for the entity text. + public int Offset { get; } + /// Length for the entity text. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..3374f0e5bb6c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ImportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + ImportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImportProjectJobState(document.RootElement, options); + } + + internal static ImportProjectJobState DeserializeImportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(ImportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ImportProjectJobState IPersistableModel.Create(BinaryData 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 DeserializeImportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImportProjectJobState)} 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 ImportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImportProjectJobState(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.Authoring/src/Generated/Models/ImportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.cs new file mode 100644 index 000000000000..99a71bdd2853 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of an import job. + public partial class ImportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ImportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ImportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorCode.cs new file mode 100644 index 000000000000..8fec0f3a7d94 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/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.Conversations.Authoring.Models +{ + /// 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"; + + /// InvalidRequest. + public static InnerErrorCode InvalidRequest { get; } = new InnerErrorCode(InvalidRequestValue); + /// InvalidParameterValue. + public static InnerErrorCode InvalidParameterValue { get; } = new InnerErrorCode(InvalidParameterValueValue); + /// KnowledgeBaseNotFound. + public static InnerErrorCode KnowledgeBaseNotFound { get; } = new InnerErrorCode(KnowledgeBaseNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static InnerErrorCode AzureCognitiveSearchNotFound { get; } = new InnerErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchThrottling. + public static InnerErrorCode AzureCognitiveSearchThrottling { get; } = new InnerErrorCode(AzureCognitiveSearchThrottlingValue); + /// ExtractionFailure. + public static InnerErrorCode ExtractionFailure { get; } = new InnerErrorCode(ExtractionFailureValue); + /// InvalidRequestBodyFormat. + public static InnerErrorCode InvalidRequestBodyFormat { get; } = new InnerErrorCode(InvalidRequestBodyFormatValue); + /// EmptyRequest. + public static InnerErrorCode EmptyRequest { get; } = new InnerErrorCode(EmptyRequestValue); + /// MissingInputDocuments. + public static InnerErrorCode MissingInputDocuments { get; } = new InnerErrorCode(MissingInputDocumentsValue); + /// InvalidDocument. + public static InnerErrorCode InvalidDocument { get; } = new InnerErrorCode(InvalidDocumentValue); + /// ModelVersionIncorrect. + public static InnerErrorCode ModelVersionIncorrect { get; } = new InnerErrorCode(ModelVersionIncorrectValue); + /// InvalidDocumentBatch. + public static InnerErrorCode InvalidDocumentBatch { get; } = new InnerErrorCode(InvalidDocumentBatchValue); + /// UnsupportedLanguageCode. + public static InnerErrorCode UnsupportedLanguageCode { get; } = new InnerErrorCode(UnsupportedLanguageCodeValue); + /// InvalidCountryHint. + 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.Conversations.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs new file mode 100644 index 000000000000..3b9e7a409497 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class InnerErrorModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{format}' format."); + } + + 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, 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 + } + } + } + + InnerErrorModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInnerErrorModel(document.RootElement, options); + } + + internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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("code"u8)) + { + code = new InnerErrorCode(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; + } + 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("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InnerErrorModel( + code, + message, + details ?? new ChangeTrackingDictionary(), + target, + 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(InnerErrorModel)} does not support writing '{options.Format}' format."); + } + } + + InnerErrorModel IPersistableModel.Create(BinaryData 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 DeserializeInnerErrorModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InnerErrorModel)} 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 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, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.cs new file mode 100644 index 000000000000..0be6c1135e2f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/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.Conversations.Authoring.Models +{ + /// 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.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..73a89b3fd2d6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class IntentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + IntentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIntentEvaluationSummary(document.RootElement, options); + } + + internal static IntentEvaluationSummary DeserializeIntentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IntentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + IntentEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeIntentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} 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 IntentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeIntentEvaluationSummary(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.Authoring/src/Generated/Models/IntentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.cs new file mode 100644 index 000000000000..ccf4111135df --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The evaluation summary for an intent. + public partial class IntentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal IntentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal IntentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IntentEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..3baff424fa3e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class IntentsEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("intents"u8); + writer.WriteStartObject(); + foreach (var item in Intents) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + IntentsEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIntentsEvaluationSummary(document.RootElement, options); + } + + internal static IntentsEvaluationSummary DeserializeIntentsEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary intents = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("intents"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, IntentEvaluationSummary.DeserializeIntentEvaluationSummary(property0.Value, options)); + } + intents = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IntentsEvaluationSummary( + confusionMatrix, + intents, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + IntentsEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeIntentsEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} 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 IntentsEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeIntentsEvaluationSummary(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.Authoring/src/Generated/Models/IntentsEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.cs new file mode 100644 index 000000000000..ac6b62876b0c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.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.Conversations.Authoring.Models +{ + /// Represents the evaluation summary for the project's intents. + public partial class IntentsEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + /// Represents the intents evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal IntentsEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary intents, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(intents, nameof(intents)); + + ConfusionMatrix = confusionMatrix; + Intents = intents; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + /// Represents the intents evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal IntentsEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary intents, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Intents = intents; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IntentsEvaluationSummary() + { + } + + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the intents evaluation summary. + public IReadOnlyDictionary Intents { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/JobStatus.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/JobStatus.cs new file mode 100644 index 000000000000..e87ebd045098 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/JobStatus.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.Conversations.Authoring.Models +{ + /// The JobStatus. + public readonly partial struct JobStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobStatus(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 FailedValue = "failed"; + private const string CancelledValue = "cancelled"; + private const string CancellingValue = "cancelling"; + private const string PartiallyCompletedValue = "partiallyCompleted"; + + /// notStarted. + public static JobStatus NotStarted { get; } = new JobStatus(NotStartedValue); + /// running. + public static JobStatus Running { get; } = new JobStatus(RunningValue); + /// succeeded. + public static JobStatus Succeeded { get; } = new JobStatus(SucceededValue); + /// failed. + public static JobStatus Failed { get; } = new JobStatus(FailedValue); + /// cancelled. + public static JobStatus Cancelled { get; } = new JobStatus(CancelledValue); + /// cancelling. + public static JobStatus Cancelling { get; } = new JobStatus(CancellingValue); + /// partiallyCompleted. + public static JobStatus PartiallyCompleted { get; } = new JobStatus(PartiallyCompletedValue); + /// Determines if two values are the same. + public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator JobStatus(string value) => new JobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobStatus other && Equals(other); + /// + public bool Equals(JobStatus other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs new file mode 100644 index 000000000000..dc0a7a52e26b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class LoadSnapshotJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + LoadSnapshotJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadSnapshotJobState(document.RootElement, options); + } + + internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(LoadSnapshotJobState)} does not support writing '{options.Format}' format."); + } + } + + LoadSnapshotJobState IPersistableModel.Create(BinaryData 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 DeserializeLoadSnapshotJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} 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 LoadSnapshotJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLoadSnapshotJobState(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.Authoring/src/Generated/Models/LoadSnapshotJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.cs new file mode 100644 index 000000000000..d36674e9524d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of loading a snapshot job. + public partial class LoadSnapshotJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal LoadSnapshotJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal LoadSnapshotJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LoadSnapshotJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.Serialization.cs new file mode 100644 index 000000000000..3a59bbd134f3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class OrchestrationExportedIntent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Orchestration)) + { + writer.WritePropertyName("orchestration"u8); + writer.WriteObjectValue(Orchestration, options); + } + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + OrchestrationExportedIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrchestrationExportedIntent(document.RootElement, options); + } + + internal static OrchestrationExportedIntent DeserializeOrchestrationExportedIntent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedOrchestrationDetails orchestration = default; + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("orchestration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orchestration = ExportedOrchestrationDetails.DeserializeExportedOrchestrationDetails(property.Value, options); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrchestrationExportedIntent(orchestration, category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} does not support writing '{options.Format}' format."); + } + } + + OrchestrationExportedIntent IPersistableModel.Create(BinaryData 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 DeserializeOrchestrationExportedIntent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} 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 OrchestrationExportedIntent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOrchestrationExportedIntent(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.Authoring/src/Generated/Models/OrchestrationExportedIntent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.cs new file mode 100644 index 000000000000..a76c27e0e8db --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported intent for an orchestration project. + public partial class OrchestrationExportedIntent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 intent category. + /// is null. + public OrchestrationExportedIntent(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// + /// Specifies the behavior of this intent in the orchestration flow. + /// 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 intent category. + /// Keeps track of any properties unknown to the library. + internal OrchestrationExportedIntent(ExportedOrchestrationDetails orchestration, string category, IDictionary serializedAdditionalRawData) + { + Orchestration = orchestration; + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrchestrationExportedIntent() + { + } + + /// + /// Specifies the behavior of this intent in the orchestration flow. + /// 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 ExportedOrchestrationDetails Orchestration { get; set; } + /// The intent category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..7f1f869f122c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.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.AI.Language.Conversations.Authoring.Models +{ + public partial class OrchestrationExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(OrchestrationExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Intents)) + { + writer.WritePropertyName("intents"u8); + writer.WriteStartArray(); + foreach (var item in Intents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Utterances)) + { + writer.WritePropertyName("utterances"u8); + writer.WriteStartArray(); + foreach (var item in Utterances) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + OrchestrationExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrchestrationExportedProjectAssets(document.RootElement, options); + } + + internal static OrchestrationExportedProjectAssets DeserializeOrchestrationExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList intents = default; + IList utterances = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("intents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OrchestrationExportedIntent.DeserializeOrchestrationExportedIntent(item, options)); + } + intents = array; + continue; + } + if (property.NameEquals("utterances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OrchestrationExportedUtterance.DeserializeOrchestrationExportedUtterance(item, options)); + } + utterances = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrchestrationExportedProjectAssets(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + OrchestrationExportedProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeOrchestrationExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} 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 OrchestrationExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOrchestrationExportedProjectAssets(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.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs new file mode 100644 index 000000000000..1b4e9d3b238c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs @@ -0,0 +1,40 @@ +// 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.Authoring.Models +{ + /// Represents the assets of an orchestration project. + public partial class OrchestrationExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public OrchestrationExportedProjectAssets() + { + ProjectKind = ProjectKind.Orchestration; + Intents = new ChangeTrackingList(); + Utterances = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of project containing the assets. + /// Keeps track of any properties unknown to the library. + /// Represents the intents of the project. + /// Represents the utterances of the project. + internal OrchestrationExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList intents, IList utterances) : base(projectKind, serializedAdditionalRawData) + { + Intents = intents; + Utterances = utterances; + } + + /// Represents the intents of the project. + public IList Intents { get; } + /// Represents the utterances of the project. + public IList Utterances { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.Serialization.cs new file mode 100644 index 000000000000..297969e350eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.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.AI.Language.Conversations.Authoring.Models +{ + public partial class OrchestrationExportedUtterance : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent); + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + OrchestrationExportedUtterance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrchestrationExportedUtterance(document.RootElement, options); + } + + internal static OrchestrationExportedUtterance DeserializeOrchestrationExportedUtterance(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + string language = default; + string intent = default; + string dataset = 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("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + intent = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrchestrationExportedUtterance(text, language, intent, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} does not support writing '{options.Format}' format."); + } + } + + OrchestrationExportedUtterance IPersistableModel.Create(BinaryData 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 DeserializeOrchestrationExportedUtterance(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} 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 OrchestrationExportedUtterance FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOrchestrationExportedUtterance(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.Authoring/src/Generated/Models/OrchestrationExportedUtterance.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.cs new file mode 100644 index 000000000000..a43d5796891a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.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.Conversations.Authoring.Models +{ + /// Represents an utterance of an orchestration project. + public partial class OrchestrationExportedUtterance + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 utterance text. + /// The intent of the utterance. + /// or is null. + public OrchestrationExportedUtterance(string text, string intent) + { + Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(intent, nameof(intent)); + + Text = text; + Intent = intent; + } + + /// Initializes a new instance of . + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal OrchestrationExportedUtterance(string text, string language, string intent, string dataset, IDictionary serializedAdditionalRawData) + { + Text = text; + Language = language; + Intent = intent; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrchestrationExportedUtterance() + { + } + + /// The utterance text. + public string Text { get; } + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The intent of the utterance. + public string Intent { get; } + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationTargetProjectKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationTargetProjectKind.cs new file mode 100644 index 000000000000..a0962ca47412 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationTargetProjectKind.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.Authoring.Models +{ + /// The OrchestrationTargetProjectKind. + internal readonly partial struct OrchestrationTargetProjectKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OrchestrationTargetProjectKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LuisValue = "Luis"; + private const string ConversationValue = "Conversation"; + private const string QuestionAnsweringValue = "QuestionAnswering"; + + /// Luis. + public static OrchestrationTargetProjectKind Luis { get; } = new OrchestrationTargetProjectKind(LuisValue); + /// Conversation. + public static OrchestrationTargetProjectKind Conversation { get; } = new OrchestrationTargetProjectKind(ConversationValue); + /// QuestionAnswering. + public static OrchestrationTargetProjectKind QuestionAnswering { get; } = new OrchestrationTargetProjectKind(QuestionAnsweringValue); + /// Determines if two values are the same. + public static bool operator ==(OrchestrationTargetProjectKind left, OrchestrationTargetProjectKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OrchestrationTargetProjectKind left, OrchestrationTargetProjectKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OrchestrationTargetProjectKind(string value) => new OrchestrationTargetProjectKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OrchestrationTargetProjectKind other && Equals(other); + /// + public bool Equals(OrchestrationTargetProjectKind other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/PrebuiltEntities.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.Serialization.cs new file mode 100644 index 000000000000..3ed3090a697d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.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.AI.Language.Conversations.Authoring.Models +{ + public partial class PrebuiltEntities : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntities)} 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); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + PrebuiltEntities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntities)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrebuiltEntities(document.RootElement, options); + } + + internal static PrebuiltEntities DeserializePrebuiltEntities(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string 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(PrebuiltEntity.DeserializePrebuiltEntity(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrebuiltEntities(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(PrebuiltEntities)} does not support writing '{options.Format}' format."); + } + } + + PrebuiltEntities IPersistableModel.Create(BinaryData 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 DeserializePrebuiltEntities(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrebuiltEntities)} 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 PrebuiltEntities FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePrebuiltEntities(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.Authoring/src/Generated/Models/PrebuiltEntities.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.cs new file mode 100644 index 000000000000..b391e65ae007 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of the retrieved supported prebuilt entities. + public partial class PrebuiltEntities + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 supported prebuilt entities. + /// is null. + internal PrebuiltEntities(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The supported prebuilt entities. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal PrebuiltEntities(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrebuiltEntities() + { + } + + /// The supported prebuilt entities. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..053665c47c53 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.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.AI.Language.Conversations.Authoring.Models +{ + public partial class PrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("examples"u8); + writer.WriteStringValue(Examples); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + PrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrebuiltEntity(document.RootElement, options); + } + + internal static PrebuiltEntity DeserializePrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + string description = default; + string examples = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("examples"u8)) + { + examples = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + PrebuiltEntity IPersistableModel.Create(BinaryData 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 DeserializePrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} 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 PrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePrebuiltEntity(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.Authoring/src/Generated/Models/PrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.cs new file mode 100644 index 000000000000..d0bfaf84131e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents a supported prebuilt entity. + public partial class PrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 prebuilt entity category. + /// The description. + /// English examples for the entity. + /// , or is null. + internal PrebuiltEntity(string category, string description, string examples) + { + Argument.AssertNotNull(category, nameof(category)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(examples, nameof(examples)); + + Category = category; + Description = description; + Examples = examples; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// Keeps track of any properties unknown to the library. + internal PrebuiltEntity(string category, string description, string examples, IDictionary serializedAdditionalRawData) + { + Category = category; + Description = description; + Examples = examples; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + /// The description. + public string Description { get; } + /// English examples for the entity. + public string Examples { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs new file mode 100644 index 000000000000..0126c905da8f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ProjectDeletionJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + ProjectDeletionJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeletionJobState(document.RootElement, options); + } + + internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(ProjectDeletionJobState)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeletionJobState IPersistableModel.Create(BinaryData 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 DeserializeProjectDeletionJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} 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 ProjectDeletionJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeletionJobState(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.Authoring/src/Generated/Models/ProjectDeletionJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.cs new file mode 100644 index 000000000000..6a51e6c587e7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a project deletion job. + public partial class ProjectDeletionJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ProjectDeletionJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ProjectDeletionJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeletionJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs new file mode 100644 index 000000000000..2cd30a980287 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectDeployment : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("assignedResources"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResources) + { + 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 + } + } + } + + ProjectDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeployment(document.RootElement, options); + } + + internal static ProjectDeployment DeserializeProjectDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + string modelTrainingConfigVersion = default; + IReadOnlyList assignedResources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentResource.DeserializeDeploymentResource(item, options)); + } + assignedResources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeployment IPersistableModel.Create(BinaryData 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 DeserializeProjectDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} 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 ProjectDeployment FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeployment(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.Authoring/src/Generated/Models/ProjectDeployment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.cs new file mode 100644 index 000000000000..ef0a3c0feb3e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a project deployment. + public partial class ProjectDeployment + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// , or is null. + internal ProjectDeployment(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IEnumerable assignedResources) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + Argument.AssertNotNull(assignedResources, nameof(assignedResources)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources.ToList(); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// Keeps track of any properties unknown to the library. + internal ProjectDeployment(string deploymentName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IReadOnlyList assignedResources, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeployment() + { + } + + /// Represents deployment name. + public string DeploymentName { get; } + /// Represents deployment modelId. + public string ModelId { get; } + /// Represents deployment last trained time. + public DateTimeOffset LastTrainedDateTime { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + /// Represents model training config version. + public string ModelTrainingConfigVersion { get; } + /// Represents the metadata of the assigned Azure resources. + public IReadOnlyList AssignedResources { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectKind.cs new file mode 100644 index 000000000000..d673512f2717 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectKind.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.Authoring.Models +{ + /// The ProjectKind. + public readonly partial struct ProjectKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProjectKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ConversationValue = "Conversation"; + private const string OrchestrationValue = "Orchestration"; + private const string CustomConversationSummarizationValue = "CustomConversationSummarization"; + + /// A project to build natural language into apps, bots, and IoT devices. + public static ProjectKind Conversation { get; } = new ProjectKind(ConversationValue); + /// A project to connect and orchestrate Conversation, Custom question answering and LUIS projects together in one single project. + public static ProjectKind Orchestration { get; } = new ProjectKind(OrchestrationValue); + /// A project to build conversation summarization models which are able to summarize long conversations. + public static ProjectKind CustomConversationSummarization { get; } = new ProjectKind(CustomConversationSummarizationValue); + /// Determines if two values are the same. + public static bool operator ==(ProjectKind left, ProjectKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProjectKind left, ProjectKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProjectKind(string value) => new ProjectKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProjectKind other && Equals(other); + /// + public bool Equals(ProjectKind other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs new file mode 100644 index 000000000000..1702bef36f89 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ProjectMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastModifiedDateTime"u8); + writer.WriteStringValue(LastModifiedDateTime, "O"); + if (Optional.IsDefined(LastTrainedDateTime)) + { + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime.Value, "O"); + } + if (Optional.IsDefined(LastDeployedDateTime)) + { + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime.Value, "O"); + } + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + ProjectMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectMetadata(document.RootElement, options); + } + + internal static ProjectMetadata DeserializeProjectMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset createdDateTime = default; + DateTimeOffset lastModifiedDateTime = default; + DateTimeOffset? lastTrainedDateTime = default; + DateTimeOffset? lastDeployedDateTime = default; + ProjectKind projectKind = default; + ProjectSettings settings = default; + string storageInputContainerName = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastModifiedDateTime"u8)) + { + lastModifiedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + 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 ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + 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(ProjectMetadata)} does not support writing '{options.Format}' format."); + } + } + + ProjectMetadata IPersistableModel.Create(BinaryData 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 DeserializeProjectMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectMetadata)} 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 ProjectMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectMetadata(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.Authoring/src/Generated/Models/ProjectMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.cs new file mode 100644 index 000000000000..c8e18988fe7e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata of a project. + public partial class ProjectMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project creation datetime. + /// Represents the project kind. + /// The new project name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, ProjectKind projectKind, string projectName, string language) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(language, nameof(language)); + + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + ProjectKind = projectKind; + ProjectName = projectName; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project creation datetime. + /// Represents the project last trained datetime. + /// Represents the project last deployed datetime. + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, DateTimeOffset? lastTrainedDateTime, DateTimeOffset? lastDeployedDateTime, ProjectKind projectKind, ProjectSettings settings, string storageInputContainerName, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + ProjectKind = projectKind; + Settings = settings; + StorageInputContainerName = storageInputContainerName; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectMetadata() + { + } + + /// Represents the project creation datetime. + public DateTimeOffset CreatedDateTime { get; } + /// Represents the project creation datetime. + public DateTimeOffset LastModifiedDateTime { get; } + /// Represents the project last trained datetime. + public DateTimeOffset? LastTrainedDateTime { get; } + /// Represents the project last deployed datetime. + public DateTimeOffset? LastDeployedDateTime { get; } + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The project settings. + public ProjectSettings Settings { get; } + /// The storage container name in case of conversation summarization. + public string StorageInputContainerName { get; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; } + /// The project description. + public string Description { get; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs new file mode 100644 index 000000000000..7104e28cc936 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confidenceThreshold"u8); + writer.WriteNumberValue(ConfidenceThreshold); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ProjectSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectSettings(document.RootElement, options); + } + + internal static ProjectSettings DeserializeProjectSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float confidenceThreshold = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confidenceThreshold"u8)) + { + confidenceThreshold = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectSettings(confidenceThreshold, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{options.Format}' format."); + } + } + + ProjectSettings IPersistableModel.Create(BinaryData 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 DeserializeProjectSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectSettings)} 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 ProjectSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectSettings(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.Authoring/src/Generated/Models/ProjectSettings.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.cs new file mode 100644 index 000000000000..46ad35fa50c9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the settings used to define the project behavior. + public partial class ProjectSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 threshold of the intent with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + public ProjectSettings(float confidenceThreshold) + { + ConfidenceThreshold = confidenceThreshold; + } + + /// Initializes a new instance of . + /// The threshold of the intent with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal ProjectSettings(float confidenceThreshold, IDictionary serializedAdditionalRawData) + { + ConfidenceThreshold = confidenceThreshold; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectSettings() + { + } + + /// The threshold of the intent with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + public float ConfidenceThreshold { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs new file mode 100644 index 000000000000..6e7eaa0108c9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastTrainingDurationInSeconds"u8); + writer.WriteNumberValue(LastTrainingDurationInSeconds); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("hasSnapshot"u8); + writer.WriteBooleanValue(HasSnapshot); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ProjectTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectTrainedModel(document.RootElement, options); + } + + internal static ProjectTrainedModel DeserializeProjectTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string label = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + int lastTrainingDurationInSeconds = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + bool hasSnapshot = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainingDurationInSeconds"u8)) + { + lastTrainingDurationInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("hasSnapshot"u8)) + { + hasSnapshot = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ProjectTrainedModel IPersistableModel.Create(BinaryData 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 DeserializeProjectTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} 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 ProjectTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectTrainedModel(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.Authoring/src/Generated/Models/ProjectTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.cs new file mode 100644 index 000000000000..1fbc9b616db0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.cs @@ -0,0 +1,110 @@ +// 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.Authoring.Models +{ + /// Represents a trained model. + public partial class ProjectTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// or is null. + internal ProjectTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// Keeps track of any properties unknown to the library. + internal ProjectTrainedModel(string label, string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot, IDictionary serializedAdditionalRawData) + { + Label = label; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectTrainedModel() + { + } + + /// The trained model label. + public string Label { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The duration of the model's last training request in seconds. + public int LastTrainingDurationInSeconds { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + /// The flag to indicate if the trained model has a snapshot ready. + public bool HasSnapshot { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs new file mode 100644 index 000000000000..f08f82f6afcf --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.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.AI.Language.Conversations.Authoring.Models +{ + public partial class ResourceMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + writer.WritePropertyName("customDomain"u8); + writer.WriteStringValue(CustomDomain); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ResourceMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceMetadata(document.RootElement, options); + } + + internal static ResourceMetadata DeserializeResourceMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string customDomain = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("customDomain"u8)) + { + customDomain = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceMetadata(azureResourceId, customDomain, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{options.Format}' format."); + } + } + + ResourceMetadata IPersistableModel.Create(BinaryData 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 DeserializeResourceMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} 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 ResourceMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceMetadata(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.Authoring/src/Generated/Models/ResourceMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.cs new file mode 100644 index 000000000000..906b9992bdf4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents metadata for the Azure resource.. + public partial class ResourceMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// , or is null. + public ResourceMetadata(string azureResourceId, string customDomain, string region) + { + Argument.AssertNotNull(azureResourceId, nameof(azureResourceId)); + Argument.AssertNotNull(customDomain, nameof(customDomain)); + Argument.AssertNotNull(region, nameof(region)); + + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// Keeps track of any properties unknown to the library. + internal ResourceMetadata(string azureResourceId, string customDomain, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceMetadata() + { + } + + /// Represents the Azure resource ID. + public string AzureResourceId { get; } + /// Represents the Azure resource custom domain. + public string CustomDomain { get; } + /// Represents the Azure resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/StringIndexType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/StringIndexType.cs new file mode 100644 index 000000000000..ad609f62ed3a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/StringIndexType.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.Conversations.Authoring.Models +{ + /// The StringIndexType. + 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 Utf16CodeUnitValue = "Utf16CodeUnit"; + + /// The 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.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs new file mode 100644 index 000000000000..34b55b9c7674 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.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.AI.Language.Conversations.Authoring.Models +{ + public partial class SubTrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (Optional.IsDefined(StartDateTime)) + { + writer.WritePropertyName("startDateTime"u8); + writer.WriteStringValue(StartDateTime.Value, "O"); + } + if (Optional.IsDefined(EndDateTime)) + { + writer.WritePropertyName("endDateTime"u8); + writer.WriteStringValue(EndDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.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 + } + } + } + + SubTrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSubTrainingJobState(document.RootElement, options); + } + + internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int percentComplete = default; + DateTimeOffset? startDateTime = default; + DateTimeOffset? endDateTime = default; + JobStatus status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + SubTrainingJobState IPersistableModel.Create(BinaryData 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 DeserializeSubTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} 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 SubTrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSubTrainingJobState(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.Authoring/src/Generated/Models/SubTrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.cs new file mode 100644 index 000000000000..bf95c7414ab8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the detailed state of a training sub-operation. + public partial class SubTrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the status of the sub-operation. + internal SubTrainingJobState(int percentComplete, JobStatus status) + { + PercentComplete = percentComplete; + Status = status; + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// Keeps track of any properties unknown to the library. + internal SubTrainingJobState(int percentComplete, DateTimeOffset? startDateTime, DateTimeOffset? endDateTime, JobStatus status, IDictionary serializedAdditionalRawData) + { + PercentComplete = percentComplete; + StartDateTime = startDateTime; + EndDateTime = endDateTime; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SubTrainingJobState() + { + } + + /// Represents progress percentage. + public int PercentComplete { get; } + /// Represents the start date time. + public DateTimeOffset? StartDateTime { get; } + /// Represents the end date time. + public DateTimeOffset? EndDateTime { get; } + /// Represents the status of the sub-operation. + public JobStatus Status { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs new file mode 100644 index 000000000000..b57d25aa07b2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.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.Conversations.Authoring.Models +{ + public partial class SupportedLanguage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("languageName"u8); + writer.WriteStringValue(LanguageName); + writer.WritePropertyName("languageCode"u8); + writer.WriteStringValue(LanguageCode); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SupportedLanguage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSupportedLanguage(document.RootElement, options); + } + + internal static SupportedLanguage DeserializeSupportedLanguage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string languageName = default; + string languageCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("languageName"u8)) + { + languageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("languageCode"u8)) + { + languageCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{options.Format}' format."); + } + } + + SupportedLanguage IPersistableModel.Create(BinaryData 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 DeserializeSupportedLanguage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} 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 SupportedLanguage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSupportedLanguage(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.Authoring/src/Generated/Models/SupportedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.cs new file mode 100644 index 000000000000..cc3293a6b09c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.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.Conversations.Authoring.Models +{ + /// Represents a supported language. + public partial class SupportedLanguage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + internal SupportedLanguage(string languageName, string languageCode) + { + Argument.AssertNotNull(languageName, nameof(languageName)); + Argument.AssertNotNull(languageCode, nameof(languageCode)); + + LanguageName = languageName; + LanguageCode = languageCode; + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal SupportedLanguage(string languageName, string languageCode, IDictionary serializedAdditionalRawData) + { + LanguageName = languageName; + LanguageCode = languageCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SupportedLanguage() + { + } + + /// The language name. + public string LanguageName { get; } + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string LanguageCode { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.Serialization.cs new file mode 100644 index 000000000000..10dfb02e3505 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.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.AI.Language.Conversations.Authoring.Models +{ + public partial class SupportedLanguages : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguages)} 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); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SupportedLanguages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguages)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSupportedLanguages(document.RootElement, options); + } + + internal static SupportedLanguages DeserializeSupportedLanguages(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string 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(SupportedLanguage.DeserializeSupportedLanguage(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SupportedLanguages(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(SupportedLanguages)} does not support writing '{options.Format}' format."); + } + } + + SupportedLanguages IPersistableModel.Create(BinaryData 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 DeserializeSupportedLanguages(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SupportedLanguages)} 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 SupportedLanguages FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSupportedLanguages(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.Authoring/src/Generated/Models/SupportedLanguages.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.cs new file mode 100644 index 000000000000..573a75efe97f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of retrieved languages. + public partial class SupportedLanguages + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of the languages. + /// is null. + internal SupportedLanguages(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of the languages. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal SupportedLanguages(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SupportedLanguages() + { + } + + /// The list of the languages. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs new file mode 100644 index 000000000000..aaade3a43ce4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.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.Conversations.Authoring.Models +{ + public partial class SwapDeploymentsDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("firstDeploymentName"u8); + writer.WriteStringValue(FirstDeploymentName); + writer.WritePropertyName("secondDeploymentName"u8); + writer.WriteStringValue(SecondDeploymentName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SwapDeploymentsDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + + internal static SwapDeploymentsDetails DeserializeSwapDeploymentsDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstDeploymentName = default; + string secondDeploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstDeploymentName"u8)) + { + firstDeploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondDeploymentName"u8)) + { + secondDeploymentName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsDetails(firstDeploymentName, secondDeploymentName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsDetails IPersistableModel.Create(BinaryData 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 DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} 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 SwapDeploymentsDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsDetails(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.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs new file mode 100644 index 000000000000..bdada59462ce --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.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.Conversations.Authoring.Models +{ + /// Represents the options for swapping two deployments together. + public partial class SwapDeploymentsDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// or is null. + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) + { + Argument.AssertNotNull(firstDeploymentName, nameof(firstDeploymentName)); + Argument.AssertNotNull(secondDeploymentName, nameof(secondDeploymentName)); + + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + } + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName, IDictionary serializedAdditionalRawData) + { + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsDetails() + { + } + + /// Represents the first deployment name. + public string FirstDeploymentName { get; } + /// Represents the second deployment name. + public string SecondDeploymentName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs new file mode 100644 index 000000000000..11247b186dd9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class SwapDeploymentsJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + SwapDeploymentsJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + + internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(SwapDeploymentsJobState)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsJobState IPersistableModel.Create(BinaryData 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 DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} 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 SwapDeploymentsJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsJobState(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.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs new file mode 100644 index 000000000000..23f81396d899 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class SwapDeploymentsJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal SwapDeploymentsJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs new file mode 100644 index 000000000000..7811d7667b24 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.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.Conversations.Authoring.Models +{ + public partial class TrainingConfigVersion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersionProperty); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + TrainingConfigVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingConfigVersion(document.RootElement, options); + } + + internal static TrainingConfigVersion DeserializeTrainingConfigVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainingConfigVersion = default; + DateTimeOffset modelExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingConfigVersion(trainingConfigVersion, modelExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{options.Format}' format."); + } + } + + TrainingConfigVersion IPersistableModel.Create(BinaryData 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 DeserializeTrainingConfigVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} 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 TrainingConfigVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingConfigVersion(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.Authoring/src/Generated/Models/TrainingConfigVersion.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.cs new file mode 100644 index 000000000000..17e1509a0e00 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents a training config version. + public partial class TrainingConfigVersion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// is null. + internal TrainingConfigVersion(string trainingConfigVersionProperty, DateTimeOffset modelExpirationDate) + { + Argument.AssertNotNull(trainingConfigVersionProperty, nameof(trainingConfigVersionProperty)); + + TrainingConfigVersionProperty = trainingConfigVersionProperty; + ModelExpirationDate = modelExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// Keeps track of any properties unknown to the library. + internal TrainingConfigVersion(string trainingConfigVersionProperty, DateTimeOffset modelExpirationDate, IDictionary serializedAdditionalRawData) + { + TrainingConfigVersionProperty = trainingConfigVersionProperty; + ModelExpirationDate = modelExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingConfigVersion() + { + } + + /// Represents the version of the config. + public string TrainingConfigVersionProperty { get; } + /// Represents the training config version expiration date. + public DateTimeOffset ModelExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.Serialization.cs new file mode 100644 index 000000000000..b2ca76809d13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.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.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingConfigVersions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersions)} 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); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + TrainingConfigVersions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingConfigVersions(document.RootElement, options); + } + + internal static TrainingConfigVersions DeserializeTrainingConfigVersions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string 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(TrainingConfigVersion.DeserializeTrainingConfigVersion(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingConfigVersions(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(TrainingConfigVersions)} does not support writing '{options.Format}' format."); + } + } + + TrainingConfigVersions IPersistableModel.Create(BinaryData 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 DeserializeTrainingConfigVersions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingConfigVersions)} 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 TrainingConfigVersions FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingConfigVersions(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.Authoring/src/Generated/Models/TrainingConfigVersions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.cs new file mode 100644 index 000000000000..e9843b7eec26 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of training config versions. + public partial class TrainingConfigVersions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of the training config versions. + /// is null. + internal TrainingConfigVersions(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of the training config versions. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal TrainingConfigVersions(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingConfigVersions() + { + } + + /// The list of the training config versions. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs new file mode 100644 index 000000000000..523f1676b7c8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.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.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingJobDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + if (Optional.IsDefined(TrainingConfigVersion)) + { + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + } + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.ToString()); + if (Optional.IsDefined(EvaluationOptions)) + { + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, 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 + } + } + } + + TrainingJobDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobDetails(document.RootElement, options); + } + + internal static TrainingJobDetails DeserializeTrainingJobDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + TrainingMode trainingMode = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingMode"u8)) + { + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobDetails(modelLabel, trainingConfigVersion, trainingMode, evaluationOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobDetails IPersistableModel.Create(BinaryData 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 DeserializeTrainingJobDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} 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 TrainingJobDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobDetails(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.Authoring/src/Generated/Models/TrainingJobDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.cs new file mode 100644 index 000000000000..3feb12923271 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for starting a new training job. + public partial class TrainingJobDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents the mode of the training operation. + /// is null. + public TrainingJobDetails(string modelLabel, TrainingMode trainingMode) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + + ModelLabel = modelLabel; + TrainingMode = trainingMode; + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. By default, "latest" value is used which uses the latest released training config version. + /// Represents the mode of the training operation. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// Keeps track of any properties unknown to the library. + internal TrainingJobDetails(string modelLabel, string trainingConfigVersion, TrainingMode trainingMode, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingMode = trainingMode; + EvaluationOptions = evaluationOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobDetails() + { + } + + /// Represents the output model label. + public string ModelLabel { get; } + /// Represents training config version. By default, "latest" value is used which uses the latest released training config version. + public string TrainingConfigVersion { get; set; } + /// Represents the mode of the training operation. + public TrainingMode TrainingMode { get; } + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + public EvaluationDetails EvaluationOptions { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs new file mode 100644 index 000000000000..583091695fdd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.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.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + if (Optional.IsDefined(TrainingMode)) + { + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.Value.ToString()); + } + writer.WritePropertyName("trainingStatus"u8); + writer.WriteObjectValue(TrainingStatus, options); + if (Optional.IsDefined(EvaluationStatus)) + { + writer.WritePropertyName("evaluationStatus"u8); + writer.WriteObjectValue(EvaluationStatus, options); + } + if (Optional.IsDefined(EstimatedEndDateTime)) + { + writer.WritePropertyName("estimatedEndDateTime"u8); + writer.WriteStringValue(EstimatedEndDateTime.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobResult(document.RootElement, options); + } + + internal static TrainingJobResult DeserializeTrainingJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + TrainingMode? trainingMode = default; + SubTrainingJobState trainingStatus = default; + SubTrainingJobState evaluationStatus = default; + DateTimeOffset? estimatedEndDateTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingStatus"u8)) + { + trainingStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("evaluationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("estimatedEndDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedEndDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingMode, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobResult IPersistableModel.Create(BinaryData 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 DeserializeTrainingJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} 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 TrainingJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobResult(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.Authoring/src/Generated/Models/TrainingJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.cs new file mode 100644 index 000000000000..720a34cb1f3a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the output of a training job. + public partial class TrainingJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents the model training status. + /// , or is null. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingJobState trainingStatus) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + Argument.AssertNotNull(trainingStatus, nameof(trainingStatus)); + + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingStatus = trainingStatus; + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents the mode of the training operation. + /// Represents the model training status. + /// Represents model evaluation status. + /// Represents the estimated end date time for training and evaluation. + /// Keeps track of any properties unknown to the library. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, TrainingMode? trainingMode, SubTrainingJobState trainingStatus, SubTrainingJobState evaluationStatus, DateTimeOffset? estimatedEndDateTime, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingMode = trainingMode; + TrainingStatus = trainingStatus; + EvaluationStatus = evaluationStatus; + EstimatedEndDateTime = estimatedEndDateTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobResult() + { + } + + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents the mode of the training operation. + public TrainingMode? TrainingMode { get; } + /// Represents the model training status. + public SubTrainingJobState TrainingStatus { get; } + /// Represents model evaluation status. + public SubTrainingJobState EvaluationStatus { get; } + /// Represents the estimated end date time for training and evaluation. + public DateTimeOffset? EstimatedEndDateTime { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs new file mode 100644 index 000000000000..00058b957bf1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, 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 + } + } + } + + TrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobState(document.RootElement, options); + } + + internal static TrainingJobState DeserializeTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + TrainingJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = TrainingJobResult.DeserializeTrainingJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobState IPersistableModel.Create(BinaryData 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 DeserializeTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobState)} 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 TrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobState(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.Authoring/src/Generated/Models/TrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.cs new file mode 100644 index 000000000000..882cd133cc27 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a training job. + public partial class TrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents training tasks detailed result. + /// is null. + internal TrainingJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, TrainingJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// Keeps track of any properties unknown to the library. + internal TrainingJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, TrainingJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents training tasks detailed result. + public TrainingJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingMode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingMode.cs new file mode 100644 index 000000000000..8b3ba74604b3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingMode.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.Conversations.Authoring.Models +{ + /// The TrainingMode. + public readonly partial struct TrainingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TrainingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AdvancedValue = "advanced"; + private const string StandardValue = "standard"; + + /// Trains using fine-tuned neural network transformer models. Can train multilingual projects. + public static TrainingMode Advanced { get; } = new TrainingMode(AdvancedValue); + /// Faster training times for quicker iterations. + public static TrainingMode Standard { get; } = new TrainingMode(StandardValue); + /// Determines if two values are the same. + public static bool operator ==(TrainingMode left, TrainingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TrainingMode left, TrainingMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TrainingMode(string value) => new TrainingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TrainingMode other && Equals(other); + /// + public bool Equals(TrainingMode other) => string.Equals(_value, other._value, StringComparison.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.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs similarity index 54% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs index 74f43285ba8b..3cfb3cb12330 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class DynamicClassificationActionContent : IUtf8JsonSerializable, IJsonModel + public partial class UnassignDeploymentResourcesDetails : 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,15 @@ 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(UnassignDeploymentResourcesDetails)} 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(ClassificationType)) - { - writer.WritePropertyName("classificationType"u8); - writer.WriteStringValue(ClassificationType.Value.ToString()); - } - writer.WritePropertyName("categories"u8); + writer.WritePropertyName("assignedResourceIds"u8); writer.WriteStartArray(); - foreach (var item in Categories) + foreach (var item in AssignedResourceIds) { writer.WriteStringValue(item); } @@ -73,19 +58,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DynamicClassificationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + UnassignDeploymentResourcesDetails 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(UnassignDeploymentResourcesDetails)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynamicClassificationActionContent(document.RootElement, options); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); } - internal static DynamicClassificationActionContent DeserializeDynamicClassificationActionContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnassignDeploymentResourcesDetails DeserializeUnassignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -93,45 +78,19 @@ internal static DynamicClassificationActionContent DeserializeDynamicClassificat { return null; } - bool? loggingOptOut = default; - string modelVersion = default; - ClassificationType? classificationType = default; - IList categories = default; + IList assignedResourceIds = 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("classificationType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - classificationType = new ClassificationType(property.Value.GetString()); - continue; - } - if (property.NameEquals("categories"u8)) + if (property.NameEquals("assignedResourceIds"u8)) { List array = new List(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetString()); } - categories = array; + assignedResourceIds = array; continue; } if (options.Format != "W") @@ -140,46 +99,46 @@ internal static DynamicClassificationActionContent DeserializeDynamicClassificat } } serializedAdditionalRawData = rawDataDictionary; - return new DynamicClassificationActionContent(loggingOptOut, modelVersion, classificationType, categories, serializedAdditionalRawData); + return new UnassignDeploymentResourcesDetails(assignedResourceIds, 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(UnassignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); } } - DynamicClassificationActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + UnassignDeploymentResourcesDetails 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 DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} 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 UnassignDeploymentResourcesDetails FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDynamicClassificationActionContent(document.RootElement); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..9ef1677d4971 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options to unassign Azure resources from a project. + public partial class UnassignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// is null. + public UnassignDeploymentResourcesDetails(IEnumerable assignedResourceIds) + { + Argument.AssertNotNull(assignedResourceIds, nameof(assignedResourceIds)); + + AssignedResourceIds = assignedResourceIds.ToList(); + } + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// Keeps track of any properties unknown to the library. + internal UnassignDeploymentResourcesDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UnassignDeploymentResourcesDetails() + { + } + + /// Represents the assigned resource IDs to be unassigned. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..1abe78c47979 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.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.Authoring.Models +{ + internal partial class UnknownExportedOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedOrchestrationDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ExportedOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + + internal static UnknownExportedOrchestrationDetails DeserializeUnknownExportedOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OrchestrationTargetProjectKind targetProjectKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetProjectKind"u8)) + { + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownExportedOrchestrationDetails(targetProjectKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedOrchestrationDetails IPersistableModel.Create(BinaryData 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 DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} 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 UnknownExportedOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownExportedOrchestrationDetails(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.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.cs new file mode 100644 index 000000000000..58340d0dec0e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.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.Authoring.Models +{ + /// Unknown version of ExportedOrchestrationDetails. + internal partial class UnknownExportedOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownExportedOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData) : base(targetProjectKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownExportedOrchestrationDetails() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..90fd010370fe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.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.Authoring.Models +{ + internal partial class UnknownExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static UnknownExportedProjectAssets DeserializeUnknownExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownExportedProjectAssets(projectKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} 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 UnknownExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownExportedProjectAssets(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.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs new file mode 100644 index 000000000000..8a716c535450 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.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.Authoring.Models +{ + /// Unknown version of ExportedProjectAssets. + internal partial class UnknownExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + /// The type of project containing the assets. + /// Keeps track of any properties unknown to the library. + internal UnknownExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) : base(projectKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownExportedProjectAssets() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..f55c429bbe87 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.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.AI.Language.Conversations.Authoring.Models +{ + public partial class UtteranceEntitiesEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedEntities"u8); + writer.WriteStartArray(); + foreach (var item in ExpectedEntities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("predictedEntities"u8); + writer.WriteStartArray(); + foreach (var item in PredictedEntities) + { + 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 + } + } + } + + UtteranceEntitiesEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceEntitiesEvaluationResult(document.RootElement, options); + } + + internal static UtteranceEntitiesEvaluationResult DeserializeUtteranceEntitiesEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList expectedEntities = default; + IReadOnlyList predictedEntities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedEntities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UtteranceEntityEvaluationResult.DeserializeUtteranceEntityEvaluationResult(item, options)); + } + expectedEntities = array; + continue; + } + if (property.NameEquals("predictedEntities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UtteranceEntityEvaluationResult.DeserializeUtteranceEntityEvaluationResult(item, options)); + } + predictedEntities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceEntitiesEvaluationResult(expectedEntities, predictedEntities, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceEntitiesEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeUtteranceEntitiesEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} 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 UtteranceEntitiesEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceEntitiesEvaluationResult(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.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.cs new file mode 100644 index 000000000000..a504ec9990ed --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.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 System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the comparison between the expected and predicted entities for an utterance. + public partial class UtteranceEntitiesEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the expected entity labels. + /// Represents the predicted entity labels. + /// or is null. + internal UtteranceEntitiesEvaluationResult(IEnumerable expectedEntities, IEnumerable predictedEntities) + { + Argument.AssertNotNull(expectedEntities, nameof(expectedEntities)); + Argument.AssertNotNull(predictedEntities, nameof(predictedEntities)); + + ExpectedEntities = expectedEntities.ToList(); + PredictedEntities = predictedEntities.ToList(); + } + + /// Initializes a new instance of . + /// Represents the expected entity labels. + /// Represents the predicted entity labels. + /// Keeps track of any properties unknown to the library. + internal UtteranceEntitiesEvaluationResult(IReadOnlyList expectedEntities, IReadOnlyList predictedEntities, IDictionary serializedAdditionalRawData) + { + ExpectedEntities = expectedEntities; + PredictedEntities = predictedEntities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceEntitiesEvaluationResult() + { + } + + /// Represents the expected entity labels. + public IReadOnlyList ExpectedEntities { get; } + /// Represents the predicted entity labels. + public IReadOnlyList PredictedEntities { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..e5e3ea816f22 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.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.AI.Language.Conversations.Authoring.Models +{ + public partial class UtteranceEntityEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + UtteranceEntityEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceEntityEvaluationResult(document.RootElement, options); + } + + internal static UtteranceEntityEvaluationResult DeserializeUtteranceEntityEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceEntityEvaluationResult(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceEntityEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeUtteranceEntityEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} 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 UtteranceEntityEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceEntityEvaluationResult(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.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.cs new file mode 100644 index 000000000000..c27307848f49 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.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.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation output of an entity label or prediction. + public partial class UtteranceEntityEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// is null. + internal UtteranceEntityEvaluationResult(string category, int offset, int length) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// Keeps track of any properties unknown to the library. + internal UtteranceEntityEvaluationResult(string category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceEntityEvaluationResult() + { + } + + /// Represents the entity category. + public string Category { get; } + /// Represents the entity offset index relative to the original text. + public int Offset { get; } + /// Represents the entity length. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..d6d92cff97e9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.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.Conversations.Authoring.Models +{ + public partial class UtteranceEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("entitiesResult"u8); + writer.WriteObjectValue(EntitiesResult, options); + writer.WritePropertyName("intentsResult"u8); + writer.WriteObjectValue(IntentsResult, 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 + } + } + } + + UtteranceEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceEvaluationResult(document.RootElement, options); + } + + internal static UtteranceEvaluationResult DeserializeUtteranceEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + string language = default; + UtteranceEntitiesEvaluationResult entitiesResult = default; + UtteranceIntentsEvaluationResult intentsResult = 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("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("entitiesResult"u8)) + { + entitiesResult = UtteranceEntitiesEvaluationResult.DeserializeUtteranceEntitiesEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("intentsResult"u8)) + { + intentsResult = UtteranceIntentsEvaluationResult.DeserializeUtteranceIntentsEvaluationResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceEvaluationResult(text, language, entitiesResult, intentsResult, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeUtteranceEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} 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 UtteranceEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceEvaluationResult(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.Authoring/src/Generated/Models/UtteranceEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.cs new file mode 100644 index 000000000000..5c27863f44f3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation result for an utterance. + public partial class UtteranceEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the entities results for the utterance. + /// Represents the intents results for the utterance. + /// , or is null. + internal UtteranceEvaluationResult(string language, UtteranceEntitiesEvaluationResult entitiesResult, UtteranceIntentsEvaluationResult intentsResult) + { + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(entitiesResult, nameof(entitiesResult)); + Argument.AssertNotNull(intentsResult, nameof(intentsResult)); + + Language = language; + EntitiesResult = entitiesResult; + IntentsResult = intentsResult; + } + + /// Initializes a new instance of . + /// Represents the utterance text. + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the entities results for the utterance. + /// Represents the intents results for the utterance. + /// Keeps track of any properties unknown to the library. + internal UtteranceEvaluationResult(string text, string language, UtteranceEntitiesEvaluationResult entitiesResult, UtteranceIntentsEvaluationResult intentsResult, IDictionary serializedAdditionalRawData) + { + Text = text; + Language = language; + EntitiesResult = entitiesResult; + IntentsResult = intentsResult; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceEvaluationResult() + { + } + + /// Represents the utterance text. + public string Text { get; } + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + /// Represents the entities results for the utterance. + public UtteranceEntitiesEvaluationResult EntitiesResult { get; } + /// Represents the intents results for the utterance. + public UtteranceIntentsEvaluationResult IntentsResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..6f3f6c548477 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.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.Conversations.Authoring.Models +{ + public partial class UtteranceIntentsEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedIntent"u8); + writer.WriteStringValue(ExpectedIntent); + writer.WritePropertyName("predictedIntent"u8); + writer.WriteStringValue(PredictedIntent); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + UtteranceIntentsEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceIntentsEvaluationResult(document.RootElement, options); + } + + internal static UtteranceIntentsEvaluationResult DeserializeUtteranceIntentsEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string expectedIntent = default; + string predictedIntent = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedIntent"u8)) + { + expectedIntent = property.Value.GetString(); + continue; + } + if (property.NameEquals("predictedIntent"u8)) + { + predictedIntent = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceIntentsEvaluationResult(expectedIntent, predictedIntent, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceIntentsEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeUtteranceIntentsEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} 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 UtteranceIntentsEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceIntentsEvaluationResult(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.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.cs new file mode 100644 index 000000000000..73d8e7f4ee43 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.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.Conversations.Authoring.Models +{ + /// Represents the comparison between the expected and the predicted intent for an utterance. + public partial class UtteranceIntentsEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the utterance's expected intent. + /// Represents the utterance's predicted intent. + /// or is null. + internal UtteranceIntentsEvaluationResult(string expectedIntent, string predictedIntent) + { + Argument.AssertNotNull(expectedIntent, nameof(expectedIntent)); + Argument.AssertNotNull(predictedIntent, nameof(predictedIntent)); + + ExpectedIntent = expectedIntent; + PredictedIntent = predictedIntent; + } + + /// Initializes a new instance of . + /// Represents the utterance's expected intent. + /// Represents the utterance's predicted intent. + /// Keeps track of any properties unknown to the library. + internal UtteranceIntentsEvaluationResult(string expectedIntent, string predictedIntent, IDictionary serializedAdditionalRawData) + { + ExpectedIntent = expectedIntent; + PredictedIntent = predictedIntent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceIntentsEvaluationResult() + { + } + + /// Represents the utterance's expected intent. + public string ExpectedIntent { get; } + /// Represents the utterance's predicted intent. + public string PredictedIntent { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Properties/AssemblyInfo.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..43e490abb7c2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.Conversations.Authoring.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.Conversations.Authoring/tests/Azure.AI.Language.Conversations.Authoring.Tests.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Azure.AI.Language.Conversations.Authoring.Tests.csproj new file mode 100644 index 000000000000..dc30297c67de --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Azure.AI.Language.Conversations.Authoring.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AnalyzeConversationAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AnalyzeConversationAuthoring.cs new file mode 100644 index 000000000000..bc4759b14658 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AnalyzeConversationAuthoring.cs @@ -0,0 +1,6466 @@ +// 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.AI.Language.Conversations.Authoring.Models; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Language.Conversations.Authoring.Samples +{ + public partial class Samples_AnalyzeConversationAuthoring + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + projectName = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + projectName = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities(null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync(null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities("", "", 1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync("", "", 1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); + Operation operation = client.Import(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { +new +{ +category = "", +} + }, + entities = new object[] + { +new +{ +category = "", +compositionSetting = "returnLongestOverlap", +list = new +{ +sublists = new object[] +{ +new +{ +listKey = "", +synonyms = new object[] +{ +new +{ +language = "", +values = new object[] +{ +"" +}, +} +}, +} +}, +}, +prebuilts = new object[] +{ +new +{ +category = "", +} +}, +regex = new +{ +expressions = new object[] +{ +new +{ +regexKey = "", +language = "", +regexPattern = "", +} +}, +}, +requiredComponents = new object[] +{ +"" +}, +} + }, + utterances = new object[] + { +new +{ +entities = new object[] +{ +new +{ +category = "", +offset = 1234, +length = 1234, +} +}, +text = "", +language = "", +intent = "", +dataset = "", +} + }, + projectKind = "Conversation", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { +new +{ +category = "", +} + }, + entities = new object[] + { +new +{ +category = "", +compositionSetting = "returnLongestOverlap", +list = new +{ +sublists = new object[] +{ +new +{ +listKey = "", +synonyms = new object[] +{ +new +{ +language = "", +values = new object[] +{ +"" +}, +} +}, +} +}, +}, +prebuilts = new object[] +{ +new +{ +category = "", +} +}, +regex = new +{ +expressions = new object[] +{ +new +{ +regexKey = "", +language = "", +regexPattern = "", +} +}, +}, +requiredComponents = new object[] +{ +"" +}, +} + }, + utterances = new object[] + { +new +{ +entities = new object[] +{ +new +{ +category = "", +offset = 1234, +length = 1234, +} +}, +text = "", +language = "", +intent = "", +dataset = "", +} + }, + projectKind = "Conversation", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") + { + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", + }) + { + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") +{ +CompositionSetting = CompositionSetting.ReturnLongestOverlap, +List = new ExportedEntityList +{ +Sublists = {new ExportedEntitySublist +{ +ListKey = "", +Synonyms = {new ExportedEntityListSynonym +{ +Language = "", +Values = {""}, +}}, +}}, +}, +Prebuilts = {new ExportedPrebuiltEntity("")}, +Regex = new ExportedEntityRegex +{ +Expressions = {new ExportedEntityRegexExpression +{ +RegexKey = "", +Language = "", +RegexPattern = "", +}}, +}, +RequiredComponents = {""}, +}}, + Utterances = {new ConversationExportedUtterance("", "") +{ +Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = client.Import(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") + { + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", + }) + { + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") +{ +CompositionSetting = CompositionSetting.ReturnLongestOverlap, +List = new ExportedEntityList +{ +Sublists = {new ExportedEntitySublist +{ +ListKey = "", +Synonyms = {new ExportedEntityListSynonym +{ +Language = "", +Values = {""}, +}}, +}}, +}, +Prebuilts = {new ExportedPrebuiltEntity("")}, +Regex = new ExportedEntityRegex +{ +Expressions = {new ExportedEntityRegexExpression +{ +RegexKey = "", +Language = "", +RegexPattern = "", +}}, +}, +RequiredComponents = {""}, +}}, + Utterances = {new ConversationExportedUtterance("", "") +{ +Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingMode = "advanced", + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingMode = "advanced", + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) + { + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + }; + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) + { + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + }; + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_LoadSnapshot_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_LoadSnapshot_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_LoadSnapshot_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_LoadSnapshot_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml new file mode 100644 index 000000000000..5ffd653b4404 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cognitiveservices/Language.AnalyzeConversations-authoring +commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c +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.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs new file mode 100644 index 000000000000..05ac369ffc42 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.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 EntityMaskTypePolicyType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(EntityMaskTypePolicyType)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + EntityMaskTypePolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityMaskTypePolicyType(document.RootElement, options); + } + + internal static EntityMaskTypePolicyType DeserializeEntityMaskTypePolicyType(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 EntityMaskTypePolicyType(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(EntityMaskTypePolicyType)} does not support writing '{options.Format}' format."); + } + } + + EntityMaskTypePolicyType IPersistableModel.Create(BinaryData 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 DeserializeEntityMaskTypePolicyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} 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 EntityMaskTypePolicyType FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityMaskTypePolicyType(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/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..489c0e365512 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: 92214b1faaad098434ae37b69fcc896fdf8ecc8c 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.Documents/src/Generated/AbstractiveSummarizationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.Serialization.cs new file mode 100644 index 000000000000..5507e1c2d5b2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.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.AI.Language.Documents +{ + public partial class AbstractiveSummarizationOperationAction : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(AbstractiveSummarizationOperationAction)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(ActionContent, options); + } + + AbstractiveSummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationAction)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAbstractiveSummarizationOperationAction(document.RootElement, options); + } + + internal static AbstractiveSummarizationOperationAction DeserializeAbstractiveSummarizationOperationAction(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AbstractiveSummarizationActionContent 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)) + { + parameters = AbstractiveSummarizationActionContent.DeserializeAbstractiveSummarizationActionContent(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 AbstractiveSummarizationOperationAction(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(AbstractiveSummarizationOperationAction)} does not support writing '{options.Format}' format."); + } + } + + AbstractiveSummarizationOperationAction IPersistableModel.Create(BinaryData 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 DeserializeAbstractiveSummarizationOperationAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationAction)} 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 AbstractiveSummarizationOperationAction FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAbstractiveSummarizationOperationAction(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/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.Documents/src/Generated/AnalyzeDocumentsDocumentError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.Serialization.cs new file mode 100644 index 000000000000..9f401824408b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.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 AnalyzeDocumentsDocumentError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} does not support writing '{format}' format."); + } + + 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) + { + 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 + } + } + } + + AnalyzeDocumentsDocumentError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAnalyzeDocumentsDocumentError(document.RootElement, options); + } + + internal static AnalyzeDocumentsDocumentError DeserializeAnalyzeDocumentsDocumentError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + AnalyzeDocumentsError error = 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("error"u8)) + { + error = AnalyzeDocumentsError.DeserializeAnalyzeDocumentsError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AnalyzeDocumentsDocumentError(id, error, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} does not support writing '{options.Format}' format."); + } + } + + AnalyzeDocumentsDocumentError IPersistableModel.Create(BinaryData 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 DeserializeAnalyzeDocumentsDocumentError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} 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 AnalyzeDocumentsDocumentError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeDocumentsDocumentError(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/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.Documents/src/Generated/DocumentError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.Serialization.cs new file mode 100644 index 000000000000..285ddc4aa118 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.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 DocumentError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentError)} does not support writing '{format}' format."); + } + + 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) + { + 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 + } + } + } + + DocumentError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentError(document.RootElement, options); + } + + internal static DocumentError DeserializeDocumentError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + AnalyzeDocumentsError error = 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("error"u8)) + { + error = AnalyzeDocumentsError.DeserializeAnalyzeDocumentsError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentError(id, error, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentError)} does not support writing '{options.Format}' format."); + } + } + + DocumentError IPersistableModel.Create(BinaryData 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 DeserializeDocumentError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentError)} 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 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, ModelSerializationExtensions.WireOptions); + return content; + } + } +} 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/DynamicClassificationActionContent.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/DynamicClassificationActionContent.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.cs index c786cfccc30f..8594b8a49bbd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.cs @@ -7,12 +7,11 @@ using System; using System.Collections.Generic; -using System.Linq; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - /// Supported parameters for a Dynamic Classification task. - public partial class DynamicClassificationActionContent + /// Supported parameters for an Extractive Summarization task. + public partial class ExtractiveSummarizationActionContent { /// /// Keeps track of any properties unknown to the library. @@ -46,43 +45,41 @@ public partial class DynamicClassificationActionContent /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// a list of categories to which input is classified to. - /// is null. - public DynamicClassificationActionContent(IEnumerable categories) + /// Initializes a new instance of . + public ExtractiveSummarizationActionContent() { - Argument.AssertNotNull(categories, nameof(categories)); - - Categories = categories.ToList(); } - /// Initializes a new instance of . + /// 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. + /// 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 DynamicClassificationActionContent(bool? loggingOptOut, string modelVersion, ClassificationType? classificationType, IList categories, IDictionary serializedAdditionalRawData) + internal ExtractiveSummarizationActionContent(bool? loggingOptOut, string modelVersion, long? sentenceCount, ExtractiveSummarizationSortingCriteria? sortBy, StringIndexType? stringIndexType, string query, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; - ClassificationType = classificationType; - Categories = categories; + SentenceCount = sentenceCount; + SortBy = sortBy; + StringIndexType = stringIndexType; + Query = query; _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; } + /// 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.Documents/src/Generated/InnerErrorModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.Serialization.cs new file mode 100644 index 000000000000..8d15ab03b027 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class InnerErrorModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{format}' format."); + } + + 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, 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 + } + } + } + + InnerErrorModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInnerErrorModel(document.RootElement, options); + } + + internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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("code"u8)) + { + code = new InnerErrorCode(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; + } + 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("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InnerErrorModel( + code, + message, + details ?? new ChangeTrackingDictionary(), + target, + 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(InnerErrorModel)} does not support writing '{options.Format}' format."); + } + } + + InnerErrorModel IPersistableModel.Create(BinaryData 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 DeserializeInnerErrorModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InnerErrorModel)} 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 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, ModelSerializationExtensions.WireOptions); + return content; + } + } +} 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.Documents/src/Generated/SummaryContext.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.Serialization.cs new file mode 100644 index 000000000000..701e30c62096 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.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 SummaryContext : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SummaryContext)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SummaryContext IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SummaryContext)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSummaryContext(document.RootElement, options); + } + + internal static SummaryContext DeserializeSummaryContext(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SummaryContext(offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SummaryContext)} does not support writing '{options.Format}' format."); + } + } + + SummaryContext IPersistableModel.Create(BinaryData 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 DeserializeSummaryContext(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SummaryContext)} 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 SummaryContext FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSummaryContext(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/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.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.Serialization.cs new file mode 100644 index 000000000000..e14531a2363f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.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.AI.Language.Documents +{ + internal partial class UnknownAnalyzeDocumentsLROResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(AnalyzeDocumentsLROResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + 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 UnknownAnalyzeDocumentsLROResult DeserializeUnknownAnalyzeDocumentsLROResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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("lastUpdateDateTime"u8)) + { + 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 AnalyzeDocumentsOperationResultsKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAnalyzeDocumentsLROResult(lastUpdateDateTime, status, taskName, 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(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 new UnknownAnalyzeDocumentsLROResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownAnalyzeDocumentsLROResult(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/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..e81c53693411 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cognitiveservices/Language.AnalyzeDocuments +commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Azure.AI.Language.Text.Authoring.sln b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Azure.AI.Language.Text.Authoring.sln new file mode 100644 index 000000000000..120d49becbbe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Azure.AI.Language.Text.Authoring.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.Text.Authoring", "src\Azure.AI.Language.Text.Authoring.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Text.Authoring.Tests", "tests\Azure.AI.Language.Text.Authoring.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.Text.Authoring/CHANGELOG.md b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring/Directory.Build.props b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/README.md b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/README.md new file mode 100644 index 000000000000..ffcfdb18ad35 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/README.md @@ -0,0 +1,107 @@ +# Azure.AI.Language.Text.Authoring client library for .NET + +Azure.AI.Language.Text.Authoring 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.Text.Authoring/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.Text.Authoring --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.Text.Authoring/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.Text.Authoring/README.png) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.net8.0.cs new file mode 100644 index 000000000000..f81955b6014e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.net8.0.cs @@ -0,0 +1,1897 @@ +namespace Azure.AI.Language.Text.Authoring +{ + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Text.Authoring.TextAnalysisAuthoring GetTextAnalysisAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } + public partial class TextAnalysisAuthoring + { + protected TextAnalysisAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelManifestAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelManifestAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } +} +namespace Azure.AI.Language.Text.Authoring.Models +{ + public static partial class AILanguageTextAuthoringModelFactory + { + public static Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState AssignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult CustomEntityRecognitionDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult CustomHealthcareDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult customHealthcareResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary CustomHealthcareEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customHealthcareEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult CustomMultiLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult CustomSingleLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult CustomTextSentimentDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult customTextSentimentResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary CustomTextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary customTextSentimentEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind kind = default(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind), string resourceId = null, string deploymentName = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult DocumentEntityLabelEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult DocumentEntityRecognitionEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult DocumentEntityRegionEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null, int regionOffset = 0, int regionLength = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult DocumentEvaluationResult(string projectKind = null, string location = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult DocumentHealthcareEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult DocumentMultiLabelClassificationEvaluationResult(System.Collections.Generic.IEnumerable expectedClasses = null, System.Collections.Generic.IEnumerable predictedClasses = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult DocumentSentimentLabelEvaluationResult(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment category = default(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment), int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult DocumentSingleLabelClassificationEvaluationResult(string expectedClass = null, string predictedClass = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult DocumentTextSentimentEvaluationResult(System.Collections.Generic.IEnumerable expectedSentimentSpans = null, System.Collections.Generic.IEnumerable predictedSentimentSpans = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary EntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationSummary EvaluationSummary(string projectKind = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument ExportedCustomAbstractiveSummarizationDocument(string summaryLocation = null, string location = null, string language = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest ExportedModelManifest(System.Collections.Generic.IEnumerable modelFiles = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Text.Authoring.Models.StringIndexType), Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ModelFile ModelFile(string name = null, System.Uri contentUri = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary MultiLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary MultiLabelClassificationEvaluationSummary(System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary SentimentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary SingleLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary SingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary sentiments = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError TextAnalysisAuthoringError(Azure.AI.Language.Text.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning TextAnalysisAuthoringWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary TextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary spanSentimentsEvaluation = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings dataGenerationSettings = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState UnassignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.CompositionSetting 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.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult CustomEntityRecognitionResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult CustomHealthcareResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomHealthcareEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult CustomMultiLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult CustomSingleLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult CustomTextSentimentResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary CustomTextSentimentEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationConnectionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationConnectionInfo(string resourceId, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind Kind { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DataGenerationConnectionInfoKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationConnectionInfoKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind AzureOpenAI { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind 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.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataGenerationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationSettings(bool enableDataGeneration, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo dataGenerationConnectionInfo) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo { get { throw null; } } + public bool EnableDataGeneration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityLabelEvaluationResult() { } + public string Category { get { throw null; } } + 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.Text.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRecognitionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRecognitionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRegionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRegionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + public int RegionLength { get { throw null; } } + public int RegionOffset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 DocumentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DocumentEvaluationResult(string location, string language) { } + public string Language { get { throw null; } } + public string Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentHealthcareEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentHealthcareEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentMultiLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentMultiLabelClassificationEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedClasses { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedClasses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSentimentLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSentimentLabelEvaluationResult() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Category { get { throw null; } } + 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.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSingleLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSingleLabelClassificationEvaluationResult() { } + public string ExpectedClass { get { throw null; } } + public string PredictedClass { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentTextSentimentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentTextSentimentEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedSentimentSpans { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedSentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityRecognitionEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityRecognitionEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ErrorCode 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.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.EvaluationKind 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.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions) { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCompositeEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCompositeEntity() { } + public string Category { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationDocument(string summaryLocation) { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public string SummaryLocation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationDocument() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationDocument() { } + public Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass Class { get { throw null; } set { } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentDocument() { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IList SentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityLabel() { } + public string Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityRegion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityRegion() { } + public System.Collections.Generic.IList Labels { get { throw null; } } + public int? RegionLength { get { throw null; } set { } } + public int? RegionOffset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentSentimentLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentSentimentLabel() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment? Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntity() { } + public string Category { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelManifest() { } + public System.Collections.Generic.IReadOnlyList ModelFiles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.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.Text.Authoring.Models.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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.JobStatus 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.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ModelFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ModelFile() { } + public System.Uri ContentUri { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ModelFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ModelFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomAbstractiveSummarization { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomEntityRecognition { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomHealthcare { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomMultiLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomSingleLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomTextSentiment { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ProjectKind 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.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings() { } + public string AmlProjectPath { get { throw null; } set { } } + public float? ConfidenceThreshold { get { throw null; } set { } } + public int? GptPredictiveLookahead { get { throw null; } set { } } + public bool? IsLabelingLocked { get { throw null; } set { } } + public bool? RunGptPredictions { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SentimentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SpanSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SpanSentimentEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Sentiments { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 StringIndexType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StringIndexType(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextAnalysisAuthoringError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringError() { } + public Azure.AI.Language.Text.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 TextAnalysisAuthoringSentiment : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextAnalysisAuthoringSentiment(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Negative { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Neutral { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Positive { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment 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.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TextAnalysisAuthoringWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextSentimentEvaluationSummary() { } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, string trainingConfigVersion) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings DataGenerationSettings { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UnassignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageTextAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.netstandard2.0.cs new file mode 100644 index 000000000000..f81955b6014e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.netstandard2.0.cs @@ -0,0 +1,1897 @@ +namespace Azure.AI.Language.Text.Authoring +{ + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Text.Authoring.TextAnalysisAuthoring GetTextAnalysisAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } + public partial class TextAnalysisAuthoring + { + protected TextAnalysisAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelManifestAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelManifestAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } +} +namespace Azure.AI.Language.Text.Authoring.Models +{ + public static partial class AILanguageTextAuthoringModelFactory + { + public static Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState AssignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult CustomEntityRecognitionDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult CustomHealthcareDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult customHealthcareResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary CustomHealthcareEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customHealthcareEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult CustomMultiLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult CustomSingleLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult CustomTextSentimentDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult customTextSentimentResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary CustomTextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary customTextSentimentEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind kind = default(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind), string resourceId = null, string deploymentName = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult DocumentEntityLabelEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult DocumentEntityRecognitionEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult DocumentEntityRegionEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null, int regionOffset = 0, int regionLength = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult DocumentEvaluationResult(string projectKind = null, string location = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult DocumentHealthcareEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult DocumentMultiLabelClassificationEvaluationResult(System.Collections.Generic.IEnumerable expectedClasses = null, System.Collections.Generic.IEnumerable predictedClasses = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult DocumentSentimentLabelEvaluationResult(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment category = default(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment), int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult DocumentSingleLabelClassificationEvaluationResult(string expectedClass = null, string predictedClass = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult DocumentTextSentimentEvaluationResult(System.Collections.Generic.IEnumerable expectedSentimentSpans = null, System.Collections.Generic.IEnumerable predictedSentimentSpans = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary EntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationSummary EvaluationSummary(string projectKind = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument ExportedCustomAbstractiveSummarizationDocument(string summaryLocation = null, string location = null, string language = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest ExportedModelManifest(System.Collections.Generic.IEnumerable modelFiles = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Text.Authoring.Models.StringIndexType), Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ModelFile ModelFile(string name = null, System.Uri contentUri = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary MultiLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary MultiLabelClassificationEvaluationSummary(System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary SentimentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary SingleLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary SingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary sentiments = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError TextAnalysisAuthoringError(Azure.AI.Language.Text.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning TextAnalysisAuthoringWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary TextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary spanSentimentsEvaluation = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings dataGenerationSettings = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState UnassignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.CompositionSetting 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.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult CustomEntityRecognitionResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult CustomHealthcareResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomHealthcareEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult CustomMultiLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult CustomSingleLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult CustomTextSentimentResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary CustomTextSentimentEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationConnectionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationConnectionInfo(string resourceId, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind Kind { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DataGenerationConnectionInfoKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationConnectionInfoKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind AzureOpenAI { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind 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.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataGenerationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationSettings(bool enableDataGeneration, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo dataGenerationConnectionInfo) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo { get { throw null; } } + public bool EnableDataGeneration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityLabelEvaluationResult() { } + public string Category { get { throw null; } } + 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.Text.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRecognitionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRecognitionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRegionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRegionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + public int RegionLength { get { throw null; } } + public int RegionOffset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 DocumentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DocumentEvaluationResult(string location, string language) { } + public string Language { get { throw null; } } + public string Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentHealthcareEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentHealthcareEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentMultiLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentMultiLabelClassificationEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedClasses { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedClasses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSentimentLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSentimentLabelEvaluationResult() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Category { get { throw null; } } + 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.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSingleLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSingleLabelClassificationEvaluationResult() { } + public string ExpectedClass { get { throw null; } } + public string PredictedClass { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentTextSentimentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentTextSentimentEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedSentimentSpans { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedSentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityRecognitionEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityRecognitionEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ErrorCode 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.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.EvaluationKind 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.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions) { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCompositeEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCompositeEntity() { } + public string Category { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationDocument(string summaryLocation) { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public string SummaryLocation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationDocument() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationDocument() { } + public Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass Class { get { throw null; } set { } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentDocument() { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IList SentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityLabel() { } + public string Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityRegion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityRegion() { } + public System.Collections.Generic.IList Labels { get { throw null; } } + public int? RegionLength { get { throw null; } set { } } + public int? RegionOffset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentSentimentLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentSentimentLabel() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment? Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntity() { } + public string Category { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelManifest() { } + public System.Collections.Generic.IReadOnlyList ModelFiles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.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.Text.Authoring.Models.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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.JobStatus 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.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ModelFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ModelFile() { } + public System.Uri ContentUri { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ModelFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ModelFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomAbstractiveSummarization { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomEntityRecognition { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomHealthcare { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomMultiLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomSingleLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomTextSentiment { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ProjectKind 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.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings() { } + public string AmlProjectPath { get { throw null; } set { } } + public float? ConfidenceThreshold { get { throw null; } set { } } + public int? GptPredictiveLookahead { get { throw null; } set { } } + public bool? IsLabelingLocked { get { throw null; } set { } } + public bool? RunGptPredictions { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SentimentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SpanSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SpanSentimentEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Sentiments { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 StringIndexType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StringIndexType(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextAnalysisAuthoringError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringError() { } + public Azure.AI.Language.Text.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.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.Text.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 TextAnalysisAuthoringSentiment : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextAnalysisAuthoringSentiment(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Negative { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Neutral { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Positive { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment 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.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TextAnalysisAuthoringWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextSentimentEvaluationSummary() { } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, string trainingConfigVersion) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings DataGenerationSettings { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UnassignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { 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.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageTextAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Azure.AI.Language.Text.Authoring.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Azure.AI.Language.Text.Authoring.csproj new file mode 100644 index 000000000000..ae49f23f6115 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Azure.AI.Language.Text.Authoring.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.AI.Language.Text.Authoring client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.AI.Language.Text.Authoring for Azure Data Plane + 1.0.0-beta.1 + Azure.AI.Language.Text.Authoring + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringClientBuilderExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringClientBuilderExtensions.cs new file mode 100644 index 000000000000..5068ba1246ed --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringClientBuilderExtensions.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.AI.Language.Text.Authoring; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AILanguageTextAuthoringClientBuilderExtensions + { + /// 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 AddAuthoringClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new AuthoringClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new AuthoringClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringModelFactory.cs new file mode 100644 index 000000000000..23858bab8267 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringModelFactory.cs @@ -0,0 +1,1141 @@ +// 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.Authoring.Models +{ + /// Model factory for models. + public static partial class AILanguageTextAuthoringModelFactory + { + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project last modification datetime. + /// Represents the project last training datetime. + /// Represents the project last deployment datetime. + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static ProjectMetadata ProjectMetadata(DateTimeOffset createdDateTime = default, DateTimeOffset lastModifiedDateTime = default, DateTimeOffset? lastTrainedDateTime = null, DateTimeOffset? lastDeployedDateTime = null, ProjectKind projectKind = default, string storageInputContainerName = null, ProjectSettings settings = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + language, + 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 TextAnalysisAuthoringError TextAnalysisAuthoringError(ErrorCode code = default, string message = null, string target = null, IEnumerable details = null, InnerErrorModel innererror = null) + { + details ??= new List(); + + return new TextAnalysisAuthoringError( + 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 . + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static CreateProjectDetails CreateProjectDetails(ProjectKind projectKind = default, string storageInputContainerName = null, ProjectSettings settings = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new CreateProjectDetails( + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 ExportedProject ExportedProject(string projectFileVersion = null, StringIndexType stringIndexType = default, CreateProjectDetails metadata = null, ExportedProjectAssets assets = null) + { + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the summary file location in the blob store container associated with the project. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// A new instance for mocking. + public static ExportedCustomAbstractiveSummarizationDocument ExportedCustomAbstractiveSummarizationDocument(string summaryLocation = null, string location = null, string language = null, string dataset = null) + { + return new ExportedCustomAbstractiveSummarizationDocument(summaryLocation, location, language, dataset, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// Represents the settings for using data generation as part of training a custom model. + /// A new instance for mocking. + public static TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, EvaluationDetails evaluationOptions = null, DataGenerationSettings dataGenerationSettings = null) + { + return new TrainingJobDetails(modelLabel, trainingConfigVersion, evaluationOptions, dataGenerationSettings, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Connection type for data generation settings. Currently only supports Azure Open AI. + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + /// Deployment name of model to be used for synthetic data generation. + /// A new instance for mocking. + public static DataGenerationConnectionInfo DataGenerationConnectionInfo(DataGenerationConnectionInfoKind kind = default, string resourceId = null, string deploymentName = null) + { + return new DataGenerationConnectionInfo(kind, resourceId, deploymentName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents model train status. + /// Represents model evaluation status. + /// Represents the estimate end date time for training and evaluation. + /// A new instance for mocking. + public static TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, SubTrainingJobState trainingStatus = null, SubTrainingJobState evaluationStatus = null, DateTimeOffset? estimatedEndDateTime = null) + { + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// A new instance for mocking. + public static SubTrainingJobState SubTrainingJobState(int percentComplete = default, DateTimeOffset? startDateTime = null, DateTimeOffset? endDateTime = null, JobStatus status = default) + { + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// A new instance for mocking. + public static TrainingJobState TrainingJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, TrainingJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// A new instance for mocking. + public static TextAnalysisAuthoringWarning TextAnalysisAuthoringWarning(string code = null, string message = null) + { + return new TextAnalysisAuthoringWarning(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static CopyProjectJobState CopyProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// A new instance for mocking. + public static ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default, string modelTrainingConfigVersion = null, IEnumerable assignedResources = null) + { + assignedResources ??= new List(); + + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// A new instance for mocking. + public static DeploymentResource DeploymentResource(string resourceId = null, string region = null) + { + return new DeploymentResource(resourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// A new instance for mocking. + public static CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, IEnumerable assignedResourceIds = null) + { + assignedResourceIds ??= new List(); + + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentJobState DeploymentJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// A new instance for mocking. + public static ExportProjectJobState ExportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, string resultUrl = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + resultUrl, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// A new instance for mocking. + public static ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastExportedModelDateTime = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null) + { + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ExportedModelJobState ExportedModelJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The model files belonging to this model. + /// A new instance for mocking. + public static ExportedModelManifest ExportedModelManifest(IEnumerable modelFiles = null) + { + modelFiles ??= new List(); + + return new ExportedModelManifest(modelFiles?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the file. + /// The URI to retrieve the content of the file. + /// A new instance for mocking. + public static ModelFile ModelFile(string name = null, Uri contentUri = null) + { + return new ModelFile(name, contentUri, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ImportProjectJobState ImportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// A new instance for mocking. + public static ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, int lastTrainingDurationInSeconds = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null, bool hasSnapshot = default) + { + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// A new instance for mocking. + public static EvaluationJobResult EvaluationJobResult(EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = default) + { + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// A new instance for mocking. + public static EvaluationJobState EvaluationJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, EvaluationJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static DocumentEvaluationResult DocumentEvaluationResult(string projectKind = null, string location = null, string language = null) + { + return new UnknownDocumentEvaluationResult(projectKind == null ? default : new ProjectKind(projectKind), location, language, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// A new instance for mocking. + public static CustomEntityRecognitionDocumentEvaluationResult CustomEntityRecognitionDocumentEvaluationResult(string location = null, string language = null, DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = null) + { + return new CustomEntityRecognitionDocumentEvaluationResult(ProjectKind.CustomEntityRecognition, location, language, serializedAdditionalRawData: null, customEntityRecognitionResult); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// A new instance for mocking. + public static DocumentEntityRecognitionEvaluationResult DocumentEntityRecognitionEvaluationResult(IEnumerable entities = null) + { + entities ??= new List(); + + return new DocumentEntityRecognitionEvaluationResult(entities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the region's expected entity labels. + /// Represents the region's predicted entity labels. + /// Represents the region offset. + /// Represents the region length. + /// A new instance for mocking. + public static DocumentEntityRegionEvaluationResult DocumentEntityRegionEvaluationResult(IEnumerable expectedEntities = null, IEnumerable predictedEntities = null, int regionOffset = default, int regionLength = default) + { + expectedEntities ??= new List(); + predictedEntities ??= new List(); + + return new DocumentEntityRegionEvaluationResult(expectedEntities?.ToList(), predictedEntities?.ToList(), regionOffset, regionLength, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// A new instance for mocking. + public static DocumentEntityLabelEvaluationResult DocumentEntityLabelEvaluationResult(string category = null, int offset = default, int length = default) + { + return new DocumentEntityLabelEvaluationResult(category, offset, length, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// A new instance for mocking. + public static CustomHealthcareDocumentEvaluationResult CustomHealthcareDocumentEvaluationResult(string location = null, string language = null, DocumentHealthcareEvaluationResult customHealthcareResult = null) + { + return new CustomHealthcareDocumentEvaluationResult(ProjectKind.CustomHealthcare, location, language, serializedAdditionalRawData: null, customHealthcareResult); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// A new instance for mocking. + public static DocumentHealthcareEvaluationResult DocumentHealthcareEvaluationResult(IEnumerable entities = null) + { + entities ??= new List(); + + return new DocumentHealthcareEvaluationResult(entities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for multi label classification. + /// A new instance for mocking. + public static CustomMultiLabelClassificationDocumentEvaluationResult CustomMultiLabelClassificationDocumentEvaluationResult(string location = null, string language = null, DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = null) + { + return new CustomMultiLabelClassificationDocumentEvaluationResult(ProjectKind.CustomMultiLabelClassification, location, language, serializedAdditionalRawData: null, customMultiLabelClassificationResult); + } + + /// Initializes a new instance of . + /// Represents the document's expected classes. + /// Represents the document's predicted classes. + /// A new instance for mocking. + public static DocumentMultiLabelClassificationEvaluationResult DocumentMultiLabelClassificationEvaluationResult(IEnumerable expectedClasses = null, IEnumerable predictedClasses = null) + { + expectedClasses ??= new List(); + predictedClasses ??= new List(); + + return new DocumentMultiLabelClassificationEvaluationResult(expectedClasses?.ToList(), predictedClasses?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for single label classification. + /// A new instance for mocking. + public static CustomSingleLabelClassificationDocumentEvaluationResult CustomSingleLabelClassificationDocumentEvaluationResult(string location = null, string language = null, DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = null) + { + return new CustomSingleLabelClassificationDocumentEvaluationResult(ProjectKind.CustomSingleLabelClassification, location, language, serializedAdditionalRawData: null, customSingleLabelClassificationResult); + } + + /// Initializes a new instance of . + /// Represents the document's expected class. + /// Represents the document's predicted class. + /// A new instance for mocking. + public static DocumentSingleLabelClassificationEvaluationResult DocumentSingleLabelClassificationEvaluationResult(string expectedClass = null, string predictedClass = null) + { + return new DocumentSingleLabelClassificationEvaluationResult(expectedClass, predictedClass, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for text sentiment. + /// A new instance for mocking. + public static CustomTextSentimentDocumentEvaluationResult CustomTextSentimentDocumentEvaluationResult(string location = null, string language = null, DocumentTextSentimentEvaluationResult customTextSentimentResult = null) + { + return new CustomTextSentimentDocumentEvaluationResult(ProjectKind.CustomTextSentiment, location, language, serializedAdditionalRawData: null, customTextSentimentResult); + } + + /// Initializes a new instance of . + /// Represents the document's expected sentiment labels. + /// Represents the document's predicted sentiment labels. + /// A new instance for mocking. + public static DocumentTextSentimentEvaluationResult DocumentTextSentimentEvaluationResult(IEnumerable expectedSentimentSpans = null, IEnumerable predictedSentimentSpans = null) + { + expectedSentimentSpans ??= new List(); + predictedSentimentSpans ??= new List(); + + return new DocumentTextSentimentEvaluationResult(expectedSentimentSpans?.ToList(), predictedSentimentSpans?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the sentiment category. + /// Represents the sentiment offset index relative to the original text. + /// Represents the sentiment length. + /// A new instance for mocking. + public static DocumentSentimentLabelEvaluationResult DocumentSentimentLabelEvaluationResult(TextAnalysisAuthoringSentiment category = default, int offset = default, int length = default) + { + return new DocumentSentimentLabelEvaluationResult(category, offset, length, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// A new instance for mocking. + public static EvaluationSummary EvaluationSummary(string projectKind = null, EvaluationDetails evaluationOptions = null) + { + return new UnknownEvaluationSummary(projectKind == null ? default : new ProjectKind(projectKind), evaluationOptions, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to extraction evaluation. + /// A new instance for mocking. + public static CustomEntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluationSummary(EvaluationDetails evaluationOptions = null, EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = null) + { + return new CustomEntityRecognitionEvaluationSummary(ProjectKind.CustomEntityRecognition, evaluationOptions, serializedAdditionalRawData: null, customEntityRecognitionEvaluation); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static EntityRecognitionEvaluationSummary EntityRecognitionEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary entities = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + entities ??= new Dictionary(); + + return new EntityRecognitionEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrix ConfusionMatrix(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrix(additionalProperties); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrixRow ConfusionMatrixRow(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrixRow(additionalProperties); + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// A new instance for mocking. + public static ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = default, float rawValue = default) + { + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static EntityEvaluationSummary EntityEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to health care evaluation. + /// A new instance for mocking. + public static CustomHealthcareEvaluationSummary CustomHealthcareEvaluationSummary(EvaluationDetails evaluationOptions = null, EntityRecognitionEvaluationSummary customHealthcareEvaluation = null) + { + return new CustomHealthcareEvaluationSummary(ProjectKind.CustomHealthcare, evaluationOptions, serializedAdditionalRawData: null, customHealthcareEvaluation); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to multi label classification evaluation. + /// A new instance for mocking. + public static CustomMultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions = null, MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = null) + { + return new CustomMultiLabelClassificationEvaluationSummary(ProjectKind.CustomMultiLabelClassification, evaluationOptions, serializedAdditionalRawData: null, customMultiLabelClassificationEvaluation); + } + + /// Initializes a new instance of . + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static MultiLabelClassificationEvaluationSummary MultiLabelClassificationEvaluationSummary(IReadOnlyDictionary classes = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + classes ??= new Dictionary(); + + return new MultiLabelClassificationEvaluationSummary( + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static MultiLabelClassEvaluationSummary MultiLabelClassEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new MultiLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to single label classification evaluation. + /// A new instance for mocking. + public static CustomSingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions = null, SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = null) + { + return new CustomSingleLabelClassificationEvaluationSummary(ProjectKind.CustomSingleLabelClassification, evaluationOptions, serializedAdditionalRawData: null, customSingleLabelClassificationEvaluation); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static SingleLabelClassificationEvaluationSummary SingleLabelClassificationEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary classes = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + classes ??= new Dictionary(); + + return new SingleLabelClassificationEvaluationSummary( + confusionMatrix, + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static SingleLabelClassEvaluationSummary SingleLabelClassEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new SingleLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to custom sentiment evaluation. + /// A new instance for mocking. + public static CustomTextSentimentEvaluationSummary CustomTextSentimentEvaluationSummary(EvaluationDetails evaluationOptions = null, TextSentimentEvaluationSummary customTextSentimentEvaluation = null) + { + return new CustomTextSentimentEvaluationSummary(ProjectKind.CustomTextSentiment, evaluationOptions, serializedAdditionalRawData: null, customTextSentimentEvaluation); + } + + /// Initializes a new instance of . + /// Represents evaluation of span level sentiments. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static TextSentimentEvaluationSummary TextSentimentEvaluationSummary(SpanSentimentEvaluationSummary spanSentimentsEvaluation = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + return new TextSentimentEvaluationSummary( + spanSentimentsEvaluation, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + /// Represents the sentiment evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static SpanSentimentEvaluationSummary SpanSentimentEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary sentiments = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + sentiments ??= new Dictionary(); + + return new SpanSentimentEvaluationSummary( + confusionMatrix, + sentiments, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static SentimentEvaluationSummary SentimentEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new SentimentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// A new instance for mocking. + public static AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) + { + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static AssignDeploymentResourcesJobState AssignDeploymentResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new AssignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static UnassignDeploymentResourcesJobState UnassignDeploymentResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new UnassignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// A new instance for mocking. + public static AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, IEnumerable deploymentsMetadata = null) + { + deploymentsMetadata ??= new List(); + + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// A new instance for mocking. + public static AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default) + { + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) + { + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// A new instance for mocking. + public static PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) + { + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// A new instance for mocking. + public static TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, DateTimeOffset modelExpirationDate = default) + { + return new TrainingConfigVersion(trainingConfigVersionProperty, modelExpirationDate, serializedAdditionalRawData: null); + } + } +} 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 new file mode 100644 index 000000000000..acd2ec3b46fe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +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://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"; + private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// 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 AuthoringClient for mocking. + protected AuthoringClient() + { + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, AzureKeyCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AuthoringClient. + /// 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 AuthoringClient(Uri endpoint, TokenCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of TextAnalysisAuthoring. + /// The API version to use for this operation. + /// is null. + public virtual TextAnalysisAuthoring GetTextAnalysisAuthoringClient(string apiVersion = "2024-11-15-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new TextAnalysisAuthoring(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClientOptions.cs new file mode 100644 index 000000000000..4c7c68bce1dd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClientOptions.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring +{ + /// Client options for AuthoringClient. + public partial class AuthoringClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-04-01". + V2023_04_01 = 1, + /// Service version "2023-04-15-preview". + V2023_04_15_Preview = 2, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 3, + } + + internal string Version { get; } + + /// Initializes new instance of AuthoringClientOptions. + public AuthoringClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_04_01 => "2023-04-01", + ServiceVersion.V2023_04_15_Preview => "2023-04-15-preview", + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Docs/TextAnalysisAuthoring.xml b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Docs/TextAnalysisAuthoring.xml new file mode 100644 index 000000000000..9d6677f775eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Docs/TextAnalysisAuthoring.xml @@ -0,0 +1,5789 @@ + + + + + +This sample shows how to call GetProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> +This sample shows how to call GetProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> + + + +This sample shows how to call GetProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> +This sample shows how to call GetProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> + + + +This sample shows how to call GetProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProjectAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call GetProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProject with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProjectAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProject with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorization. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorization and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> +This sample shows how to call GetDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> + + + +This sample shows how to call GetDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> +This sample shows how to call GetDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> + + + +This sample shows how to call GetDeploymentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeploymentAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeployment and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeployment with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> +This sample shows how to call GetExportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetExportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> +This sample shows how to call GetExportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> + + + +This sample shows how to call GetExportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetExportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> +This sample shows how to call GetExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> + + + +This sample shows how to call GetExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> +This sample shows how to call GetExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> + + + +This sample shows how to call GetExportedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportedModelManifestAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", ""); +]]> +This sample shows how to call GetExportedModelManifestAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", ""); +]]> + + + +This sample shows how to call GetExportedModelManifest. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", ""); +]]> +This sample shows how to call GetExportedModelManifest with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", ""); +]]> + + + +This sample shows how to call GetExportedModelManifestAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> +This sample shows how to call GetExportedModelManifestAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> + + + +This sample shows how to call GetExportedModelManifest and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> +This sample shows how to call GetExportedModelManifest with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> + + + +This sample shows how to call GetImportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> +This sample shows how to call GetImportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetImportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> +This sample shows how to call GetImportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> + + + +This sample shows how to call GetImportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetImportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> + + + +This sample shows how to call GetTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> +This sample shows how to call GetTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> + + + +This sample shows how to call GetTrainedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call GetTrainedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call DeleteTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> +This sample shows how to call GetEvaluationStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetEvaluationStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummary. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummary and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> + + + +This sample shows how to call GetTrainingStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> +This sample shows how to call GetTrainingStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> + + + +This sample shows how to call GetTrainingStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync()) +{ +} +]]> +This sample shows how to call GetProjectsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjects. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects()) +{ +} +]]> +This sample shows how to call GetProjects with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjectsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjectsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetProjects and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjects with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("")) +{ +} +]]> +This sample shows how to call GetDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("")) +{ +} +]]> +This sample shows how to call GetExportedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("")) +{ +} +]]> +This sample shows how to call GetTrainedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResults. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResults and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) +{ +} +]]> +This sample shows how to call GetDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResources and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResources with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobs. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("")) +{ +} +]]> +This sample shows how to call GetTrainingJobs with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobs and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobs with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync()) +{ +} +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetAssignedResourceDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments()) +{ +} +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call GetAssignedResourceDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetAssignedResourceDeployments(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetAssignedResourceDeployments(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync()) +{ +} +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetSupportedLanguages. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (SupportedLanguage item in client.GetSupportedLanguages()) +{ +} +]]> +This sample shows how to call GetSupportedLanguages with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (SupportedLanguage item in client.GetSupportedLanguages(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedLanguagesAsync(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedLanguagesAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedLanguages and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedLanguages(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> +This sample shows how to call GetSupportedLanguages with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedLanguages("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) +{ +} +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) +{ +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) +{ +} +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) +{ +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync()) +{ +} +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingConfigVersions. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions()) +{ +} +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingConfigVersions and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingConfigVersions(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingConfigVersions("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call DeleteProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call DeleteProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call ImportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") +{ + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", +}) +{ + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") + { + Location = "", + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, format: ""); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); +Operation operation = client.Import(WaitUntil.Completed, "", body); +]]> +This sample shows how to call Import with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") +{ + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", +}) +{ + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") + { + Location = "", + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = client.Import(WaitUntil.Completed, "", body, format: ""); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call ImportAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { + new + { + summaryLocation = "", + location = "", + language = "", + dataset = "", + } + }, + projectKind = "CustomAbstractiveSummarization", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, format: ""); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content); +]]> +This sample shows how to call Import with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { + new + { + summaryLocation = "", + location = "", + language = "", + dataset = "", + } + }, + projectKind = "CustomAbstractiveSummarization", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content, format: ""); +]]> + + + +This sample shows how to call TrainAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", ""); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call TrainAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", "") +{ + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), +}; +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call Train. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", ""); +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call Train with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", "") +{ + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), +}; +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call TrainAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call TrainAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call Train and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call Train with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeployments with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call EvaluateModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModelAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call EvaluateModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModel with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call LoadSnapshotAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshotAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call LoadSnapshot. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshot with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CancelTrainingJobAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJob. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJob with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJobAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call CancelTrainingJob and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJob with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Argument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..3fa25d1d24da --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring +{ + 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.Text.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..74e36eab8e74 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring +{ + 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.Text.Authoring/src/Generated/Internal/ChangeTrackingList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..403fa2389393 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring +{ + 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.Text.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..3c5697bcb4b4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring +{ + 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.Text.Authoring/src/Generated/Internal/Optional.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..017fd861b854 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring +{ + 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.Text.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..9575d889e32b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring +{ + 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.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs new file mode 100644 index 000000000000..70b3163cb78c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class AssignDeploymentResourcesDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourcesMetadata"u8); + writer.WriteStartArray(); + foreach (var item in ResourcesMetadata) + { + 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 + } + } + } + + AssignDeploymentResourcesDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + + internal static AssignDeploymentResourcesDetails DeserializeAssignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resourcesMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourcesMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceMetadata.DeserializeResourceMetadata(item, options)); + } + resourcesMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignDeploymentResourcesDetails(resourcesMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); + } + } + + AssignDeploymentResourcesDetails IPersistableModel.Create(BinaryData 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 DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} 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 AssignDeploymentResourcesDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignDeploymentResourcesDetails(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.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..2bbfb5188cb7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for assigning Azure resources to a project. + public partial class AssignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// is null. + public AssignDeploymentResourcesDetails(IEnumerable resourcesMetadata) + { + Argument.AssertNotNull(resourcesMetadata, nameof(resourcesMetadata)); + + ResourcesMetadata = resourcesMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// Keeps track of any properties unknown to the library. + internal AssignDeploymentResourcesDetails(IList resourcesMetadata, IDictionary serializedAdditionalRawData) + { + ResourcesMetadata = resourcesMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignDeploymentResourcesDetails() + { + } + + /// Represents the metadata for the resources to be assigned. + public IList ResourcesMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..bda18efe99e8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class AssignDeploymentResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + AssignDeploymentResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignDeploymentResourcesJobState(document.RootElement, options); + } + + internal static AssignDeploymentResourcesJobState DeserializeAssignDeploymentResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(AssignDeploymentResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + AssignDeploymentResourcesJobState IPersistableModel.Create(BinaryData 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 DeserializeAssignDeploymentResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesJobState)} 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 AssignDeploymentResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignDeploymentResourcesJobState(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.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.cs new file mode 100644 index 000000000000..7661a3cd0353 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a assign deployment resources job. + public partial class AssignDeploymentResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal AssignDeploymentResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal AssignDeploymentResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignDeploymentResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs new file mode 100644 index 000000000000..9bfeba044263 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class AssignedDeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + } + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + AssignedDeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedDeploymentResource(document.RootElement, options); + } + + internal static AssignedDeploymentResource DeserializeAssignedDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + AssignedDeploymentResource IPersistableModel.Create(BinaryData 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 DeserializeAssignedDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} 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 AssignedDeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedDeploymentResource(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.Authoring/src/Generated/Models/AssignedDeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.cs new file mode 100644 index 000000000000..3981d1d5e0f4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the assigned deployment resource. + public partial class AssignedDeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 resource region. + /// is null. + internal AssignedDeploymentResource(string region) + { + Argument.AssertNotNull(region, nameof(region)); + + Region = region; + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedDeploymentResource(string azureResourceId, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedDeploymentResource() + { + } + + /// The resource ID. + public string AzureResourceId { get; } + /// The resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs new file mode 100644 index 000000000000..d30582549888 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.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.AI.Language.Text.Authoring.Models +{ + public partial class AssignedProjectDeploymentMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + AssignedProjectDeploymentMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentMetadata DeserializeAssignedProjectDeploymentMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentMetadata IPersistableModel.Create(BinaryData 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 DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} 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 AssignedProjectDeploymentMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentMetadata(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.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs new file mode 100644 index 000000000000..8b5d9c8fe883 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.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.AI.Language.Text.Authoring.Models +{ + /// Represents the metadata for an assigned deployment. + public partial class AssignedProjectDeploymentMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// is null. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate) + { + Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentMetadata() + { + } + + /// Represents the deployment name. + public string DeploymentName { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs new file mode 100644 index 000000000000..fa117bf2c3ec --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.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.AI.Language.Text.Authoring.Models +{ + public partial class AssignedProjectDeploymentsMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + } + writer.WritePropertyName("deploymentsMetadata"u8); + writer.WriteStartArray(); + foreach (var item in DeploymentsMetadata) + { + 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 + } + } + } + + AssignedProjectDeploymentsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentsMetadata DeserializeAssignedProjectDeploymentsMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectName = default; + IReadOnlyList deploymentsMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentsMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AssignedProjectDeploymentMetadata.DeserializeAssignedProjectDeploymentMetadata(item, options)); + } + deploymentsMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentsMetadata IPersistableModel.Create(BinaryData 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 DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} 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 AssignedProjectDeploymentsMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentsMetadata(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.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs new file mode 100644 index 000000000000..f7ddb77f5cdb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.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.AI.Language.Text.Authoring.Models +{ + /// Represents the metadata for assigned deployments for a project. + public partial class AssignedProjectDeploymentsMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the resource region. + /// is null. + internal AssignedProjectDeploymentsMetadata(IEnumerable deploymentsMetadata) + { + Argument.AssertNotNull(deploymentsMetadata, nameof(deploymentsMetadata)); + + DeploymentsMetadata = deploymentsMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentsMetadata(string projectName, IReadOnlyList deploymentsMetadata, IDictionary serializedAdditionalRawData) + { + ProjectName = projectName; + DeploymentsMetadata = deploymentsMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentsMetadata() + { + } + + /// Represents the project name. + public string ProjectName { get; } + /// Represents the resource region. + public IReadOnlyList DeploymentsMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CompositionSetting.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CompositionSetting.cs new file mode 100644 index 000000000000..2ee1a6c15cce --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CompositionSetting.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.Text.Authoring.Models +{ + /// The CompositionSetting. + public readonly partial struct CompositionSetting : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CompositionSetting(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SeparateComponentsValue = "separateComponents"; + private const string CombineComponentsValue = "combineComponents"; + + /// Every component's match or prediction is returned as a separate instance of the entity. + public static CompositionSetting SeparateComponents { get; } = new CompositionSetting(SeparateComponentsValue); + /// When two or more components are found in the text and overlap, the components' spans are merged together into one span combining all of them. + public static CompositionSetting CombineComponents { get; } = new CompositionSetting(CombineComponentsValue); + /// Determines if two values are the same. + public static bool operator ==(CompositionSetting left, CompositionSetting right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CompositionSetting left, CompositionSetting right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CompositionSetting(string value) => new CompositionSetting(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CompositionSetting other && Equals(other); + /// + public bool Equals(CompositionSetting other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs new file mode 100644 index 000000000000..130f76344bd0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ConfusionMatrix : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + 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 + } + } + + ConfusionMatrix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrix(document.RootElement, options); + } + + internal static ConfusionMatrix DeserializeConfusionMatrix(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrix(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrix IPersistableModel.Create(BinaryData 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 DeserializeConfusionMatrix(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} 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 ConfusionMatrix FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrix(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.Authoring/src/Generated/Models/ConfusionMatrix.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.cs new file mode 100644 index 000000000000..004bbed08c3c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.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.Text.Authoring.Models +{ + /// The ConfusionMatrix. + public partial class ConfusionMatrix + { + /// Initializes a new instance of . + internal ConfusionMatrix() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrix(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs new file mode 100644 index 000000000000..8b4459453a7b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.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.Text.Authoring.Models +{ + public partial class ConfusionMatrixCell : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("normalizedValue"u8); + writer.WriteNumberValue(NormalizedValue); + writer.WritePropertyName("rawValue"u8); + writer.WriteNumberValue(RawValue); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ConfusionMatrixCell IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixCell(document.RootElement, options); + } + + internal static ConfusionMatrixCell DeserializeConfusionMatrixCell(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float normalizedValue = default; + float rawValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("normalizedValue"u8)) + { + normalizedValue = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("rawValue"u8)) + { + rawValue = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixCell IPersistableModel.Create(BinaryData 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 DeserializeConfusionMatrixCell(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} 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 ConfusionMatrixCell FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixCell(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.Authoring/src/Generated/Models/ConfusionMatrixCell.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.cs new file mode 100644 index 000000000000..b75dec32f7eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.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.Text.Authoring.Models +{ + /// Represents a cell in a confusion matrix. + public partial class ConfusionMatrixCell + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + internal ConfusionMatrixCell(float normalizedValue, float rawValue) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// Keeps track of any properties unknown to the library. + internal ConfusionMatrixCell(float normalizedValue, float rawValue, IDictionary serializedAdditionalRawData) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConfusionMatrixCell() + { + } + + /// Represents normalized value in percentages. + public float NormalizedValue { get; } + /// Represents raw value. + public float RawValue { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs new file mode 100644 index 000000000000..eb422157be56 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ConfusionMatrixRow : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + 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 + } + } + + ConfusionMatrixRow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixRow(document.RootElement, options); + } + + internal static ConfusionMatrixRow DeserializeConfusionMatrixRow(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrixRow(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixRow IPersistableModel.Create(BinaryData 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 DeserializeConfusionMatrixRow(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} 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 ConfusionMatrixRow FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixRow(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.Authoring/src/Generated/Models/ConfusionMatrixRow.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.cs new file mode 100644 index 000000000000..248f7077a849 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.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.Text.Authoring.Models +{ + /// The ConfusionMatrixRow. + public partial class ConfusionMatrixRow + { + /// Initializes a new instance of . + internal ConfusionMatrixRow() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrixRow(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs new file mode 100644 index 000000000000..f258f2a8eedf --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + internal partial class CopyProjectAuthorizationRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + if (Optional.IsDefined(AllowOverwrite)) + { + writer.WritePropertyName("allowOverwrite"u8); + writer.WriteBooleanValue(AllowOverwrite.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 + } + } + } + + CopyProjectAuthorizationRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + + internal static CopyProjectAuthorizationRequest DeserializeCopyProjectAuthorizationRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string storageInputContainerName = default; + bool? allowOverwrite = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowOverwrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowOverwrite = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectAuthorizationRequest IPersistableModel.Create(BinaryData 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 DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} 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 CopyProjectAuthorizationRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectAuthorizationRequest(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.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs new file mode 100644 index 000000000000..5082f591b1ea --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.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.Text.Authoring.Models +{ + /// The CopyProjectAuthorizationRequest. + internal partial class CopyProjectAuthorizationRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind) + { + ProjectKind = projectKind; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// Keeps track of any properties unknown to the library. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind, string storageInputContainerName, bool? allowOverwrite, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + AllowOverwrite = allowOverwrite; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectAuthorizationRequest() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The name of the storage container. + public string StorageInputContainerName { get; } + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + public bool? AllowOverwrite { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs new file mode 100644 index 000000000000..699a616472f5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CopyProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("targetProjectName"u8); + writer.WriteStringValue(TargetProjectName); + writer.WritePropertyName("accessToken"u8); + writer.WriteStringValue(AccessToken); + writer.WritePropertyName("expiresAt"u8); + writer.WriteStringValue(ExpiresAt, "O"); + writer.WritePropertyName("targetResourceId"u8); + writer.WriteStringValue(TargetResourceId); + writer.WritePropertyName("targetResourceRegion"u8); + writer.WriteStringValue(TargetResourceRegion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + CopyProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectDetails(document.RootElement, options); + } + + internal static CopyProjectDetails DeserializeCopyProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string targetProjectName = default; + string accessToken = default; + DateTimeOffset expiresAt = default; + string targetResourceId = default; + string targetResourceRegion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetProjectName"u8)) + { + targetProjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessToken"u8)) + { + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresAt"u8)) + { + expiresAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("targetResourceId"u8)) + { + targetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceRegion"u8)) + { + targetResourceRegion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectDetails( + projectKind, + targetProjectName, + accessToken, + expiresAt, + targetResourceId, + targetResourceRegion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectDetails IPersistableModel.Create(BinaryData 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 DeserializeCopyProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} 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 CopyProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectDetails(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.Authoring/src/Generated/Models/CopyProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.cs new file mode 100644 index 000000000000..899d7879a650 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for copying an existing project to another Azure resource. + public partial class CopyProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// , , or is null. + public CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) + { + Argument.AssertNotNull(targetProjectName, nameof(targetProjectName)); + Argument.AssertNotNull(accessToken, nameof(accessToken)); + Argument.AssertNotNull(targetResourceId, nameof(targetResourceId)); + Argument.AssertNotNull(targetResourceRegion, nameof(targetResourceRegion)); + + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// Keeps track of any properties unknown to the library. + internal CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectDetails() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; set; } + /// The project name to be copied-into. + public string TargetProjectName { get; set; } + /// The access token. + public string AccessToken { get; set; } + /// The expiration of the access token. + public DateTimeOffset ExpiresAt { get; set; } + /// Represents the target Azure resource ID. + public string TargetResourceId { get; set; } + /// Represents the target Azure resource region. + public string TargetResourceRegion { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs new file mode 100644 index 000000000000..f920a14de3e7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CopyProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + CopyProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectJobState(document.RootElement, options); + } + + internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(CopyProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectJobState IPersistableModel.Create(BinaryData 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 DeserializeCopyProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectJobState)} 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 CopyProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectJobState(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.Authoring/src/Generated/Models/CopyProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.cs new file mode 100644 index 000000000000..7c7212e10068 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a copy job. + public partial class CopyProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal CopyProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal CopyProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..a432f8ae24e3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.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.Text.Authoring.Models +{ + public partial class CreateDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + 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 + } + } + } + + CreateDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateDeploymentDetails(document.RootElement, options); + } + + internal static CreateDeploymentDetails DeserializeCreateDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds ?? 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(CreateDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateDeploymentDetails IPersistableModel.Create(BinaryData 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 DeserializeCreateDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} 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 CreateDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateDeploymentDetails(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.Authoring/src/Generated/Models/CreateDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.cs new file mode 100644 index 000000000000..31478d43ba9a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.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.Text.Authoring.Models +{ + /// Represents the options for creating or updating a project deployment. + public partial class CreateDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the trained model label. + /// is null. + public CreateDeploymentDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// Keeps track of any properties unknown to the library. + internal CreateDeploymentDetails(string trainedModelLabel, IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateDeploymentDetails() + { + } + + /// Represents the trained model label. + public string TrainedModelLabel { get; } + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs new file mode 100644 index 000000000000..06633dd50ab3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CreateProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + CreateProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateProjectDetails(document.RootElement, options); + } + + internal static CreateProjectDetails DeserializeCreateProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string storageInputContainerName = default; + ProjectSettings settings = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + 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 CreateProjectDetails( + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + 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(CreateProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateProjectDetails IPersistableModel.Create(BinaryData 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 DeserializeCreateProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateProjectDetails)} 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 CreateProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateProjectDetails(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.Authoring/src/Generated/Models/CreateProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.cs new file mode 100644 index 000000000000..4a9996f0b77c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options used to create or update a project. + public partial class CreateProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The project kind. + /// The storage container name. + /// The new project name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// , or is null. + public CreateProjectDetails(ProjectKind projectKind, string storageInputContainerName, string projectName, string language) + { + Argument.AssertNotNull(storageInputContainerName, nameof(storageInputContainerName)); + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(language, nameof(language)); + + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + ProjectName = projectName; + Language = language; + } + + /// Initializes a new instance of . + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal CreateProjectDetails(ProjectKind projectKind, string storageInputContainerName, ProjectSettings settings, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + Settings = settings; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateProjectDetails() + { + } + + /// The project kind. + public ProjectKind ProjectKind { get; } + /// The storage container name. + public string StorageInputContainerName { get; } + /// The project settings. + public ProjectSettings Settings { get; set; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; set; } + /// The project description. + public string Description { get; set; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..c44a091cde5e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CustomEntityRecognitionDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomEntityRecognitionDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customEntityRecognitionResult"u8); + writer.WriteObjectValue(CustomEntityRecognitionResult, options); + } + + CustomEntityRecognitionDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomEntityRecognitionDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomEntityRecognitionDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomEntityRecognitionDocumentEvaluationResult DeserializeCustomEntityRecognitionDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customEntityRecognitionResult"u8)) + { + customEntityRecognitionResult = DocumentEntityRecognitionEvaluationResult.DeserializeDocumentEntityRecognitionEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + 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 CustomEntityRecognitionDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customEntityRecognitionResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomEntityRecognitionDocumentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeCustomEntityRecognitionDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionDocumentEvaluationResult)} 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 CustomEntityRecognitionDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomEntityRecognitionDocumentEvaluationResult(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.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.cs new file mode 100644 index 000000000000..21e1cc79ba6f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.cs @@ -0,0 +1,50 @@ +// 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.Authoring.Models +{ + /// Represents the document evaluation result for a custom entity recognition project. + public partial class CustomEntityRecognitionDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// , or is null. + internal CustomEntityRecognitionDocumentEvaluationResult(string location, string language, DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customEntityRecognitionResult, nameof(customEntityRecognitionResult)); + + ProjectKind = ProjectKind.CustomEntityRecognition; + CustomEntityRecognitionResult = customEntityRecognitionResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for entity recognition. + internal CustomEntityRecognitionDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomEntityRecognitionResult = customEntityRecognitionResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomEntityRecognitionDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for entity recognition. + public DocumentEntityRecognitionEvaluationResult CustomEntityRecognitionResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..02086fc20371 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + public partial class CustomEntityRecognitionEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomEntityRecognitionEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customEntityRecognitionEvaluation"u8); + writer.WriteObjectValue(CustomEntityRecognitionEvaluation, options); + } + + CustomEntityRecognitionEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomEntityRecognitionEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomEntityRecognitionEvaluationSummary(document.RootElement, options); + } + + internal static CustomEntityRecognitionEvaluationSummary DeserializeCustomEntityRecognitionEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customEntityRecognitionEvaluation"u8)) + { + customEntityRecognitionEvaluation = EntityRecognitionEvaluationSummary.DeserializeEntityRecognitionEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomEntityRecognitionEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customEntityRecognitionEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomEntityRecognitionEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeCustomEntityRecognitionEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionEvaluationSummary)} 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 CustomEntityRecognitionEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomEntityRecognitionEvaluationSummary(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.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.cs new file mode 100644 index 000000000000..af1ea805f081 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom entity recognition project. + public partial class CustomEntityRecognitionEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to extraction evaluation. + /// or is null. + internal CustomEntityRecognitionEvaluationSummary(EvaluationDetails evaluationOptions, EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customEntityRecognitionEvaluation, nameof(customEntityRecognitionEvaluation)); + + ProjectKind = ProjectKind.CustomEntityRecognition; + CustomEntityRecognitionEvaluation = customEntityRecognitionEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to extraction evaluation. + internal CustomEntityRecognitionEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomEntityRecognitionEvaluation = customEntityRecognitionEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomEntityRecognitionEvaluationSummary() + { + } + + /// Contains the data related to extraction evaluation. + public EntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..726a1d144e16 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CustomHealthcareDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomHealthcareDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customHealthcareResult"u8); + writer.WriteObjectValue(CustomHealthcareResult, options); + } + + CustomHealthcareDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHealthcareDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHealthcareDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomHealthcareDocumentEvaluationResult DeserializeCustomHealthcareDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentHealthcareEvaluationResult customHealthcareResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customHealthcareResult"u8)) + { + customHealthcareResult = DocumentHealthcareEvaluationResult.DeserializeDocumentHealthcareEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + 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 CustomHealthcareDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customHealthcareResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomHealthcareDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomHealthcareDocumentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeCustomHealthcareDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHealthcareDocumentEvaluationResult)} 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 CustomHealthcareDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomHealthcareDocumentEvaluationResult(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.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.cs new file mode 100644 index 000000000000..f89d84726837 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.cs @@ -0,0 +1,50 @@ +// 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.Authoring.Models +{ + /// Represents the document evaluation result for a custom entity recognition project. + public partial class CustomHealthcareDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// , or is null. + internal CustomHealthcareDocumentEvaluationResult(string location, string language, DocumentHealthcareEvaluationResult customHealthcareResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customHealthcareResult, nameof(customHealthcareResult)); + + ProjectKind = ProjectKind.CustomHealthcare; + CustomHealthcareResult = customHealthcareResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for entity recognition. + internal CustomHealthcareDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentHealthcareEvaluationResult customHealthcareResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomHealthcareResult = customHealthcareResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomHealthcareDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for entity recognition. + public DocumentHealthcareEvaluationResult CustomHealthcareResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..02df1aaacae0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + public partial class CustomHealthcareEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomHealthcareEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customHealthcareEvaluation"u8); + writer.WriteObjectValue(CustomHealthcareEvaluation, options); + } + + CustomHealthcareEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHealthcareEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHealthcareEvaluationSummary(document.RootElement, options); + } + + internal static CustomHealthcareEvaluationSummary DeserializeCustomHealthcareEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EntityRecognitionEvaluationSummary customHealthcareEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customHealthcareEvaluation"u8)) + { + customHealthcareEvaluation = EntityRecognitionEvaluationSummary.DeserializeEntityRecognitionEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomHealthcareEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customHealthcareEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomHealthcareEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomHealthcareEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeCustomHealthcareEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHealthcareEvaluationSummary)} 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 CustomHealthcareEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomHealthcareEvaluationSummary(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.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.cs new file mode 100644 index 000000000000..b42fd9a30698 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom health care project. + public partial class CustomHealthcareEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to health care evaluation. + /// or is null. + internal CustomHealthcareEvaluationSummary(EvaluationDetails evaluationOptions, EntityRecognitionEvaluationSummary customHealthcareEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customHealthcareEvaluation, nameof(customHealthcareEvaluation)); + + ProjectKind = ProjectKind.CustomHealthcare; + CustomHealthcareEvaluation = customHealthcareEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to health care evaluation. + internal CustomHealthcareEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, EntityRecognitionEvaluationSummary customHealthcareEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomHealthcareEvaluation = customHealthcareEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomHealthcareEvaluationSummary() + { + } + + /// Contains the data related to health care evaluation. + public EntityRecognitionEvaluationSummary CustomHealthcareEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..242c6b8fb74c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomMultiLabelClassificationDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customMultiLabelClassificationResult"u8); + writer.WriteObjectValue(CustomMultiLabelClassificationResult, options); + } + + CustomMultiLabelClassificationDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomMultiLabelClassificationDocumentEvaluationResult DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customMultiLabelClassificationResult"u8)) + { + customMultiLabelClassificationResult = DocumentMultiLabelClassificationEvaluationResult.DeserializeDocumentMultiLabelClassificationEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + 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 CustomMultiLabelClassificationDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customMultiLabelClassificationResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomMultiLabelClassificationDocumentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationDocumentEvaluationResult)} 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 CustomMultiLabelClassificationDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(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.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.cs new file mode 100644 index 000000000000..b313a7e7bf08 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.cs @@ -0,0 +1,50 @@ +// 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.Authoring.Models +{ + /// Represents the document evaluation result for a custom multi-label classification project. + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for multi label classification. + /// , or is null. + internal CustomMultiLabelClassificationDocumentEvaluationResult(string location, string language, DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customMultiLabelClassificationResult, nameof(customMultiLabelClassificationResult)); + + ProjectKind = ProjectKind.CustomMultiLabelClassification; + CustomMultiLabelClassificationResult = customMultiLabelClassificationResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for multi label classification. + internal CustomMultiLabelClassificationDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomMultiLabelClassificationResult = customMultiLabelClassificationResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomMultiLabelClassificationDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for multi label classification. + public DocumentMultiLabelClassificationEvaluationResult CustomMultiLabelClassificationResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..95bcd9182059 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + public partial class CustomMultiLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomMultiLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customMultiLabelClassificationEvaluation"u8); + writer.WriteObjectValue(CustomMultiLabelClassificationEvaluation, options); + } + + CustomMultiLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static CustomMultiLabelClassificationEvaluationSummary DeserializeCustomMultiLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customMultiLabelClassificationEvaluation"u8)) + { + customMultiLabelClassificationEvaluation = MultiLabelClassificationEvaluationSummary.DeserializeMultiLabelClassificationEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomMultiLabelClassificationEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customMultiLabelClassificationEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomMultiLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeCustomMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationEvaluationSummary)} 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 CustomMultiLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomMultiLabelClassificationEvaluationSummary(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.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..89dfb90ee5bb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom multi-label classification project. + public partial class CustomMultiLabelClassificationEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to multi label classification evaluation. + /// or is null. + internal CustomMultiLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions, MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customMultiLabelClassificationEvaluation, nameof(customMultiLabelClassificationEvaluation)); + + ProjectKind = ProjectKind.CustomMultiLabelClassification; + CustomMultiLabelClassificationEvaluation = customMultiLabelClassificationEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to multi label classification evaluation. + internal CustomMultiLabelClassificationEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomMultiLabelClassificationEvaluation = customMultiLabelClassificationEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomMultiLabelClassificationEvaluationSummary() + { + } + + /// Contains the data related to multi label classification evaluation. + public MultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..57861eb5a1b5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomSingleLabelClassificationDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customSingleLabelClassificationResult"u8); + writer.WriteObjectValue(CustomSingleLabelClassificationResult, options); + } + + CustomSingleLabelClassificationDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomSingleLabelClassificationDocumentEvaluationResult DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customSingleLabelClassificationResult"u8)) + { + customSingleLabelClassificationResult = DocumentSingleLabelClassificationEvaluationResult.DeserializeDocumentSingleLabelClassificationEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + 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 CustomSingleLabelClassificationDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customSingleLabelClassificationResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomSingleLabelClassificationDocumentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationDocumentEvaluationResult)} 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 CustomSingleLabelClassificationDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(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.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.cs new file mode 100644 index 000000000000..5bae1e7e6c4c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.cs @@ -0,0 +1,50 @@ +// 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.Authoring.Models +{ + /// Represents the document evaluation result for a custom single-label classification project. + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for single label classification. + /// , or is null. + internal CustomSingleLabelClassificationDocumentEvaluationResult(string location, string language, DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customSingleLabelClassificationResult, nameof(customSingleLabelClassificationResult)); + + ProjectKind = ProjectKind.CustomSingleLabelClassification; + CustomSingleLabelClassificationResult = customSingleLabelClassificationResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for single label classification. + internal CustomSingleLabelClassificationDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomSingleLabelClassificationResult = customSingleLabelClassificationResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomSingleLabelClassificationDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for single label classification. + public DocumentSingleLabelClassificationEvaluationResult CustomSingleLabelClassificationResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..06c9c7209461 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + public partial class CustomSingleLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomSingleLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customSingleLabelClassificationEvaluation"u8); + writer.WriteObjectValue(CustomSingleLabelClassificationEvaluation, options); + } + + CustomSingleLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static CustomSingleLabelClassificationEvaluationSummary DeserializeCustomSingleLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customSingleLabelClassificationEvaluation"u8)) + { + customSingleLabelClassificationEvaluation = SingleLabelClassificationEvaluationSummary.DeserializeSingleLabelClassificationEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomSingleLabelClassificationEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customSingleLabelClassificationEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomSingleLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeCustomSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationEvaluationSummary)} 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 CustomSingleLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomSingleLabelClassificationEvaluationSummary(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.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..01cb6675593c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom single-label classification project. + public partial class CustomSingleLabelClassificationEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to single label classification evaluation. + /// or is null. + internal CustomSingleLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions, SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customSingleLabelClassificationEvaluation, nameof(customSingleLabelClassificationEvaluation)); + + ProjectKind = ProjectKind.CustomSingleLabelClassification; + CustomSingleLabelClassificationEvaluation = customSingleLabelClassificationEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to single label classification evaluation. + internal CustomSingleLabelClassificationEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomSingleLabelClassificationEvaluation = customSingleLabelClassificationEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomSingleLabelClassificationEvaluationSummary() + { + } + + /// Contains the data related to single label classification evaluation. + public SingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..60121f8ea4a9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class CustomTextSentimentDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomTextSentimentDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customTextSentimentResult"u8); + writer.WriteObjectValue(CustomTextSentimentResult, options); + } + + CustomTextSentimentDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomTextSentimentDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomTextSentimentDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomTextSentimentDocumentEvaluationResult DeserializeCustomTextSentimentDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentTextSentimentEvaluationResult customTextSentimentResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customTextSentimentResult"u8)) + { + customTextSentimentResult = DocumentTextSentimentEvaluationResult.DeserializeDocumentTextSentimentEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + 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 CustomTextSentimentDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customTextSentimentResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomTextSentimentDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomTextSentimentDocumentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeCustomTextSentimentDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomTextSentimentDocumentEvaluationResult)} 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 CustomTextSentimentDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomTextSentimentDocumentEvaluationResult(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.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.cs new file mode 100644 index 000000000000..ab07896bc858 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.cs @@ -0,0 +1,50 @@ +// 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.Authoring.Models +{ + /// Represents the document evaluation result for a custom sentiment project. + public partial class CustomTextSentimentDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for text sentiment. + /// , or is null. + internal CustomTextSentimentDocumentEvaluationResult(string location, string language, DocumentTextSentimentEvaluationResult customTextSentimentResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customTextSentimentResult, nameof(customTextSentimentResult)); + + ProjectKind = ProjectKind.CustomTextSentiment; + CustomTextSentimentResult = customTextSentimentResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for text sentiment. + internal CustomTextSentimentDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentTextSentimentEvaluationResult customTextSentimentResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomTextSentimentResult = customTextSentimentResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomTextSentimentDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for text sentiment. + public DocumentTextSentimentEvaluationResult CustomTextSentimentResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..4946c6b8b920 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + public partial class CustomTextSentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CustomTextSentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customTextSentimentEvaluation"u8); + writer.WriteObjectValue(CustomTextSentimentEvaluation, options); + } + + CustomTextSentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomTextSentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomTextSentimentEvaluationSummary(document.RootElement, options); + } + + internal static CustomTextSentimentEvaluationSummary DeserializeCustomTextSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextSentimentEvaluationSummary customTextSentimentEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customTextSentimentEvaluation"u8)) + { + customTextSentimentEvaluation = TextSentimentEvaluationSummary.DeserializeTextSentimentEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomTextSentimentEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customTextSentimentEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomTextSentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomTextSentimentEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeCustomTextSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomTextSentimentEvaluationSummary)} 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 CustomTextSentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomTextSentimentEvaluationSummary(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.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.cs new file mode 100644 index 000000000000..8c2df398ef37 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom text sentiment project. + public partial class CustomTextSentimentEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to custom sentiment evaluation. + /// or is null. + internal CustomTextSentimentEvaluationSummary(EvaluationDetails evaluationOptions, TextSentimentEvaluationSummary customTextSentimentEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customTextSentimentEvaluation, nameof(customTextSentimentEvaluation)); + + ProjectKind = ProjectKind.CustomTextSentiment; + CustomTextSentimentEvaluation = customTextSentimentEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to custom sentiment evaluation. + internal CustomTextSentimentEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, TextSentimentEvaluationSummary customTextSentimentEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomTextSentimentEvaluation = customTextSentimentEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomTextSentimentEvaluationSummary() + { + } + + /// Contains the data related to custom sentiment evaluation. + public TextSentimentEvaluationSummary CustomTextSentimentEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.Serialization.cs new file mode 100644 index 000000000000..4a5bdf19b9c7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.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.AI.Language.Text.Authoring.Models +{ + public partial class DataGenerationConnectionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationConnectionInfo)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + 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 + } + } + } + + DataGenerationConnectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationConnectionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationConnectionInfo(document.RootElement, options); + } + + internal static DataGenerationConnectionInfo DeserializeDataGenerationConnectionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationConnectionInfoKind kind = default; + string resourceId = default; + string deploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new DataGenerationConnectionInfoKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + resourceId = 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 DataGenerationConnectionInfo(kind, resourceId, 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(DataGenerationConnectionInfo)} does not support writing '{options.Format}' format."); + } + } + + DataGenerationConnectionInfo IPersistableModel.Create(BinaryData 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 DeserializeDataGenerationConnectionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationConnectionInfo)} 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 DataGenerationConnectionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDataGenerationConnectionInfo(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.Authoring/src/Generated/Models/DataGenerationConnectionInfo.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.cs new file mode 100644 index 000000000000..a7dbaf33884a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.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.AI.Language.Text.Authoring.Models +{ + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + public partial class DataGenerationConnectionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + /// Deployment name of model to be used for synthetic data generation. + /// or is null. + public DataGenerationConnectionInfo(string resourceId, string deploymentName) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + ResourceId = resourceId; + DeploymentName = deploymentName; + } + + /// Initializes a new instance of . + /// Connection type for data generation settings. Currently only supports Azure Open AI. + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + /// Deployment name of model to be used for synthetic data generation. + /// Keeps track of any properties unknown to the library. + internal DataGenerationConnectionInfo(DataGenerationConnectionInfoKind kind, string resourceId, string deploymentName, IDictionary serializedAdditionalRawData) + { + Kind = kind; + ResourceId = resourceId; + DeploymentName = deploymentName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataGenerationConnectionInfo() + { + } + + /// Connection type for data generation settings. Currently only supports Azure Open AI. + public DataGenerationConnectionInfoKind Kind { get; } = DataGenerationConnectionInfoKind.AzureOpenAI; + + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + public string ResourceId { get; } + /// Deployment name of model to be used for synthetic data generation. + public string DeploymentName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfoKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfoKind.cs new file mode 100644 index 000000000000..2fc2bf8a9467 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfoKind.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.Text.Authoring.Models +{ + /// The DataGenerationConnectionInfo_kind. + public readonly partial struct DataGenerationConnectionInfoKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataGenerationConnectionInfoKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureOpenAIValue = "azureOpenAI"; + + /// azureOpenAI. + public static DataGenerationConnectionInfoKind AzureOpenAI { get; } = new DataGenerationConnectionInfoKind(AzureOpenAIValue); + /// Determines if two values are the same. + public static bool operator ==(DataGenerationConnectionInfoKind left, DataGenerationConnectionInfoKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataGenerationConnectionInfoKind left, DataGenerationConnectionInfoKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataGenerationConnectionInfoKind(string value) => new DataGenerationConnectionInfoKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataGenerationConnectionInfoKind other && Equals(other); + /// + public bool Equals(DataGenerationConnectionInfoKind other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/DataGenerationSettings.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.Serialization.cs new file mode 100644 index 000000000000..02b4ca7c8475 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.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.Text.Authoring.Models +{ + public partial class DataGenerationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("enableDataGeneration"u8); + writer.WriteBooleanValue(EnableDataGeneration); + writer.WritePropertyName("dataGenerationConnectionInfo"u8); + writer.WriteObjectValue(DataGenerationConnectionInfo, 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 + } + } + } + + DataGenerationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationSettings(document.RootElement, options); + } + + internal static DataGenerationSettings DeserializeDataGenerationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool enableDataGeneration = default; + DataGenerationConnectionInfo dataGenerationConnectionInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableDataGeneration"u8)) + { + enableDataGeneration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dataGenerationConnectionInfo"u8)) + { + dataGenerationConnectionInfo = DataGenerationConnectionInfo.DeserializeDataGenerationConnectionInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataGenerationSettings(enableDataGeneration, dataGenerationConnectionInfo, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataGenerationSettings)} does not support writing '{options.Format}' format."); + } + } + + DataGenerationSettings IPersistableModel.Create(BinaryData 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 DeserializeDataGenerationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationSettings)} 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 DataGenerationSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDataGenerationSettings(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.Authoring/src/Generated/Models/DataGenerationSettings.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.cs new file mode 100644 index 000000000000..ec47c688c67e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.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.AI.Language.Text.Authoring.Models +{ + /// Represents the settings for using data generation as part of training a custom model. + public partial class DataGenerationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// If set to true, augment customer provided training data with synthetic data to improve model quality. + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + /// is null. + public DataGenerationSettings(bool enableDataGeneration, DataGenerationConnectionInfo dataGenerationConnectionInfo) + { + Argument.AssertNotNull(dataGenerationConnectionInfo, nameof(dataGenerationConnectionInfo)); + + EnableDataGeneration = enableDataGeneration; + DataGenerationConnectionInfo = dataGenerationConnectionInfo; + } + + /// Initializes a new instance of . + /// If set to true, augment customer provided training data with synthetic data to improve model quality. + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + /// Keeps track of any properties unknown to the library. + internal DataGenerationSettings(bool enableDataGeneration, DataGenerationConnectionInfo dataGenerationConnectionInfo, IDictionary serializedAdditionalRawData) + { + EnableDataGeneration = enableDataGeneration; + DataGenerationConnectionInfo = dataGenerationConnectionInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataGenerationSettings() + { + } + + /// If set to true, augment customer provided training data with synthetic data to improve model quality. + public bool EnableDataGeneration { get; } + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + public DataGenerationConnectionInfo DataGenerationConnectionInfo { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..77445449cbf0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.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.Text.Authoring.Models +{ + public partial class DeleteDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + 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 + } + } + } + + DeleteDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + + internal static DeleteDeploymentDetails DeserializeDeleteDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeleteDeploymentDetails(assignedResourceIds ?? 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(DeleteDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + DeleteDeploymentDetails IPersistableModel.Create(BinaryData 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 DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} 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 DeleteDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeleteDeploymentDetails(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.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs new file mode 100644 index 000000000000..013bd28896db --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.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.Text.Authoring.Models +{ + /// Represents the options for deleting a project deployment. + public partial class DeleteDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeleteDeploymentDetails() + { + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + /// Keeps track of any properties unknown to the library. + internal DeleteDeploymentDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..e10e17952121 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class DeploymentDeleteFromResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + DeploymentDeleteFromResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + + internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDeleteFromResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(DeploymentDeleteFromResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentDeleteFromResourcesJobState IPersistableModel.Create(BinaryData 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 DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} 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 DeploymentDeleteFromResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentDeleteFromResourcesJobState(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.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs new file mode 100644 index 000000000000..6a8b7545d2f6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of an existing delete deployment from specific resources job. + public partial class DeploymentDeleteFromResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentDeleteFromResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentDeleteFromResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentDeleteFromResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs new file mode 100644 index 000000000000..abc14808d6d1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class DeploymentJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + DeploymentJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentJobState(document.RootElement, options); + } + + internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(DeploymentJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentJobState IPersistableModel.Create(BinaryData 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 DeserializeDeploymentJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentJobState)} 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 DeploymentJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentJobState(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.Authoring/src/Generated/Models/DeploymentJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.cs new file mode 100644 index 000000000000..f888f341cfa1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class DeploymentJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs new file mode 100644 index 000000000000..326ec2ad2885 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.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.Text.Authoring.Models +{ + public partial class DeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + DeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentResource(document.RootElement, options); + } + + internal static DeploymentResource DeserializeDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentResource(resourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + DeploymentResource IPersistableModel.Create(BinaryData 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 DeserializeDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentResource)} 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 DeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentResource(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.Authoring/src/Generated/Models/DeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.cs new file mode 100644 index 000000000000..1f71c697bb26 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.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.Text.Authoring.Models +{ + /// Represents an Azure resource assigned to a deployment. + public partial class DeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// or is null. + internal DeploymentResource(string resourceId, string region) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + Argument.AssertNotNull(region, nameof(region)); + + ResourceId = resourceId; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal DeploymentResource(string resourceId, string region, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentResource() + { + } + + /// Represents the Azure resource Id. + public string ResourceId { get; } + /// Represents the resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.Serialization.cs similarity index 57% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.Serialization.cs index 6159763405a5..13631a460ef0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Text.Authoring.Models { - public partial class CustomSentenceSentiment : IUtf8JsonSerializable, IJsonModel + public partial class DocumentEntityLabelEvaluationResult : 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,14 @@ 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(DocumentEntityLabelEvaluationResult)} 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("category"u8); + writer.WriteStringValue(Category); writer.WritePropertyName("offset"u8); writer.WriteNumberValue(Offset); writer.WritePropertyName("length"u8); @@ -61,19 +57,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomSentenceSentiment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DocumentEntityLabelEvaluationResult 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(DocumentEntityLabelEvaluationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentenceSentiment(document.RootElement, options); + return DeserializeDocumentEntityLabelEvaluationResult(document.RootElement, options); } - internal static CustomSentenceSentiment DeserializeCustomSentenceSentiment(JsonElement element, ModelReaderWriterOptions options = null) + internal static DocumentEntityLabelEvaluationResult DeserializeDocumentEntityLabelEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -81,28 +77,16 @@ internal static CustomSentenceSentiment DeserializeCustomSentenceSentiment(JsonE { return null; } - string text = default; - SentenceSentimentValue sentiment = default; - SentimentConfidenceScores confidenceScores = default; + string category = 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)) + if (property.NameEquals("category"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); + category = property.Value.GetString(); continue; } if (property.NameEquals("offset"u8)) @@ -121,52 +105,46 @@ internal static CustomSentenceSentiment DeserializeCustomSentenceSentiment(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new CustomSentenceSentiment( - text, - sentiment, - confidenceScores, - offset, - length, - serializedAdditionalRawData); + return new DocumentEntityLabelEvaluationResult(category, 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(DocumentEntityLabelEvaluationResult)} does not support writing '{options.Format}' format."); } } - CustomSentenceSentiment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DocumentEntityLabelEvaluationResult 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 DeserializeDocumentEntityLabelEvaluationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DocumentEntityLabelEvaluationResult)} 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 DocumentEntityLabelEvaluationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentenceSentiment(document.RootElement); + return DeserializeDocumentEntityLabelEvaluationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.cs new file mode 100644 index 000000000000..9845875ce00c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.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.AI.Language.Text.Authoring.Models +{ + /// Represents an evaluation result entity label. + public partial class DocumentEntityLabelEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// is null. + internal DocumentEntityLabelEvaluationResult(string category, int offset, int length) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// Keeps track of any properties unknown to the library. + internal DocumentEntityLabelEvaluationResult(string category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEntityLabelEvaluationResult() + { + } + + /// Represents the entity category. + public string Category { get; } + /// Represents the entity offset index relative to the original text. + public int Offset { get; } + /// Represents the entity length. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..9aff1eb0d6b0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentEntityRecognitionEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + 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 + } + } + } + + DocumentEntityRecognitionEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEntityRecognitionEvaluationResult(document.RootElement, options); + } + + internal static DocumentEntityRecognitionEvaluationResult DeserializeDocumentEntityRecognitionEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList entities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentEntityRegionEvaluationResult.DeserializeDocumentEntityRegionEvaluationResult(item, options)); + } + entities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentEntityRecognitionEvaluationResult(entities, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEntityRecognitionEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentEntityRecognitionEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} 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 DocumentEntityRecognitionEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentEntityRecognitionEvaluationResult(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.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.cs new file mode 100644 index 000000000000..8a2ca5336833 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the entity recognition evaluation result for a document. + public partial class DocumentEntityRecognitionEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// is null. + internal DocumentEntityRecognitionEvaluationResult(IEnumerable entities) + { + Argument.AssertNotNull(entities, nameof(entities)); + + Entities = entities.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// Keeps track of any properties unknown to the library. + internal DocumentEntityRecognitionEvaluationResult(IReadOnlyList entities, IDictionary serializedAdditionalRawData) + { + Entities = entities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEntityRecognitionEvaluationResult() + { + } + + /// Represents the document labelled entities. + public IReadOnlyList Entities { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.Serialization.cs similarity index 56% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.Serialization.cs index 5d77cb712f9f..6102fe7633be 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Text.Authoring.Models { - public partial class CustomAbstractiveSummarizationResult : IUtf8JsonSerializable, IJsonModel + public partial class DocumentEntityRegionEvaluationResult : 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,35 +28,30 @@ 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(CustomAbstractiveSummarizationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("documents"u8); + writer.WritePropertyName("expectedEntities"u8); writer.WriteStartArray(); - foreach (var item in Documents) + foreach (var item in ExpectedEntities) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); + writer.WritePropertyName("predictedEntities"u8); writer.WriteStartArray(); - foreach (var item in Errors) + foreach (var item in PredictedEntities) { 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); + writer.WritePropertyName("regionOffset"u8); + writer.WriteNumberValue(RegionOffset); + writer.WritePropertyName("regionLength"u8); + writer.WriteNumberValue(RegionLength); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,19 +69,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomAbstractiveSummarizationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DocumentEntityRegionEvaluationResult 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(CustomAbstractiveSummarizationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationResult(document.RootElement, options); + return DeserializeDocumentEntityRegionEvaluationResult(document.RootElement, options); } - internal static CustomAbstractiveSummarizationResult DeserializeCustomAbstractiveSummarizationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static DocumentEntityRegionEvaluationResult DeserializeDocumentEntityRegionEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -94,52 +89,42 @@ internal static CustomAbstractiveSummarizationResult DeserializeCustomAbstractiv { return null; } - IReadOnlyList documents = default; - IReadOnlyList errors = default; - RequestStatistics statistics = default; - string projectName = default; - string deploymentName = default; + IReadOnlyList expectedEntities = default; + IReadOnlyList predictedEntities = default; + int regionOffset = default; + int regionLength = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) + if (property.NameEquals("expectedEntities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AbstractiveSummaryActionResult.DeserializeAbstractiveSummaryActionResult(item, options)); + array.Add(DocumentEntityLabelEvaluationResult.DeserializeDocumentEntityLabelEvaluationResult(item, options)); } - documents = array; + expectedEntities = array; continue; } - if (property.NameEquals("errors"u8)) + if (property.NameEquals("predictedEntities"u8)) { - List array = new List(); + 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; + array.Add(DocumentEntityLabelEvaluationResult.DeserializeDocumentEntityLabelEvaluationResult(item, options)); } - statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); + predictedEntities = array; continue; } - if (property.NameEquals("projectName"u8)) + if (property.NameEquals("regionOffset"u8)) { - projectName = property.Value.GetString(); + regionOffset = property.Value.GetInt32(); continue; } - if (property.NameEquals("deploymentName"u8)) + if (property.NameEquals("regionLength"u8)) { - deploymentName = property.Value.GetString(); + regionLength = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -148,52 +133,46 @@ internal static CustomAbstractiveSummarizationResult DeserializeCustomAbstractiv } } serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationResult( - documents, - errors, - statistics, - projectName, - deploymentName, - serializedAdditionalRawData); + return new DocumentEntityRegionEvaluationResult(expectedEntities, predictedEntities, regionOffset, regionLength, 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(CustomAbstractiveSummarizationResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} does not support writing '{options.Format}' format."); } } - CustomAbstractiveSummarizationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DocumentEntityRegionEvaluationResult 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 DeserializeCustomAbstractiveSummarizationResult(document.RootElement, options); + return DeserializeDocumentEntityRegionEvaluationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} 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 CustomAbstractiveSummarizationResult FromResponse(Response response) + internal static DocumentEntityRegionEvaluationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationResult(document.RootElement); + return DeserializeDocumentEntityRegionEvaluationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.cs new file mode 100644 index 000000000000..f961a2eb7ba7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation comparison between the expected and predicted entities of a document region. + public partial class DocumentEntityRegionEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the region's expected entity labels. + /// Represents the region's predicted entity labels. + /// Represents the region offset. + /// Represents the region length. + /// or is null. + internal DocumentEntityRegionEvaluationResult(IEnumerable expectedEntities, IEnumerable predictedEntities, int regionOffset, int regionLength) + { + Argument.AssertNotNull(expectedEntities, nameof(expectedEntities)); + Argument.AssertNotNull(predictedEntities, nameof(predictedEntities)); + + ExpectedEntities = expectedEntities.ToList(); + PredictedEntities = predictedEntities.ToList(); + RegionOffset = regionOffset; + RegionLength = regionLength; + } + + /// Initializes a new instance of . + /// Represents the region's expected entity labels. + /// Represents the region's predicted entity labels. + /// Represents the region offset. + /// Represents the region length. + /// Keeps track of any properties unknown to the library. + internal DocumentEntityRegionEvaluationResult(IReadOnlyList expectedEntities, IReadOnlyList predictedEntities, int regionOffset, int regionLength, IDictionary serializedAdditionalRawData) + { + ExpectedEntities = expectedEntities; + PredictedEntities = predictedEntities; + RegionOffset = regionOffset; + RegionLength = regionLength; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEntityRegionEvaluationResult() + { + } + + /// Represents the region's expected entity labels. + public IReadOnlyList ExpectedEntities { get; } + /// Represents the region's predicted entity labels. + public IReadOnlyList PredictedEntities { get; } + /// Represents the region offset. + public int RegionOffset { get; } + /// Represents the region length. + public int RegionLength { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..be013318e43f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.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.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownDocumentEvaluationResult))] + public partial class DocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + 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 + } + } + } + + DocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEvaluationResult(document.RootElement, options); + } + + internal static DocumentEvaluationResult DeserializeDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CustomEntityRecognition": return CustomEntityRecognitionDocumentEvaluationResult.DeserializeCustomEntityRecognitionDocumentEvaluationResult(element, options); + case "CustomHealthcare": return CustomHealthcareDocumentEvaluationResult.DeserializeCustomHealthcareDocumentEvaluationResult(element, options); + case "CustomMultiLabelClassification": return CustomMultiLabelClassificationDocumentEvaluationResult.DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(element, options); + case "CustomSingleLabelClassification": return CustomSingleLabelClassificationDocumentEvaluationResult.DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(element, options); + case "CustomTextSentiment": return CustomTextSentimentDocumentEvaluationResult.DeserializeCustomTextSentimentDocumentEvaluationResult(element, options); + } + } + return UnknownDocumentEvaluationResult.DeserializeUnknownDocumentEvaluationResult(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(DocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} 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 DocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentEvaluationResult(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.Authoring/src/Generated/Models/DocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.cs new file mode 100644 index 000000000000..1eb6a64b3511 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.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.Text.Authoring.Models +{ + /// + /// Represents the evaluation result of a 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 , , , and . + /// + public abstract partial class DocumentEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload 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 . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + protected DocumentEvaluationResult(string location, string language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + + Location = location; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal DocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + Location = location; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEvaluationResult() + { + } + + /// Represents the project kind. + internal ProjectKind ProjectKind { get; set; } + /// Represents the document path. + public string Location { get; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..5e07d6d93ee0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentHealthcareEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + 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 + } + } + } + + DocumentHealthcareEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentHealthcareEvaluationResult(document.RootElement, options); + } + + internal static DocumentHealthcareEvaluationResult DeserializeDocumentHealthcareEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList entities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentEntityRegionEvaluationResult.DeserializeDocumentEntityRegionEvaluationResult(item, options)); + } + entities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentHealthcareEvaluationResult(entities, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentHealthcareEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentHealthcareEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} 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 DocumentHealthcareEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentHealthcareEvaluationResult(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.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.cs new file mode 100644 index 000000000000..abb12a64155d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the healthcare evaluation result for a document. + public partial class DocumentHealthcareEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// is null. + internal DocumentHealthcareEvaluationResult(IEnumerable entities) + { + Argument.AssertNotNull(entities, nameof(entities)); + + Entities = entities.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// Keeps track of any properties unknown to the library. + internal DocumentHealthcareEvaluationResult(IReadOnlyList entities, IDictionary serializedAdditionalRawData) + { + Entities = entities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentHealthcareEvaluationResult() + { + } + + /// Represents the document labelled entities. + public IReadOnlyList Entities { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..75e31cc7c7fe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.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.AI.Language.Text.Authoring.Models +{ + public partial class DocumentMultiLabelClassificationEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedClasses"u8); + writer.WriteStartArray(); + foreach (var item in ExpectedClasses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("predictedClasses"u8); + writer.WriteStartArray(); + foreach (var item in PredictedClasses) + { + 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 + } + } + } + + DocumentMultiLabelClassificationEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentMultiLabelClassificationEvaluationResult(document.RootElement, options); + } + + internal static DocumentMultiLabelClassificationEvaluationResult DeserializeDocumentMultiLabelClassificationEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList expectedClasses = default; + IReadOnlyList predictedClasses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedClasses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + expectedClasses = array; + continue; + } + if (property.NameEquals("predictedClasses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + predictedClasses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentMultiLabelClassificationEvaluationResult(expectedClasses, predictedClasses, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentMultiLabelClassificationEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentMultiLabelClassificationEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} 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 DocumentMultiLabelClassificationEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentMultiLabelClassificationEvaluationResult(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.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.cs new file mode 100644 index 000000000000..0b5e696def25 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.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 System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the comparison between the expected and predicted classes that are result from the evaluation operation. + public partial class DocumentMultiLabelClassificationEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document's expected classes. + /// Represents the document's predicted classes. + /// or is null. + internal DocumentMultiLabelClassificationEvaluationResult(IEnumerable expectedClasses, IEnumerable predictedClasses) + { + Argument.AssertNotNull(expectedClasses, nameof(expectedClasses)); + Argument.AssertNotNull(predictedClasses, nameof(predictedClasses)); + + ExpectedClasses = expectedClasses.ToList(); + PredictedClasses = predictedClasses.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document's expected classes. + /// Represents the document's predicted classes. + /// Keeps track of any properties unknown to the library. + internal DocumentMultiLabelClassificationEvaluationResult(IReadOnlyList expectedClasses, IReadOnlyList predictedClasses, IDictionary serializedAdditionalRawData) + { + ExpectedClasses = expectedClasses; + PredictedClasses = predictedClasses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentMultiLabelClassificationEvaluationResult() + { + } + + /// Represents the document's expected classes. + public IReadOnlyList ExpectedClasses { get; } + /// Represents the document's predicted classes. + public IReadOnlyList PredictedClasses { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..6331cb3ab415 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.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.AI.Language.Text.Authoring.Models +{ + public partial class DocumentSentimentLabelEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.ToString()); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + DocumentSentimentLabelEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentSentimentLabelEvaluationResult(document.RootElement, options); + } + + internal static DocumentSentimentLabelEvaluationResult DeserializeDocumentSentimentLabelEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextAnalysisAuthoringSentiment category = default; + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = new TextAnalysisAuthoringSentiment(property.Value.GetString()); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentSentimentLabelEvaluationResult(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentSentimentLabelEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentSentimentLabelEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} 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 DocumentSentimentLabelEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentSentimentLabelEvaluationResult(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.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.cs new file mode 100644 index 000000000000..ca2ed6833c38 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.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.AI.Language.Text.Authoring.Models +{ + /// Represents an evaluation result Sentiment label. + public partial class DocumentSentimentLabelEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the sentiment category. + /// Represents the sentiment offset index relative to the original text. + /// Represents the sentiment length. + internal DocumentSentimentLabelEvaluationResult(TextAnalysisAuthoringSentiment category, int offset, int length) + { + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// Represents the sentiment category. + /// Represents the sentiment offset index relative to the original text. + /// Represents the sentiment length. + /// Keeps track of any properties unknown to the library. + internal DocumentSentimentLabelEvaluationResult(TextAnalysisAuthoringSentiment category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentSentimentLabelEvaluationResult() + { + } + + /// Represents the sentiment category. + public TextAnalysisAuthoringSentiment Category { get; } + /// Represents the sentiment offset index relative to the original text. + public int Offset { get; } + /// Represents the sentiment length. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..3b5eb266d588 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.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.Text.Authoring.Models +{ + public partial class DocumentSingleLabelClassificationEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedClass"u8); + writer.WriteStringValue(ExpectedClass); + writer.WritePropertyName("predictedClass"u8); + writer.WriteStringValue(PredictedClass); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + DocumentSingleLabelClassificationEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentSingleLabelClassificationEvaluationResult(document.RootElement, options); + } + + internal static DocumentSingleLabelClassificationEvaluationResult DeserializeDocumentSingleLabelClassificationEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string expectedClass = default; + string predictedClass = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedClass"u8)) + { + expectedClass = property.Value.GetString(); + continue; + } + if (property.NameEquals("predictedClass"u8)) + { + predictedClass = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentSingleLabelClassificationEvaluationResult(expectedClass, predictedClass, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentSingleLabelClassificationEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentSingleLabelClassificationEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} 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 DocumentSingleLabelClassificationEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentSingleLabelClassificationEvaluationResult(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.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.cs new file mode 100644 index 000000000000..c9e158bbc731 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.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.Text.Authoring.Models +{ + /// Represents the comparison between the expected and predicted class that result from an evaluation operation. + public partial class DocumentSingleLabelClassificationEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document's expected class. + /// Represents the document's predicted class. + /// or is null. + internal DocumentSingleLabelClassificationEvaluationResult(string expectedClass, string predictedClass) + { + Argument.AssertNotNull(expectedClass, nameof(expectedClass)); + Argument.AssertNotNull(predictedClass, nameof(predictedClass)); + + ExpectedClass = expectedClass; + PredictedClass = predictedClass; + } + + /// Initializes a new instance of . + /// Represents the document's expected class. + /// Represents the document's predicted class. + /// Keeps track of any properties unknown to the library. + internal DocumentSingleLabelClassificationEvaluationResult(string expectedClass, string predictedClass, IDictionary serializedAdditionalRawData) + { + ExpectedClass = expectedClass; + PredictedClass = predictedClass; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentSingleLabelClassificationEvaluationResult() + { + } + + /// Represents the document's expected class. + public string ExpectedClass { get; } + /// Represents the document's predicted class. + public string PredictedClass { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..2c2a0bff2696 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.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.AI.Language.Text.Authoring.Models +{ + public partial class DocumentTextSentimentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedSentimentSpans"u8); + writer.WriteStartArray(); + foreach (var item in ExpectedSentimentSpans) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("predictedSentimentSpans"u8); + writer.WriteStartArray(); + foreach (var item in PredictedSentimentSpans) + { + 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 + } + } + } + + DocumentTextSentimentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentTextSentimentEvaluationResult(document.RootElement, options); + } + + internal static DocumentTextSentimentEvaluationResult DeserializeDocumentTextSentimentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList expectedSentimentSpans = default; + IReadOnlyList predictedSentimentSpans = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedSentimentSpans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSentimentLabelEvaluationResult.DeserializeDocumentSentimentLabelEvaluationResult(item, options)); + } + expectedSentimentSpans = array; + continue; + } + if (property.NameEquals("predictedSentimentSpans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSentimentLabelEvaluationResult.DeserializeDocumentSentimentLabelEvaluationResult(item, options)); + } + predictedSentimentSpans = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentTextSentimentEvaluationResult(expectedSentimentSpans, predictedSentimentSpans, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentTextSentimentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentTextSentimentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} 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 DocumentTextSentimentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentTextSentimentEvaluationResult(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.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.cs new file mode 100644 index 000000000000..3e547f73170e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.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 System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the comparison between the expected and predicted sentiment that result from an evaluation operation. + public partial class DocumentTextSentimentEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document's expected sentiment labels. + /// Represents the document's predicted sentiment labels. + /// or is null. + internal DocumentTextSentimentEvaluationResult(IEnumerable expectedSentimentSpans, IEnumerable predictedSentimentSpans) + { + Argument.AssertNotNull(expectedSentimentSpans, nameof(expectedSentimentSpans)); + Argument.AssertNotNull(predictedSentimentSpans, nameof(predictedSentimentSpans)); + + ExpectedSentimentSpans = expectedSentimentSpans.ToList(); + PredictedSentimentSpans = predictedSentimentSpans.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document's expected sentiment labels. + /// Represents the document's predicted sentiment labels. + /// Keeps track of any properties unknown to the library. + internal DocumentTextSentimentEvaluationResult(IReadOnlyList expectedSentimentSpans, IReadOnlyList predictedSentimentSpans, IDictionary serializedAdditionalRawData) + { + ExpectedSentimentSpans = expectedSentimentSpans; + PredictedSentimentSpans = predictedSentimentSpans; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentTextSentimentEvaluationResult() + { + } + + /// Represents the document's expected sentiment labels. + public IReadOnlyList ExpectedSentimentSpans { get; } + /// Represents the document's predicted sentiment labels. + public IReadOnlyList PredictedSentimentSpans { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..5826c81af6f9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EntityEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + EntityEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityEvaluationSummary(document.RootElement, options); + } + + internal static EntityEvaluationSummary DeserializeEntityEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntityEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeEntityEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} 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 EntityEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityEvaluationSummary(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.Authoring/src/Generated/Models/EntityEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.cs new file mode 100644 index 000000000000..9cdb7004ae61 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for an entity. + public partial class EntityEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntityEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..6ba8e6fbc90d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class EntityRecognitionEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("entities"u8); + writer.WriteStartObject(); + foreach (var item in Entities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + EntityRecognitionEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityRecognitionEvaluationSummary(document.RootElement, options); + } + + internal static EntityRecognitionEvaluationSummary DeserializeEntityRecognitionEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary entities = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("entities"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, EntityEvaluationSummary.DeserializeEntityEvaluationSummary(property0.Value, options)); + } + entities = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityRecognitionEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntityRecognitionEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeEntityRecognitionEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} 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 EntityRecognitionEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityRecognitionEvaluationSummary(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.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.cs new file mode 100644 index 000000000000..d397bd5cbc09 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.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.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom entity recognition project. + public partial class EntityRecognitionEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal EntityRecognitionEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(entities, nameof(entities)); + + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal EntityRecognitionEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntityRecognitionEvaluationSummary() + { + } + + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the entities evaluation. + public IReadOnlyDictionary Entities { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ErrorCode.cs new file mode 100644 index 000000000000..b25c560b3483 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ErrorCode.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.Text.Authoring.Models +{ + /// Human-readable error code. + public readonly partial struct ErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ErrorCode(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"; + + /// InvalidRequest. + public static ErrorCode InvalidRequest { get; } = new ErrorCode(InvalidRequestValue); + /// InvalidArgument. + public static ErrorCode InvalidArgument { get; } = new ErrorCode(InvalidArgumentValue); + /// Unauthorized. + public static ErrorCode Unauthorized { get; } = new ErrorCode(UnauthorizedValue); + /// Forbidden. + public static ErrorCode Forbidden { get; } = new ErrorCode(ForbiddenValue); + /// NotFound. + public static ErrorCode NotFound { get; } = new ErrorCode(NotFoundValue); + /// ProjectNotFound. + public static ErrorCode ProjectNotFound { get; } = new ErrorCode(ProjectNotFoundValue); + /// OperationNotFound. + public static ErrorCode OperationNotFound { get; } = new ErrorCode(OperationNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static ErrorCode AzureCognitiveSearchNotFound { get; } = new ErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchIndexNotFound. + public static ErrorCode AzureCognitiveSearchIndexNotFound { get; } = new ErrorCode(AzureCognitiveSearchIndexNotFoundValue); + /// TooManyRequests. + public static ErrorCode TooManyRequests { get; } = new ErrorCode(TooManyRequestsValue); + /// AzureCognitiveSearchThrottling. + public static ErrorCode AzureCognitiveSearchThrottling { get; } = new ErrorCode(AzureCognitiveSearchThrottlingValue); + /// AzureCognitiveSearchIndexLimitReached. + public static ErrorCode AzureCognitiveSearchIndexLimitReached { get; } = new ErrorCode(AzureCognitiveSearchIndexLimitReachedValue); + /// InternalServerError. + public static ErrorCode InternalServerError { get; } = new ErrorCode(InternalServerErrorValue); + /// ServiceUnavailable. + public static ErrorCode ServiceUnavailable { get; } = new ErrorCode(ServiceUnavailableValue); + /// Timeout. + public static ErrorCode Timeout { get; } = new ErrorCode(TimeoutValue); + /// QuotaExceeded. + public static ErrorCode QuotaExceeded { get; } = new ErrorCode(QuotaExceededValue); + /// Conflict. + public static ErrorCode Conflict { get; } = new ErrorCode(ConflictValue); + /// Warning. + 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); + /// Determines if two values are not the same. + public static bool operator !=(ErrorCode left, ErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ErrorCode(string value) => new ErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ErrorCode other && Equals(other); + /// + public bool Equals(ErrorCode other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs new file mode 100644 index 000000000000..f136f882d5bb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EvaluationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } + if (Optional.IsDefined(TrainingSplitPercentage)) + { + writer.WritePropertyName("trainingSplitPercentage"u8); + writer.WriteNumberValue(TrainingSplitPercentage.Value); + } + if (Optional.IsDefined(TestingSplitPercentage)) + { + writer.WritePropertyName("testingSplitPercentage"u8); + writer.WriteNumberValue(TestingSplitPercentage.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 + } + } + } + + EvaluationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationDetails(document.RootElement, options); + } + + internal static EvaluationDetails DeserializeEvaluationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationKind? kind = default; + int? trainingSplitPercentage = default; + int? testingSplitPercentage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new EvaluationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("testingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + testingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationDetails(kind, trainingSplitPercentage, testingSplitPercentage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{options.Format}' format."); + } + } + + EvaluationDetails IPersistableModel.Create(BinaryData 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 DeserializeEvaluationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} 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 EvaluationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationDetails(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.Authoring/src/Generated/Models/EvaluationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.cs new file mode 100644 index 000000000000..1fc4598f9317 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.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.Text.Authoring.Models +{ + /// Represents the options used running the evaluation. + public partial class EvaluationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EvaluationDetails() + { + } + + /// Initializes a new instance of . + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationDetails(EvaluationKind? kind, int? trainingSplitPercentage, int? testingSplitPercentage, IDictionary serializedAdditionalRawData) + { + Kind = kind; + TrainingSplitPercentage = trainingSplitPercentage; + TestingSplitPercentage = testingSplitPercentage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + public EvaluationKind? Kind { get; set; } + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TrainingSplitPercentage { get; set; } + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TestingSplitPercentage { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs new file mode 100644 index 000000000000..8a079924352a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.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.Text.Authoring.Models +{ + public partial class EvaluationJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + EvaluationJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobResult(document.RootElement, options); + } + + internal static EvaluationJobResult DeserializeEvaluationJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationDetails evaluationOptions = default; + string modelLabel = default; + string trainingConfigVersion = default; + int percentComplete = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobResult IPersistableModel.Create(BinaryData 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 DeserializeEvaluationJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} 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 EvaluationJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobResult(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.Authoring/src/Generated/Models/EvaluationJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.cs new file mode 100644 index 000000000000..787dbacb2620 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.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.AI.Language.Text.Authoring.Models +{ + /// The EvaluationJobResult. + public partial class EvaluationJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// , or is null. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete, IDictionary serializedAdditionalRawData) + { + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobResult() + { + } + + /// Represents the options used running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents progress percentage. + public int PercentComplete { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs new file mode 100644 index 000000000000..4218bfdf7891 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EvaluationJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, 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 + } + } + } + + EvaluationJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobState(document.RootElement, options); + } + + internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + EvaluationJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = EvaluationJobResult.DeserializeEvaluationJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobState IPersistableModel.Create(BinaryData 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 DeserializeEvaluationJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} 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 EvaluationJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobState(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.Authoring/src/Generated/Models/EvaluationJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.cs new file mode 100644 index 000000000000..acecb242d3f9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a evaluation job. + public partial class EvaluationJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents evaluation task detailed result. + /// is null. + internal EvaluationJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, EvaluationJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, EvaluationJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents evaluation task detailed result. + public EvaluationJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationKind.cs new file mode 100644 index 000000000000..6cd9bbab3779 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationKind.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.Text.Authoring.Models +{ + /// The EvaluationKind. + public readonly partial struct EvaluationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EvaluationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PercentageValue = "percentage"; + private const string ManualValue = "manual"; + + /// Split the data into training and test sets according to user-defined percentages. + public static EvaluationKind Percentage { get; } = new EvaluationKind(PercentageValue); + /// Split the data according to the chosen dataset for every example in the data. + public static EvaluationKind Manual { get; } = new EvaluationKind(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(EvaluationKind left, EvaluationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EvaluationKind left, EvaluationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EvaluationKind(string value) => new EvaluationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EvaluationKind other && Equals(other); + /// + public bool Equals(EvaluationKind other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..56dcc54bebb9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs @@ -0,0 +1,139 @@ +// 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.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownEvaluationSummary))] + public partial class EvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, 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 + } + } + } + + EvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationSummary(document.RootElement, options); + } + + internal static EvaluationSummary DeserializeEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CustomEntityRecognition": return CustomEntityRecognitionEvaluationSummary.DeserializeCustomEntityRecognitionEvaluationSummary(element, options); + case "CustomHealthcare": return CustomHealthcareEvaluationSummary.DeserializeCustomHealthcareEvaluationSummary(element, options); + case "CustomMultiLabelClassification": return CustomMultiLabelClassificationEvaluationSummary.DeserializeCustomMultiLabelClassificationEvaluationSummary(element, options); + case "CustomSingleLabelClassification": return CustomSingleLabelClassificationEvaluationSummary.DeserializeCustomSingleLabelClassificationEvaluationSummary(element, options); + case "CustomTextSentiment": return CustomTextSentimentEvaluationSummary.DeserializeCustomTextSentimentEvaluationSummary(element, options); + } + } + return UnknownEvaluationSummary.DeserializeUnknownEvaluationSummary(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(EvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} 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 EvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationSummary(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.Authoring/src/Generated/Models/EvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.cs new file mode 100644 index 000000000000..864f4d85893c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.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.AI.Language.Text.Authoring.Models +{ + /// + /// Represents the summary for an evaluation operation. + /// 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 EvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload 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 . + /// Represents the options used running the evaluation. + /// is null. + protected EvaluationSummary(EvaluationDetails evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + + EvaluationOptions = evaluationOptions; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + internal EvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + EvaluationOptions = evaluationOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationSummary() + { + } + + /// Represents the project type that the evaluation ran on. + internal ProjectKind ProjectKind { get; set; } + /// Represents the options used running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..e730c672af60 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResultUrl)) + { + writer.WritePropertyName("resultUrl"u8); + writer.WriteStringValue(ResultUrl); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportProjectJobState(document.RootElement, options); + } + + internal static ExportProjectJobState DeserializeExportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + string resultUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("resultUrl"u8)) + { + resultUrl = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + resultUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportProjectJobState IPersistableModel.Create(BinaryData 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 DeserializeExportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} 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 ExportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportProjectJobState(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.Authoring/src/Generated/Models/ExportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.cs new file mode 100644 index 000000000000..9850d7221eab --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of an export job. + public partial class ExportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// Keeps track of any properties unknown to the library. + internal ExportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, string resultUrl, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + ResultUrl = resultUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// The URL to use in order to download the exported project. + public string ResultUrl { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.Serialization.cs similarity index 58% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.Serialization.cs index ee0ac06a51de..ad6193bfa96d 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Text.Authoring.Models { - public partial class ListComponent : IUtf8JsonSerializable, IJsonModel + public partial class ExportedClass : 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,49 @@ 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(ExportedClass)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Category)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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) + ExportedClass 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(ExportedClass)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeListComponent(document.RootElement, options); + return DeserializeExportedClass(document.RootElement, options); } - internal static ListComponent DeserializeListComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportedClass DeserializeExportedClass(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +76,14 @@ internal static ListComponent DeserializeListComponent(JsonElement element, Mode { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + string category = 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("category"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + category = property.Value.GetString(); continue; } if (options.Format != "W") @@ -84,50 +92,50 @@ internal static ListComponent DeserializeListComponent(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new ListComponent(entityComponentKind, serializedAdditionalRawData, value); + return new ExportedClass(category, 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(ExportedClass)} does not support writing '{options.Format}' format."); } } - ListComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedClass 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 DeserializeExportedClass(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ListComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedClass)} 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 ExportedClass FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeListComponent(document.RootElement); + return DeserializeExportedClass(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.Text.Authoring/src/Generated/Models/ExportedClass.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.cs new file mode 100644 index 000000000000..8e5ad37b09df --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.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.AI.Language.Text.Authoring.Models +{ + /// Represents a class of an exported project. + public partial class ExportedClass + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedClass() + { + } + + /// Initializes a new instance of . + /// The class category. + /// Keeps track of any properties unknown to the library. + internal ExportedClass(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The class category. + public string Category { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.Serialization.cs new file mode 100644 index 000000000000..5e806b73d13a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedCompositeEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CompositionSetting)) + { + writer.WritePropertyName("compositionSetting"u8); + writer.WriteStringValue(CompositionSetting.Value.ToString()); + } + if (Optional.IsDefined(List)) + { + writer.WritePropertyName("list"u8); + writer.WriteObjectValue(List, options); + } + if (Optional.IsCollectionDefined(Prebuilts)) + { + writer.WritePropertyName("prebuilts"u8); + writer.WriteStartArray(); + foreach (var item in Prebuilts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedCompositeEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCompositeEntity(document.RootElement, options); + } + + internal static ExportedCompositeEntity DeserializeExportedCompositeEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CompositionSetting? compositionSetting = default; + ExportedEntityList list = default; + IList prebuilts = default; + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("compositionSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compositionSetting = new CompositionSetting(property.Value.GetString()); + continue; + } + if (property.NameEquals("list"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + list = ExportedEntityList.DeserializeExportedEntityList(property.Value, options); + continue; + } + if (property.NameEquals("prebuilts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedPrebuiltEntity.DeserializeExportedPrebuiltEntity(item, options)); + } + prebuilts = array; + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCompositeEntity(compositionSetting, list, prebuilts ?? new ChangeTrackingList(), category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedCompositeEntity IPersistableModel.Create(BinaryData 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 DeserializeExportedCompositeEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} 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 ExportedCompositeEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCompositeEntity(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.Authoring/src/Generated/Models/ExportedCompositeEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.cs new file mode 100644 index 000000000000..d48e0060c13c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.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.Text.Authoring.Models +{ + /// Represents an entity in an exported project with composite entities enabled. + public partial class ExportedCompositeEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCompositeEntity() + { + Prebuilts = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The behavior to follow when the entity's components overlap with each other. + /// The list component of the entity. + /// The prebuilt entities components. + /// The entity category. + /// Keeps track of any properties unknown to the library. + internal ExportedCompositeEntity(CompositionSetting? compositionSetting, ExportedEntityList list, IList prebuilts, string category, IDictionary serializedAdditionalRawData) + { + CompositionSetting = compositionSetting; + List = list; + Prebuilts = prebuilts; + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The behavior to follow when the entity's components overlap with each other. + public CompositionSetting? CompositionSetting { get; set; } + /// The list component of the entity. + public ExportedEntityList List { get; set; } + /// The prebuilt entities components. + public IList Prebuilts { get; } + /// The entity category. + public string Category { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.Serialization.cs new file mode 100644 index 000000000000..02b4790e7d13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedCustomAbstractiveSummarizationDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("summaryLocation"u8); + writer.WriteStringValue(SummaryLocation); + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedCustomAbstractiveSummarizationDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomAbstractiveSummarizationDocument(document.RootElement, options); + } + + internal static ExportedCustomAbstractiveSummarizationDocument DeserializeExportedCustomAbstractiveSummarizationDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string summaryLocation = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("summaryLocation"u8)) + { + summaryLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomAbstractiveSummarizationDocument(summaryLocation, location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomAbstractiveSummarizationDocument IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomAbstractiveSummarizationDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} 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 ExportedCustomAbstractiveSummarizationDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomAbstractiveSummarizationDocument(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.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.cs new file mode 100644 index 000000000000..1e9bde79d55c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.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.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document for a custom abstractive summarization project. + public partial class ExportedCustomAbstractiveSummarizationDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the summary file location in the blob store container associated with the project. + /// is null. + public ExportedCustomAbstractiveSummarizationDocument(string summaryLocation) + { + Argument.AssertNotNull(summaryLocation, nameof(summaryLocation)); + + SummaryLocation = summaryLocation; + } + + /// Initializes a new instance of . + /// Represents the summary file location in the blob store container associated with the project. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomAbstractiveSummarizationDocument(string summaryLocation, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + SummaryLocation = summaryLocation; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedCustomAbstractiveSummarizationDocument() + { + } + + /// Represents the summary file location in the blob store container associated with the project. + public string SummaryLocation { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.Serialization.cs new file mode 100644 index 000000000000..8130c91d17a0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedCustomAbstractiveSummarizationProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomAbstractiveSummarizationProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomAbstractiveSummarizationProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomAbstractiveSummarizationProjectAssets DeserializeExportedCustomAbstractiveSummarizationProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList documents = default; + ProjectKind projectKind = 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(ExportedCustomAbstractiveSummarizationDocument.DeserializeExportedCustomAbstractiveSummarizationDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomAbstractiveSummarizationProjectAssets(projectKind, serializedAdditionalRawData, documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomAbstractiveSummarizationProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomAbstractiveSummarizationProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationProjectAssets)} 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 ExportedCustomAbstractiveSummarizationProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomAbstractiveSummarizationProjectAssets(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.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.cs new file mode 100644 index 000000000000..f6b5213b4f13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.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.Text.Authoring.Models +{ + /// Represents the exported assets for an abstractive summarization project. + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomAbstractiveSummarizationProjectAssets() + { + ProjectKind = ProjectKind.CustomAbstractiveSummarization; + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of documents belonging to this project. + internal ExportedCustomAbstractiveSummarizationProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Documents = documents; + } + + /// The list of documents belonging to this project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.Serialization.cs new file mode 100644 index 000000000000..36c3b019617b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedCustomEntityRecognitionDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedCustomEntityRecognitionDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomEntityRecognitionDocument(document.RootElement, options); + } + + internal static ExportedCustomEntityRecognitionDocument DeserializeExportedCustomEntityRecognitionDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentEntityRegion.DeserializeExportedDocumentEntityRegion(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomEntityRecognitionDocument(entities ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomEntityRecognitionDocument IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomEntityRecognitionDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} 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 ExportedCustomEntityRecognitionDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomEntityRecognitionDocument(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.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.cs new file mode 100644 index 000000000000..457f66c0e720 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.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.Text.Authoring.Models +{ + /// Represents an exported document for a custom entity recognition project. + public partial class ExportedCustomEntityRecognitionDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomEntityRecognitionDocument() + { + Entities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of entity labels belonging to the document. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomEntityRecognitionDocument(IList entities, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Entities = entities; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of entity labels belonging to the document. + public IList Entities { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.Serialization.cs new file mode 100644 index 000000000000..e29002a15116 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomEntityRecognitionProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedCustomEntityRecognitionProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomEntityRecognitionProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomEntityRecognitionProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomEntityRecognitionProjectAssets DeserializeExportedCustomEntityRecognitionProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntity.DeserializeExportedEntity(item, options)); + } + entities = array; + continue; + } + 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(ExportedCustomEntityRecognitionDocument.DeserializeExportedCustomEntityRecognitionDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomEntityRecognitionProjectAssets(projectKind, serializedAdditionalRawData, entities ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomEntityRecognitionProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomEntityRecognitionProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionProjectAssets)} 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 ExportedCustomEntityRecognitionProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomEntityRecognitionProjectAssets(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.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.cs new file mode 100644 index 000000000000..15b8b18d382b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.cs @@ -0,0 +1,40 @@ +// 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.Authoring.Models +{ + /// Represents the exported assets for a entity recognition project. + public partial class ExportedCustomEntityRecognitionProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomEntityRecognitionProjectAssets() + { + ProjectKind = ProjectKind.CustomEntityRecognition; + Entities = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of entities belonging to the project. + /// The list of documents belonging to the project. + internal ExportedCustomEntityRecognitionProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList entities, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Entities = entities; + Documents = documents; + } + + /// The list of entities belonging to the project. + public IList Entities { get; } + /// The list of documents belonging to the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.Serialization.cs new file mode 100644 index 000000000000..b0cbdac083f4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedCustomHealthcareDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedCustomHealthcareDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomHealthcareDocument(document.RootElement, options); + } + + internal static ExportedCustomHealthcareDocument DeserializeExportedCustomHealthcareDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentEntityRegion.DeserializeExportedDocumentEntityRegion(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomHealthcareDocument(entities ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomHealthcareDocument IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomHealthcareDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} 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 ExportedCustomHealthcareDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomHealthcareDocument(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.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.cs new file mode 100644 index 000000000000..6f1cd4926bc9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.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.Text.Authoring.Models +{ + /// Represents an exported document for a CustomHealthcare project. + public partial class ExportedCustomHealthcareDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomHealthcareDocument() + { + Entities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of entity labels belonging to the document. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomHealthcareDocument(IList entities, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Entities = entities; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of entity labels belonging to the document. + public IList Entities { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.Serialization.cs new file mode 100644 index 000000000000..5484989b5b82 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomHealthcareProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedCustomHealthcareProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomHealthcareProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomHealthcareProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomHealthcareProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomHealthcareProjectAssets DeserializeExportedCustomHealthcareProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedCompositeEntity.DeserializeExportedCompositeEntity(item, options)); + } + entities = array; + continue; + } + 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(ExportedCustomHealthcareDocument.DeserializeExportedCustomHealthcareDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomHealthcareProjectAssets(projectKind, serializedAdditionalRawData, entities ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomHealthcareProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomHealthcareProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareProjectAssets)} 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 ExportedCustomHealthcareProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomHealthcareProjectAssets(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.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.cs new file mode 100644 index 000000000000..9556e1cea497 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.cs @@ -0,0 +1,40 @@ +// 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.Authoring.Models +{ + /// Represents the exported assets for a CustomHealthcare project. + public partial class ExportedCustomHealthcareProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomHealthcareProjectAssets() + { + ProjectKind = ProjectKind.CustomHealthcare; + Entities = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of entities belonging to the project. + /// The list of documents belonging to the project. + internal ExportedCustomHealthcareProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList entities, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Entities = entities; + Documents = documents; + } + + /// The list of entities belonging to the project. + public IList Entities { get; } + /// The list of documents belonging to the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.Serialization.cs new file mode 100644 index 000000000000..5ce98fb56034 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedCustomMultiLabelClassificationDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Classes)) + { + writer.WritePropertyName("classes"u8); + writer.WriteStartArray(); + foreach (var item in Classes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedCustomMultiLabelClassificationDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomMultiLabelClassificationDocument(document.RootElement, options); + } + + internal static ExportedCustomMultiLabelClassificationDocument DeserializeExportedCustomMultiLabelClassificationDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList classes = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentClass.DeserializeExportedDocumentClass(item, options)); + } + classes = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomMultiLabelClassificationDocument(classes ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomMultiLabelClassificationDocument IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomMultiLabelClassificationDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} 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 ExportedCustomMultiLabelClassificationDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomMultiLabelClassificationDocument(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.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.cs new file mode 100644 index 000000000000..2664fbeadd48 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.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.Text.Authoring.Models +{ + /// Represents an exported document of a custom multi-label classification project. + public partial class ExportedCustomMultiLabelClassificationDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomMultiLabelClassificationDocument() + { + Classes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The document classes. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomMultiLabelClassificationDocument(IList classes, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Classes = classes; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The document classes. + public IList Classes { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.Serialization.cs new file mode 100644 index 000000000000..260364af2413 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomMultiLabelClassificationProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedCustomMultiLabelClassificationProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Classes)) + { + writer.WritePropertyName("classes"u8); + writer.WriteStartArray(); + foreach (var item in Classes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomMultiLabelClassificationProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomMultiLabelClassificationProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomMultiLabelClassificationProjectAssets DeserializeExportedCustomMultiLabelClassificationProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList classes = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedClass.DeserializeExportedClass(item, options)); + } + classes = array; + continue; + } + 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(ExportedCustomMultiLabelClassificationDocument.DeserializeExportedCustomMultiLabelClassificationDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomMultiLabelClassificationProjectAssets(projectKind, serializedAdditionalRawData, classes ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomMultiLabelClassificationProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomMultiLabelClassificationProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationProjectAssets)} 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 ExportedCustomMultiLabelClassificationProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomMultiLabelClassificationProjectAssets(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.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.cs new file mode 100644 index 000000000000..f7e762c59a43 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.cs @@ -0,0 +1,40 @@ +// 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.Authoring.Models +{ + /// Represents the exported assets for a custom multi-label classification project. + public partial class ExportedCustomMultiLabelClassificationProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomMultiLabelClassificationProjectAssets() + { + ProjectKind = ProjectKind.CustomMultiLabelClassification; + Classes = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of classes in the project. + /// The list of documents in the project. + internal ExportedCustomMultiLabelClassificationProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList classes, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Classes = classes; + Documents = documents; + } + + /// The list of classes in the project. + public IList Classes { get; } + /// The list of documents in the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.Serialization.cs new file mode 100644 index 000000000000..9619c92f350d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.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.Text.Authoring.Models +{ + public partial class ExportedCustomSingleLabelClassificationDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Class)) + { + writer.WritePropertyName("class"u8); + writer.WriteObjectValue(Class, options); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedCustomSingleLabelClassificationDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomSingleLabelClassificationDocument(document.RootElement, options); + } + + internal static ExportedCustomSingleLabelClassificationDocument DeserializeExportedCustomSingleLabelClassificationDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedDocumentClass @class = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("class"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @class = ExportedDocumentClass.DeserializeExportedDocumentClass(property.Value, options); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomSingleLabelClassificationDocument(@class, location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomSingleLabelClassificationDocument IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomSingleLabelClassificationDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} 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 ExportedCustomSingleLabelClassificationDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomSingleLabelClassificationDocument(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.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.cs new file mode 100644 index 000000000000..4e8e5bab2b58 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.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.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document for a custom single-label classification project. + public partial class ExportedCustomSingleLabelClassificationDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomSingleLabelClassificationDocument() + { + } + + /// Initializes a new instance of . + /// The class of the documents. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomSingleLabelClassificationDocument(ExportedDocumentClass @class, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Class = @class; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The class of the documents. + public ExportedDocumentClass Class { get; set; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.Serialization.cs new file mode 100644 index 000000000000..48511313fd42 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomSingleLabelClassificationProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedCustomSingleLabelClassificationProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Classes)) + { + writer.WritePropertyName("classes"u8); + writer.WriteStartArray(); + foreach (var item in Classes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomSingleLabelClassificationProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomSingleLabelClassificationProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomSingleLabelClassificationProjectAssets DeserializeExportedCustomSingleLabelClassificationProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList classes = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedClass.DeserializeExportedClass(item, options)); + } + classes = array; + continue; + } + 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(ExportedCustomSingleLabelClassificationDocument.DeserializeExportedCustomSingleLabelClassificationDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomSingleLabelClassificationProjectAssets(projectKind, serializedAdditionalRawData, classes ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomSingleLabelClassificationProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomSingleLabelClassificationProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationProjectAssets)} 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 ExportedCustomSingleLabelClassificationProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomSingleLabelClassificationProjectAssets(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.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.cs new file mode 100644 index 000000000000..ad0da5081ab2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.cs @@ -0,0 +1,40 @@ +// 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.Authoring.Models +{ + /// Represents the exported assets for a single-label classification project. + public partial class ExportedCustomSingleLabelClassificationProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomSingleLabelClassificationProjectAssets() + { + ProjectKind = ProjectKind.CustomSingleLabelClassification; + Classes = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of classes belonging to this project. + /// The list of documents belonging to this project. + internal ExportedCustomSingleLabelClassificationProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList classes, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Classes = classes; + Documents = documents; + } + + /// The list of classes belonging to this project. + public IList Classes { get; } + /// The list of documents belonging to this project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.Serialization.cs new file mode 100644 index 000000000000..80ff9a84b432 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedCustomTextSentimentDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SentimentSpans)) + { + writer.WritePropertyName("sentimentSpans"u8); + writer.WriteStartArray(); + foreach (var item in SentimentSpans) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedCustomTextSentimentDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomTextSentimentDocument(document.RootElement, options); + } + + internal static ExportedCustomTextSentimentDocument DeserializeExportedCustomTextSentimentDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sentimentSpans = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sentimentSpans"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentSentimentLabel.DeserializeExportedDocumentSentimentLabel(item, options)); + } + sentimentSpans = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomTextSentimentDocument(sentimentSpans ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomTextSentimentDocument IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomTextSentimentDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} 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 ExportedCustomTextSentimentDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomTextSentimentDocument(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.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.cs new file mode 100644 index 000000000000..60ac85cb1f40 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.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.Text.Authoring.Models +{ + /// Represents an exported document for a custom text sentiment project. + public partial class ExportedCustomTextSentimentDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomTextSentimentDocument() + { + SentimentSpans = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomTextSentimentDocument(IList sentimentSpans, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + SentimentSpans = sentimentSpans; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the sentiment spans. + public IList SentimentSpans { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.Serialization.cs new file mode 100644 index 000000000000..29705c0072cb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomTextSentimentProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedCustomTextSentimentProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomTextSentimentProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomTextSentimentProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomTextSentimentProjectAssets DeserializeExportedCustomTextSentimentProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList documents = default; + ProjectKind projectKind = 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(ExportedCustomTextSentimentDocument.DeserializeExportedCustomTextSentimentDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomTextSentimentProjectAssets(projectKind, serializedAdditionalRawData, documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomTextSentimentProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedCustomTextSentimentProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentProjectAssets)} 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 ExportedCustomTextSentimentProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomTextSentimentProjectAssets(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.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.cs new file mode 100644 index 000000000000..212043139c9a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.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.Text.Authoring.Models +{ + /// Represents the exported assets for a custom text sentiment project. + public partial class ExportedCustomTextSentimentProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomTextSentimentProjectAssets() + { + ProjectKind = ProjectKind.CustomTextSentiment; + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of documents belonging to the project. + internal ExportedCustomTextSentimentProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Documents = documents; + } + + /// The list of documents belonging to the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.Serialization.cs new file mode 100644 index 000000000000..7478efb3a6d3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.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.Text.Authoring.Models +{ + public partial class ExportedDocumentClass : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentClass)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedDocumentClass IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentClass)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedDocumentClass(document.RootElement, options); + } + + internal static ExportedDocumentClass DeserializeExportedDocumentClass(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedDocumentClass(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedDocumentClass)} does not support writing '{options.Format}' format."); + } + } + + ExportedDocumentClass IPersistableModel.Create(BinaryData 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 DeserializeExportedDocumentClass(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedDocumentClass)} 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 ExportedDocumentClass FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedDocumentClass(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.Authoring/src/Generated/Models/ExportedDocumentClass.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.cs new file mode 100644 index 000000000000..f50670ddc89b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.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.AI.Language.Text.Authoring.Models +{ + /// Represents a classification label for a document. + public partial class ExportedDocumentClass + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentClass() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentClass(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the category. + public string Category { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.Serialization.cs new file mode 100644 index 000000000000..dc87c9d52c1e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedDocumentEntityLabel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (Optional.IsDefined(Offset)) + { + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset.Value); + } + if (Optional.IsDefined(Length)) + { + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length.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 + } + } + } + + ExportedDocumentEntityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedDocumentEntityLabel(document.RootElement, options); + } + + internal static ExportedDocumentEntityLabel DeserializeExportedDocumentEntityLabel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + int? offset = default; + int? length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedDocumentEntityLabel(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} does not support writing '{options.Format}' format."); + } + } + + ExportedDocumentEntityLabel IPersistableModel.Create(BinaryData 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 DeserializeExportedDocumentEntityLabel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} 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 ExportedDocumentEntityLabel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedDocumentEntityLabel(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.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.cs new file mode 100644 index 000000000000..5dafa09970d4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.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.Text.Authoring.Models +{ + /// Represents an entity label for a document. + public partial class ExportedDocumentEntityLabel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentEntityLabel() + { + } + + /// Initializes a new instance of . + /// The entity category. + /// Start position for the entity text. + /// Length for the entity text. + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentEntityLabel(string category, int? offset, int? length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The entity category. + public string Category { get; set; } + /// Start position for the entity text. + public int? Offset { get; set; } + /// Length for the entity text. + public int? Length { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.Serialization.cs new file mode 100644 index 000000000000..5eb70951a1dd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedDocumentEntityRegion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityRegion)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RegionOffset)) + { + writer.WritePropertyName("regionOffset"u8); + writer.WriteNumberValue(RegionOffset.Value); + } + if (Optional.IsDefined(RegionLength)) + { + writer.WritePropertyName("regionLength"u8); + writer.WriteNumberValue(RegionLength.Value); + } + if (Optional.IsCollectionDefined(Labels)) + { + writer.WritePropertyName("labels"u8); + writer.WriteStartArray(); + foreach (var item in Labels) + { + 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 + } + } + } + + ExportedDocumentEntityRegion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityRegion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedDocumentEntityRegion(document.RootElement, options); + } + + internal static ExportedDocumentEntityRegion DeserializeExportedDocumentEntityRegion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? regionOffset = default; + int? regionLength = default; + IList labels = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("regionOffset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionOffset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("regionLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionLength = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentEntityLabel.DeserializeExportedDocumentEntityLabel(item, options)); + } + labels = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedDocumentEntityRegion(regionOffset, regionLength, labels ?? 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(ExportedDocumentEntityRegion)} does not support writing '{options.Format}' format."); + } + } + + ExportedDocumentEntityRegion IPersistableModel.Create(BinaryData 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 DeserializeExportedDocumentEntityRegion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedDocumentEntityRegion)} 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 ExportedDocumentEntityRegion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedDocumentEntityRegion(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.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.cs new file mode 100644 index 000000000000..ef1f229211c8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.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.AI.Language.Text.Authoring.Models +{ + /// Represents a region in a document for entity labeling. + public partial class ExportedDocumentEntityRegion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentEntityRegion() + { + Labels = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Start position for the region. + /// Length for the region text. + /// The list of entity labels belonging to this region. + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentEntityRegion(int? regionOffset, int? regionLength, IList labels, IDictionary serializedAdditionalRawData) + { + RegionOffset = regionOffset; + RegionLength = regionLength; + Labels = labels; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Start position for the region. + public int? RegionOffset { get; set; } + /// Length for the region text. + public int? RegionLength { get; set; } + /// The list of entity labels belonging to this region. + public IList Labels { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.Serialization.cs similarity index 51% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.Serialization.cs index 6996da068b41..f0f2a616ac1c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Text.Authoring.Models { - public partial class TextDynamicClassificationInput : IUtf8JsonSerializable, IJsonModel + public partial class ExportedDocumentSentimentLabel : 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,40 +26,59 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod /// 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(TextDynamicClassificationInput)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(TextInput)) + if (Optional.IsDefined(Category)) { - writer.WritePropertyName("analysisInput"u8); - writer.WriteObjectValue(TextInput, options); + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(ActionContent)) + if (Optional.IsDefined(Offset)) { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset.Value); + } + if (Optional.IsDefined(Length)) + { + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length.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 + } } } - TextDynamicClassificationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportedDocumentSentimentLabel 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(TextDynamicClassificationInput)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTextDynamicClassificationInput(document.RootElement, options); + return DeserializeExportedDocumentSentimentLabel(document.RootElement, options); } - internal static TextDynamicClassificationInput DeserializeTextDynamicClassificationInput(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportedDocumentSentimentLabel DeserializeExportedDocumentSentimentLabel(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -67,34 +86,38 @@ internal static TextDynamicClassificationInput DeserializeTextDynamicClassificat { return null; } - MultiLanguageTextInput analysisInput = default; - DynamicClassificationActionContent parameters = default; - AnalyzeTextInputKind kind = default; + TextAnalysisAuthoringSentiment? category = default; + int? offset = default; + int? length = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("analysisInput"u8)) + if (property.NameEquals("category"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - analysisInput = MultiLanguageTextInput.DeserializeMultiLanguageTextInput(property.Value, options); + category = new TextAnalysisAuthoringSentiment(property.Value.GetString()); continue; } - if (property.NameEquals("parameters"u8)) + if (property.NameEquals("offset"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - parameters = DynamicClassificationActionContent.DeserializeDynamicClassificationActionContent(property.Value, options); + offset = property.Value.GetInt32(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("length"u8)) { - kind = new AnalyzeTextInputKind(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + length = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -103,50 +126,50 @@ internal static TextDynamicClassificationInput DeserializeTextDynamicClassificat } } serializedAdditionalRawData = rawDataDictionary; - return new TextDynamicClassificationInput(kind, serializedAdditionalRawData, analysisInput, parameters); + return new ExportedDocumentSentimentLabel(category, 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(TextDynamicClassificationInput)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} does not support writing '{options.Format}' format."); } } - TextDynamicClassificationInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedDocumentSentimentLabel 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 DeserializeTextDynamicClassificationInput(document.RootElement, options); + return DeserializeExportedDocumentSentimentLabel(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} 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 TextDynamicClassificationInput FromResponse(Response response) + internal static ExportedDocumentSentimentLabel FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeTextDynamicClassificationInput(document.RootElement); + return DeserializeExportedDocumentSentimentLabel(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.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.cs new file mode 100644 index 000000000000..dc1adbc74a16 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.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.Text.Authoring.Models +{ + /// Represents an entity label for a document. + public partial class ExportedDocumentSentimentLabel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentSentimentLabel() + { + } + + /// Initializes a new instance of . + /// The sentiment category. + /// Start position for the sentiment text. + /// Length for the sentiment text. + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentSentimentLabel(TextAnalysisAuthoringSentiment? category, int? offset, int? length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The sentiment category. + public TextAnalysisAuthoringSentiment? Category { get; set; } + /// Start position for the sentiment text. + public int? Offset { get; set; } + /// Length for the sentiment text. + public int? Length { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.Serialization.cs new file mode 100644 index 000000000000..c5c6edab6ac1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntity(document.RootElement, options); + } + + internal static ExportedEntity DeserializeExportedEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntity(category, description, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntity IPersistableModel.Create(BinaryData 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 DeserializeExportedEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntity)} 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 ExportedEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntity(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.Authoring/src/Generated/Models/ExportedEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.cs new file mode 100644 index 000000000000..0d94bdbb9599 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.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.Text.Authoring.Models +{ + /// Represents an entity in an exported project. + public partial class ExportedEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntity() + { + } + + /// Initializes a new instance of . + /// The entity category. + /// Short description for entity category. Required when enabling synthetic data generation. + /// Keeps track of any properties unknown to the library. + internal ExportedEntity(string category, string description, IDictionary serializedAdditionalRawData) + { + Category = category; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The entity category. + public string Category { get; set; } + /// Short description for entity category. Required when enabling synthetic data generation. + public string Description { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs new file mode 100644 index 000000000000..d531ecfb0b80 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.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.Text.Authoring.Models +{ + public partial class ExportedEntityList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Sublists)) + { + writer.WritePropertyName("sublists"u8); + writer.WriteStartArray(); + foreach (var item in Sublists) + { + 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 + } + } + } + + ExportedEntityList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityList(document.RootElement, options); + } + + internal static ExportedEntityList DeserializeExportedEntityList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sublists = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sublists"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntitySublist.DeserializeExportedEntitySublist(item, options)); + } + sublists = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityList(sublists ?? 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(ExportedEntityList)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityList IPersistableModel.Create(BinaryData 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 DeserializeExportedEntityList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityList)} 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 ExportedEntityList FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityList(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.Authoring/src/Generated/Models/ExportedEntityList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.cs new file mode 100644 index 000000000000..649912622cfe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.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.Text.Authoring.Models +{ + /// Represents a list component of an entity. + public partial class ExportedEntityList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityList() + { + Sublists = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The sub-lists of the list component. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityList(IList sublists, IDictionary serializedAdditionalRawData) + { + Sublists = sublists; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The sub-lists of the list component. + public IList Sublists { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs new file mode 100644 index 000000000000..4972bb71997d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedEntityListSynonym : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + 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 + } + } + } + + ExportedEntityListSynonym IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityListSynonym(document.RootElement, options); + } + + internal static ExportedEntityListSynonym DeserializeExportedEntityListSynonym(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string language = default; + IList values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + values = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityListSynonym(language, values ?? 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(ExportedEntityListSynonym)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityListSynonym IPersistableModel.Create(BinaryData 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 DeserializeExportedEntityListSynonym(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} 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 ExportedEntityListSynonym FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityListSynonym(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.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs new file mode 100644 index 000000000000..d2ce805ef39d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.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.AI.Language.Text.Authoring.Models +{ + /// Represents a list of synonyms inside a list component. + public partial class ExportedEntityListSynonym + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityListSynonym() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The list of synonyms. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityListSynonym(string language, IList values, IDictionary serializedAdditionalRawData) + { + Language = language; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The list of synonyms. + public IList Values { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs new file mode 100644 index 000000000000..a0785f2249bb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedEntitySublist : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ListKey)) + { + writer.WritePropertyName("listKey"u8); + writer.WriteStringValue(ListKey); + } + if (Optional.IsCollectionDefined(Synonyms)) + { + writer.WritePropertyName("synonyms"u8); + writer.WriteStartArray(); + foreach (var item in Synonyms) + { + 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 + } + } + } + + ExportedEntitySublist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntitySublist(document.RootElement, options); + } + + internal static ExportedEntitySublist DeserializeExportedEntitySublist(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string listKey = default; + IList synonyms = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("listKey"u8)) + { + listKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("synonyms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntityListSynonym.DeserializeExportedEntityListSynonym(item, options)); + } + synonyms = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntitySublist(listKey, synonyms ?? 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(ExportedEntitySublist)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntitySublist IPersistableModel.Create(BinaryData 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 DeserializeExportedEntitySublist(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntitySublist)} 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 ExportedEntitySublist FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntitySublist(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.Authoring/src/Generated/Models/ExportedEntitySublist.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.cs new file mode 100644 index 000000000000..5ae507815c1e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.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.AI.Language.Text.Authoring.Models +{ + /// Represents a sub-list inside a list component. + public partial class ExportedEntitySublist + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntitySublist() + { + Synonyms = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The key of the sub-list. + /// The phrases of that correspond to the sub-list. + /// Keeps track of any properties unknown to the library. + internal ExportedEntitySublist(string listKey, IList synonyms, IDictionary serializedAdditionalRawData) + { + ListKey = listKey; + Synonyms = synonyms; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key of the sub-list. + public string ListKey { get; set; } + /// The phrases of that correspond to the sub-list. + public IList Synonyms { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs new file mode 100644 index 000000000000..762001abd73f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedModelDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedModelDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelDetails(document.RootElement, options); + } + + internal static ExportedModelDetails DeserializeExportedModelDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelDetails(trainedModelLabel, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelDetails IPersistableModel.Create(BinaryData 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 DeserializeExportedModelDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} 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 ExportedModelDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelDetails(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.Authoring/src/Generated/Models/ExportedModelDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.cs new file mode 100644 index 000000000000..80920bc366c0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for creating or replacing an exported model. + public partial class ExportedModelDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 trained model label. + /// is null. + public ExportedModelDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + } + + /// Initializes a new instance of . + /// The trained model label. + /// Keeps track of any properties unknown to the library. + internal ExportedModelDetails(string trainedModelLabel, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelDetails() + { + } + + /// The trained model label. + public string TrainedModelLabel { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs new file mode 100644 index 000000000000..400ffa3c059b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedModelJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + ExportedModelJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelJobState(document.RootElement, options); + } + + internal static ExportedModelJobState DeserializeExportedModelJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(ExportedModelJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelJobState IPersistableModel.Create(BinaryData 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 DeserializeExportedModelJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelJobState)} 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 ExportedModelJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelJobState(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.Authoring/src/Generated/Models/ExportedModelJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.cs new file mode 100644 index 000000000000..2ab5ed9075b6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a job to create or updated an exported model. + public partial class ExportedModelJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportedModelJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ExportedModelJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.Serialization.cs new file mode 100644 index 000000000000..b37e81e6521d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedModelManifest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelManifest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelFiles"u8); + writer.WriteStartArray(); + foreach (var item in ModelFiles) + { + 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 + } + } + } + + ExportedModelManifest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelManifest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelManifest(document.RootElement, options); + } + + internal static ExportedModelManifest DeserializeExportedModelManifest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList modelFiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelFiles"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ModelFile.DeserializeModelFile(item, options)); + } + modelFiles = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelManifest(modelFiles, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelManifest)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelManifest IPersistableModel.Create(BinaryData 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 DeserializeExportedModelManifest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelManifest)} 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 ExportedModelManifest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelManifest(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.Authoring/src/Generated/Models/ExportedModelManifest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.cs new file mode 100644 index 000000000000..bf9a347bff15 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the properties for the exported model manifest. + public partial class ExportedModelManifest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model files belonging to this model. + /// is null. + internal ExportedModelManifest(IEnumerable modelFiles) + { + Argument.AssertNotNull(modelFiles, nameof(modelFiles)); + + ModelFiles = modelFiles.ToList(); + } + + /// Initializes a new instance of . + /// The model files belonging to this model. + /// Keeps track of any properties unknown to the library. + internal ExportedModelManifest(IReadOnlyList modelFiles, IDictionary serializedAdditionalRawData) + { + ModelFiles = modelFiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelManifest() + { + } + + /// The model files belonging to this model. + public IReadOnlyList ModelFiles { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..c2b8b8cc290c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedPrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedPrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + + internal static ExportedPrebuiltEntity DeserializeExportedPrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedPrebuiltEntity(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedPrebuiltEntity IPersistableModel.Create(BinaryData 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 DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} 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 ExportedPrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedPrebuiltEntity(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.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs new file mode 100644 index 000000000000..c758f0fed070 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported prebuilt entity component. + public partial class ExportedPrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 prebuilt entity category. + /// is null. + public ExportedPrebuiltEntity(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// Keeps track of any properties unknown to the library. + internal ExportedPrebuiltEntity(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedPrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.Serialization.cs new file mode 100644 index 000000000000..46e531b43506 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.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.AI.Language.Text.Authoring.Models +{ + public partial class ExportedProject : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectFileVersion"u8); + writer.WriteStringValue(ProjectFileVersion); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.ToString()); + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + if (Optional.IsDefined(Assets)) + { + writer.WritePropertyName("assets"u8); + writer.WriteObjectValue(Assets, 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 + } + } + } + + ExportedProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProject(document.RootElement, options); + } + + internal static ExportedProject DeserializeExportedProject(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectFileVersion = default; + StringIndexType stringIndexType = default; + CreateProjectDetails metadata = default; + ExportedProjectAssets assets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectFileVersion"u8)) + { + projectFileVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("stringIndexType"u8)) + { + stringIndexType = new StringIndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + metadata = CreateProjectDetails.DeserializeCreateProjectDetails(property.Value, options); + continue; + } + if (property.NameEquals("assets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + assets = ExportedProjectAssets.DeserializeExportedProjectAssets(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{options.Format}' format."); + } + } + + ExportedProject IPersistableModel.Create(BinaryData 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 DeserializeExportedProject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProject)} 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 ExportedProject FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProject(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.Authoring/src/Generated/Models/ExportedProject.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.cs new file mode 100644 index 000000000000..ef3a9a5db83b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.cs @@ -0,0 +1,100 @@ +// 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.Authoring.Models +{ + /// Represents an exported project. + public partial class ExportedProject + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// or is null. + public ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata) + { + Argument.AssertNotNull(projectFileVersion, nameof(projectFileVersion)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata, ExportedProjectAssets assets, IDictionary serializedAdditionalRawData) + { + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + Assets = assets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedProject() + { + } + + /// The version of the exported file. + public string ProjectFileVersion { get; } + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + public StringIndexType StringIndexType { get; } + /// Represents the project metadata. + public CreateProjectDetails Metadata { get; } + /// + /// Represents the project assets. + /// 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 ExportedProjectAssets Assets { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..19f14783dbb1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs @@ -0,0 +1,138 @@ +// 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.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownExportedProjectAssets))] + public partial class ExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.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 + } + } + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static ExportedProjectAssets DeserializeExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CustomAbstractiveSummarization": return ExportedCustomAbstractiveSummarizationProjectAssets.DeserializeExportedCustomAbstractiveSummarizationProjectAssets(element, options); + case "CustomEntityRecognition": return ExportedCustomEntityRecognitionProjectAssets.DeserializeExportedCustomEntityRecognitionProjectAssets(element, options); + case "CustomHealthcare": return ExportedCustomHealthcareProjectAssets.DeserializeExportedCustomHealthcareProjectAssets(element, options); + case "CustomMultiLabelClassification": return ExportedCustomMultiLabelClassificationProjectAssets.DeserializeExportedCustomMultiLabelClassificationProjectAssets(element, options); + case "CustomSingleLabelClassification": return ExportedCustomSingleLabelClassificationProjectAssets.DeserializeExportedCustomSingleLabelClassificationProjectAssets(element, options); + case "CustomTextSentiment": return ExportedCustomTextSentimentProjectAssets.DeserializeExportedCustomTextSentimentProjectAssets(element, options); + } + } + return UnknownExportedProjectAssets.DeserializeUnknownExportedProjectAssets(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(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} 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 ExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProjectAssets(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.Authoring/src/Generated/Models/ExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.cs new file mode 100644 index 000000000000..0130e7c0af22 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.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.Text.Authoring.Models +{ + /// + /// Represents the assets of an exported project. + /// 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 ExportedProjectAssets + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload 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 ExportedProjectAssets() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the project kind. + internal ProjectKind ProjectKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs new file mode 100644 index 000000000000..abeb02983451 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ExportedTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("exportedModelName"u8); + writer.WriteStringValue(ExportedModelName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastExportedModelDateTime"u8); + writer.WriteStringValue(LastExportedModelDateTime, "O"); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ExportedTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedTrainedModel(document.RootElement, options); + } + + internal static ExportedTrainedModel DeserializeExportedTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string exportedModelName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastExportedModelDateTime = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exportedModelName"u8)) + { + exportedModelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastExportedModelDateTime"u8)) + { + lastExportedModelDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ExportedTrainedModel IPersistableModel.Create(BinaryData 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 DeserializeExportedTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} 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 ExportedTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedTrainedModel(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.Authoring/src/Generated/Models/ExportedTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.cs new file mode 100644 index 000000000000..ab451db6dc17 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.cs @@ -0,0 +1,104 @@ +// 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.Authoring.Models +{ + /// Represents an exported trained model. + public partial class ExportedTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// or is null. + internal ExportedTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// Keeps track of any properties unknown to the library. + internal ExportedTrainedModel(string exportedModelName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, IDictionary serializedAdditionalRawData) + { + ExportedModelName = exportedModelName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedTrainedModel() + { + } + + /// The exported model name. + public string ExportedModelName { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The last exported date time of the model. + public DateTimeOffset LastExportedModelDateTime { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..75db8690ed14 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ImportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + ImportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImportProjectJobState(document.RootElement, options); + } + + internal static ImportProjectJobState DeserializeImportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(ImportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ImportProjectJobState IPersistableModel.Create(BinaryData 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 DeserializeImportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImportProjectJobState)} 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 ImportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImportProjectJobState(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.Authoring/src/Generated/Models/ImportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.cs new file mode 100644 index 000000000000..11931f72bd16 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of an import job. + public partial class ImportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ImportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ImportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorCode.cs new file mode 100644 index 000000000000..0dbec264065a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/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.Text.Authoring.Models +{ + /// 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"; + + /// InvalidRequest. + public static InnerErrorCode InvalidRequest { get; } = new InnerErrorCode(InvalidRequestValue); + /// InvalidParameterValue. + public static InnerErrorCode InvalidParameterValue { get; } = new InnerErrorCode(InvalidParameterValueValue); + /// KnowledgeBaseNotFound. + public static InnerErrorCode KnowledgeBaseNotFound { get; } = new InnerErrorCode(KnowledgeBaseNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static InnerErrorCode AzureCognitiveSearchNotFound { get; } = new InnerErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchThrottling. + public static InnerErrorCode AzureCognitiveSearchThrottling { get; } = new InnerErrorCode(AzureCognitiveSearchThrottlingValue); + /// ExtractionFailure. + public static InnerErrorCode ExtractionFailure { get; } = new InnerErrorCode(ExtractionFailureValue); + /// InvalidRequestBodyFormat. + public static InnerErrorCode InvalidRequestBodyFormat { get; } = new InnerErrorCode(InvalidRequestBodyFormatValue); + /// EmptyRequest. + public static InnerErrorCode EmptyRequest { get; } = new InnerErrorCode(EmptyRequestValue); + /// MissingInputDocuments. + public static InnerErrorCode MissingInputDocuments { get; } = new InnerErrorCode(MissingInputDocumentsValue); + /// InvalidDocument. + public static InnerErrorCode InvalidDocument { get; } = new InnerErrorCode(InvalidDocumentValue); + /// ModelVersionIncorrect. + public static InnerErrorCode ModelVersionIncorrect { get; } = new InnerErrorCode(ModelVersionIncorrectValue); + /// InvalidDocumentBatch. + public static InnerErrorCode InvalidDocumentBatch { get; } = new InnerErrorCode(InvalidDocumentBatchValue); + /// UnsupportedLanguageCode. + public static InnerErrorCode UnsupportedLanguageCode { get; } = new InnerErrorCode(UnsupportedLanguageCodeValue); + /// InvalidCountryHint. + 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.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs new file mode 100644 index 000000000000..f461bad119e7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class InnerErrorModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{format}' format."); + } + + 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, 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 + } + } + } + + InnerErrorModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInnerErrorModel(document.RootElement, options); + } + + internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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("code"u8)) + { + code = new InnerErrorCode(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; + } + 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("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InnerErrorModel( + code, + message, + details ?? new ChangeTrackingDictionary(), + target, + 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(InnerErrorModel)} does not support writing '{options.Format}' format."); + } + } + + InnerErrorModel IPersistableModel.Create(BinaryData 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 DeserializeInnerErrorModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InnerErrorModel)} 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 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, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.cs new file mode 100644 index 000000000000..8a526e0a0df3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/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.Text.Authoring.Models +{ + /// 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.Text.Authoring/src/Generated/Models/JobStatus.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/JobStatus.cs new file mode 100644 index 000000000000..7bf195744b62 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/JobStatus.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.Text.Authoring.Models +{ + /// The JobStatus. + public readonly partial struct JobStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobStatus(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 FailedValue = "failed"; + private const string CancelledValue = "cancelled"; + private const string CancellingValue = "cancelling"; + private const string PartiallyCompletedValue = "partiallyCompleted"; + + /// notStarted. + public static JobStatus NotStarted { get; } = new JobStatus(NotStartedValue); + /// running. + public static JobStatus Running { get; } = new JobStatus(RunningValue); + /// succeeded. + public static JobStatus Succeeded { get; } = new JobStatus(SucceededValue); + /// failed. + public static JobStatus Failed { get; } = new JobStatus(FailedValue); + /// cancelled. + public static JobStatus Cancelled { get; } = new JobStatus(CancelledValue); + /// cancelling. + public static JobStatus Cancelling { get; } = new JobStatus(CancellingValue); + /// partiallyCompleted. + public static JobStatus PartiallyCompleted { get; } = new JobStatus(PartiallyCompletedValue); + /// Determines if two values are the same. + public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator JobStatus(string value) => new JobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobStatus other && Equals(other); + /// + public bool Equals(JobStatus other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs new file mode 100644 index 000000000000..feb11863a23d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class LoadSnapshotJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + LoadSnapshotJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadSnapshotJobState(document.RootElement, options); + } + + internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(LoadSnapshotJobState)} does not support writing '{options.Format}' format."); + } + } + + LoadSnapshotJobState IPersistableModel.Create(BinaryData 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 DeserializeLoadSnapshotJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} 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 LoadSnapshotJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLoadSnapshotJobState(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.Authoring/src/Generated/Models/LoadSnapshotJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.cs new file mode 100644 index 000000000000..09150def111c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of loading a snapshot job. + public partial class LoadSnapshotJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal LoadSnapshotJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal LoadSnapshotJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LoadSnapshotJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.Serialization.cs new file mode 100644 index 000000000000..c5ec6b2375a6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.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.Text.Authoring.Models +{ + public partial class ModelFile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModelFile)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("contentUri"u8); + writer.WriteStringValue(ContentUri.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 + } + } + } + + ModelFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModelFile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeModelFile(document.RootElement, options); + } + + internal static ModelFile DeserializeModelFile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + Uri contentUri = 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("contentUri"u8)) + { + contentUri = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ModelFile(name, contentUri, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ModelFile)} does not support writing '{options.Format}' format."); + } + } + + ModelFile IPersistableModel.Create(BinaryData 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 DeserializeModelFile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ModelFile)} 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 ModelFile FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeModelFile(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.Authoring/src/Generated/Models/ModelFile.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.cs new file mode 100644 index 000000000000..d12ae751d402 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.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.Text.Authoring.Models +{ + /// Represents the properties for the model file. + public partial class ModelFile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the file. + /// The URI to retrieve the content of the file. + /// or is null. + internal ModelFile(string name, Uri contentUri) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(contentUri, nameof(contentUri)); + + Name = name; + ContentUri = contentUri; + } + + /// Initializes a new instance of . + /// The name of the file. + /// The URI to retrieve the content of the file. + /// Keeps track of any properties unknown to the library. + internal ModelFile(string name, Uri contentUri, IDictionary serializedAdditionalRawData) + { + Name = name; + ContentUri = contentUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ModelFile() + { + } + + /// The name of the file. + public string Name { get; } + /// The URI to retrieve the content of the file. + public Uri ContentUri { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..1de24d4adc2f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class MultiLabelClassEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + MultiLabelClassEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMultiLabelClassEvaluationSummary(document.RootElement, options); + } + + internal static MultiLabelClassEvaluationSummary DeserializeMultiLabelClassEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MultiLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + MultiLabelClassEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeMultiLabelClassEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} 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 MultiLabelClassEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMultiLabelClassEvaluationSummary(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.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.cs new file mode 100644 index 000000000000..f7e281221ba1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary of a class in a multi-label classification project. + public partial class MultiLabelClassEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal MultiLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal MultiLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MultiLabelClassEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..14ba7f8385b3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class MultiLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("classes"u8); + writer.WriteStartObject(); + foreach (var item in Classes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + MultiLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static MultiLabelClassificationEvaluationSummary DeserializeMultiLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary classes = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MultiLabelClassEvaluationSummary.DeserializeMultiLabelClassEvaluationSummary(property0.Value, options)); + } + classes = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MultiLabelClassificationEvaluationSummary( + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + MultiLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} 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 MultiLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMultiLabelClassificationEvaluationSummary(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.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..b0c0a54ed86f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a multi-label classification project. + public partial class MultiLabelClassificationEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// is null. + internal MultiLabelClassificationEvaluationSummary(IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(classes, nameof(classes)); + + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal MultiLabelClassificationEvaluationSummary(IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MultiLabelClassificationEvaluationSummary() + { + } + + /// Represents the classes evaluation. + public IReadOnlyDictionary Classes { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..d10a139fae67 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.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.Text.Authoring.Models +{ + public partial class PrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("examples"u8); + writer.WriteStringValue(Examples); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + PrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrebuiltEntity(document.RootElement, options); + } + + internal static PrebuiltEntity DeserializePrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + string description = default; + string examples = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("examples"u8)) + { + examples = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + PrebuiltEntity IPersistableModel.Create(BinaryData 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 DeserializePrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} 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 PrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePrebuiltEntity(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.Authoring/src/Generated/Models/PrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.cs new file mode 100644 index 000000000000..f03feb9f25e0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a supported prebuilt entity. + public partial class PrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 description. + /// English examples for the entity. + /// or is null. + internal PrebuiltEntity(string description, string examples) + { + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(examples, nameof(examples)); + + Description = description; + Examples = examples; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// Keeps track of any properties unknown to the library. + internal PrebuiltEntity(string category, string description, string examples, IDictionary serializedAdditionalRawData) + { + Category = category; + Description = description; + Examples = examples; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + /// The description. + public string Description { get; } + /// English examples for the entity. + public string Examples { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs new file mode 100644 index 000000000000..db31db0899db --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ProjectDeletionJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + ProjectDeletionJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeletionJobState(document.RootElement, options); + } + + internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(ProjectDeletionJobState)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeletionJobState IPersistableModel.Create(BinaryData 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 DeserializeProjectDeletionJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} 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 ProjectDeletionJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeletionJobState(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.Authoring/src/Generated/Models/ProjectDeletionJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.cs new file mode 100644 index 000000000000..fb15e24680aa --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a project deletion job. + public partial class ProjectDeletionJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ProjectDeletionJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ProjectDeletionJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeletionJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs new file mode 100644 index 000000000000..cb308a7742e2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.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.AI.Language.Text.Authoring.Models +{ + public partial class ProjectDeployment : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("assignedResources"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResources) + { + 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 + } + } + } + + ProjectDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeployment(document.RootElement, options); + } + + internal static ProjectDeployment DeserializeProjectDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + string modelTrainingConfigVersion = default; + IReadOnlyList assignedResources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentResource.DeserializeDeploymentResource(item, options)); + } + assignedResources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeployment IPersistableModel.Create(BinaryData 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 DeserializeProjectDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} 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 ProjectDeployment FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeployment(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.Authoring/src/Generated/Models/ProjectDeployment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.cs new file mode 100644 index 000000000000..80bbd68c4530 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a project deployment. + public partial class ProjectDeployment + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// , or is null. + internal ProjectDeployment(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IEnumerable assignedResources) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + Argument.AssertNotNull(assignedResources, nameof(assignedResources)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources.ToList(); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// Keeps track of any properties unknown to the library. + internal ProjectDeployment(string deploymentName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IReadOnlyList assignedResources, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeployment() + { + } + + /// Represents deployment name. + public string DeploymentName { get; } + /// Represents deployment modelId. + public string ModelId { get; } + /// Represents deployment last trained time. + public DateTimeOffset LastTrainedDateTime { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + /// Represents model training config version. + public string ModelTrainingConfigVersion { get; } + /// Represents the metadata of the assigned Azure resources. + public IReadOnlyList AssignedResources { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectKind.cs new file mode 100644 index 000000000000..1128b63342ac --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectKind.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.AI.Language.Text.Authoring.Models +{ + /// The ProjectKind. + public readonly partial struct ProjectKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProjectKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CustomSingleLabelClassificationValue = "CustomSingleLabelClassification"; + private const string CustomMultiLabelClassificationValue = "CustomMultiLabelClassification"; + private const string CustomEntityRecognitionValue = "CustomEntityRecognition"; + private const string CustomAbstractiveSummarizationValue = "CustomAbstractiveSummarization"; + private const string CustomHealthcareValue = "CustomHealthcare"; + private const string CustomTextSentimentValue = "CustomTextSentiment"; + + /// For building a classification model to classify text using your own data. Each file will have only one label. For example, file 1 is classified as A and file 2 is classified as B. + public static ProjectKind CustomSingleLabelClassification { get; } = new ProjectKind(CustomSingleLabelClassificationValue); + /// For building a classification model to classify text using your own data. Each file can have one or many labels. For example, file 1 is classified as A, B, and C and file 2 is classified as B and C. + public static ProjectKind CustomMultiLabelClassification { get; } = new ProjectKind(CustomMultiLabelClassificationValue); + /// For building an extraction model to identify your domain categories using your own data. + public static ProjectKind CustomEntityRecognition { get; } = new ProjectKind(CustomEntityRecognitionValue); + /// For building an abstractive summarization models which are able to summarize long documents. + public static ProjectKind CustomAbstractiveSummarization { get; } = new ProjectKind(CustomAbstractiveSummarizationValue); + /// For building an text analytics for health model to identify your health domain data. + public static ProjectKind CustomHealthcare { get; } = new ProjectKind(CustomHealthcareValue); + /// For building a sentiment models which are able to extract sentiment for long documents. + public static ProjectKind CustomTextSentiment { get; } = new ProjectKind(CustomTextSentimentValue); + /// Determines if two values are the same. + public static bool operator ==(ProjectKind left, ProjectKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProjectKind left, ProjectKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProjectKind(string value) => new ProjectKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProjectKind other && Equals(other); + /// + public bool Equals(ProjectKind other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs new file mode 100644 index 000000000000..a8445499979d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class ProjectMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastModifiedDateTime"u8); + writer.WriteStringValue(LastModifiedDateTime, "O"); + if (Optional.IsDefined(LastTrainedDateTime)) + { + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime.Value, "O"); + } + if (Optional.IsDefined(LastDeployedDateTime)) + { + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime.Value, "O"); + } + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + } + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + ProjectMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectMetadata(document.RootElement, options); + } + + internal static ProjectMetadata DeserializeProjectMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset createdDateTime = default; + DateTimeOffset lastModifiedDateTime = default; + DateTimeOffset? lastTrainedDateTime = default; + DateTimeOffset? lastDeployedDateTime = default; + ProjectKind projectKind = default; + string storageInputContainerName = default; + ProjectSettings settings = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastModifiedDateTime"u8)) + { + lastModifiedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + 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 ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + 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(ProjectMetadata)} does not support writing '{options.Format}' format."); + } + } + + ProjectMetadata IPersistableModel.Create(BinaryData 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 DeserializeProjectMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectMetadata)} 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 ProjectMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectMetadata(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.Authoring/src/Generated/Models/ProjectMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.cs new file mode 100644 index 000000000000..3f8cb7abb7f0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.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.AI.Language.Text.Authoring.Models +{ + /// Represents the metadata of a project. + public partial class ProjectMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project last modification datetime. + /// The project kind. + /// The storage container name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, ProjectKind projectKind, string storageInputContainerName, string language) + { + Argument.AssertNotNull(storageInputContainerName, nameof(storageInputContainerName)); + Argument.AssertNotNull(language, nameof(language)); + + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project last modification datetime. + /// Represents the project last training datetime. + /// Represents the project last deployment datetime. + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, DateTimeOffset? lastTrainedDateTime, DateTimeOffset? lastDeployedDateTime, ProjectKind projectKind, string storageInputContainerName, ProjectSettings settings, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + Settings = settings; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectMetadata() + { + } + + /// Represents the project creation datetime. + public DateTimeOffset CreatedDateTime { get; } + /// Represents the project last modification datetime. + public DateTimeOffset LastModifiedDateTime { get; } + /// Represents the project last training datetime. + public DateTimeOffset? LastTrainedDateTime { get; } + /// Represents the project last deployment datetime. + public DateTimeOffset? LastDeployedDateTime { get; } + /// The project kind. + public ProjectKind ProjectKind { get; } + /// The storage container name. + public string StorageInputContainerName { get; } + /// The project settings. + public ProjectSettings Settings { get; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; } + /// The project description. + public string Description { get; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs new file mode 100644 index 000000000000..87f03016db1e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.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.AI.Language.Text.Authoring.Models +{ + public partial class ProjectSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConfidenceThreshold)) + { + writer.WritePropertyName("confidenceThreshold"u8); + writer.WriteNumberValue(ConfidenceThreshold.Value); + } + if (Optional.IsDefined(AmlProjectPath)) + { + writer.WritePropertyName("amlProjectPath"u8); + writer.WriteStringValue(AmlProjectPath); + } + if (Optional.IsDefined(IsLabelingLocked)) + { + writer.WritePropertyName("isLabelingLocked"u8); + writer.WriteBooleanValue(IsLabelingLocked.Value); + } + if (Optional.IsDefined(RunGptPredictions)) + { + writer.WritePropertyName("runGptPredictions"u8); + writer.WriteBooleanValue(RunGptPredictions.Value); + } + if (Optional.IsDefined(GptPredictiveLookahead)) + { + writer.WritePropertyName("gptPredictiveLookahead"u8); + writer.WriteNumberValue(GptPredictiveLookahead.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 + } + } + } + + ProjectSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectSettings(document.RootElement, options); + } + + internal static ProjectSettings DeserializeProjectSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float? confidenceThreshold = default; + string amlProjectPath = default; + bool? isLabelingLocked = default; + bool? runGptPredictions = default; + int? gptPredictiveLookahead = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confidenceThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidenceThreshold = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("amlProjectPath"u8)) + { + amlProjectPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLabelingLocked"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLabelingLocked = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("runGptPredictions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runGptPredictions = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("gptPredictiveLookahead"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gptPredictiveLookahead = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectSettings( + confidenceThreshold, + amlProjectPath, + isLabelingLocked, + runGptPredictions, + gptPredictiveLookahead, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{options.Format}' format."); + } + } + + ProjectSettings IPersistableModel.Create(BinaryData 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 DeserializeProjectSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectSettings)} 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 ProjectSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectSettings(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.Authoring/src/Generated/Models/ProjectSettings.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.cs new file mode 100644 index 000000000000..201efeaf3dbd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.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.AI.Language.Text.Authoring.Models +{ + /// Represents the settings used to define the project behavior. + public partial class ProjectSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectSettings() + { + } + + /// Initializes a new instance of . + /// The threshold of the class with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + /// The path to the AML connected project. + /// Indicates whether the labeling experience can be modified or not. + /// Indicates whether to run GPT predictions or not. + /// The predictive lookahead for GPT predictions that is specified by the user. + /// Keeps track of any properties unknown to the library. + internal ProjectSettings(float? confidenceThreshold, string amlProjectPath, bool? isLabelingLocked, bool? runGptPredictions, int? gptPredictiveLookahead, IDictionary serializedAdditionalRawData) + { + ConfidenceThreshold = confidenceThreshold; + AmlProjectPath = amlProjectPath; + IsLabelingLocked = isLabelingLocked; + RunGptPredictions = runGptPredictions; + GptPredictiveLookahead = gptPredictiveLookahead; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The threshold of the class with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + public float? ConfidenceThreshold { get; set; } + /// The path to the AML connected project. + public string AmlProjectPath { get; set; } + /// Indicates whether the labeling experience can be modified or not. + public bool? IsLabelingLocked { get; set; } + /// Indicates whether to run GPT predictions or not. + public bool? RunGptPredictions { get; set; } + /// The predictive lookahead for GPT predictions that is specified by the user. + public int? GptPredictiveLookahead { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs new file mode 100644 index 000000000000..85ce49210c58 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.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.AI.Language.Text.Authoring.Models +{ + public partial class ProjectTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastTrainingDurationInSeconds"u8); + writer.WriteNumberValue(LastTrainingDurationInSeconds); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("hasSnapshot"u8); + writer.WriteBooleanValue(HasSnapshot); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ProjectTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectTrainedModel(document.RootElement, options); + } + + internal static ProjectTrainedModel DeserializeProjectTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string label = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + int lastTrainingDurationInSeconds = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + bool hasSnapshot = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainingDurationInSeconds"u8)) + { + lastTrainingDurationInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("hasSnapshot"u8)) + { + hasSnapshot = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ProjectTrainedModel IPersistableModel.Create(BinaryData 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 DeserializeProjectTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} 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 ProjectTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectTrainedModel(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.Authoring/src/Generated/Models/ProjectTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.cs new file mode 100644 index 000000000000..18f8ba677a75 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.cs @@ -0,0 +1,110 @@ +// 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.Authoring.Models +{ + /// Represents a trained model. + public partial class ProjectTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// or is null. + internal ProjectTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// Keeps track of any properties unknown to the library. + internal ProjectTrainedModel(string label, string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot, IDictionary serializedAdditionalRawData) + { + Label = label; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectTrainedModel() + { + } + + /// The trained model label. + public string Label { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The duration of the model's last training request in seconds. + public int LastTrainingDurationInSeconds { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + /// The flag to indicate if the trained model has a snapshot ready. + public bool HasSnapshot { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs new file mode 100644 index 000000000000..1baccdd06335 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.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.AI.Language.Text.Authoring.Models +{ + public partial class ResourceMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + writer.WritePropertyName("customDomain"u8); + writer.WriteStringValue(CustomDomain); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + ResourceMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceMetadata(document.RootElement, options); + } + + internal static ResourceMetadata DeserializeResourceMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string customDomain = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("customDomain"u8)) + { + customDomain = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceMetadata(azureResourceId, customDomain, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{options.Format}' format."); + } + } + + ResourceMetadata IPersistableModel.Create(BinaryData 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 DeserializeResourceMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} 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 ResourceMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceMetadata(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.Authoring/src/Generated/Models/ResourceMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.cs new file mode 100644 index 000000000000..b7c65fd38a96 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.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.AI.Language.Text.Authoring.Models +{ + /// Represents metadata for the Azure resource.. + public partial class ResourceMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// , or is null. + public ResourceMetadata(string azureResourceId, string customDomain, string region) + { + Argument.AssertNotNull(azureResourceId, nameof(azureResourceId)); + Argument.AssertNotNull(customDomain, nameof(customDomain)); + Argument.AssertNotNull(region, nameof(region)); + + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// Keeps track of any properties unknown to the library. + internal ResourceMetadata(string azureResourceId, string customDomain, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceMetadata() + { + } + + /// Represents the Azure resource ID. + public string AzureResourceId { get; } + /// Represents the Azure resource custom domain. + public string CustomDomain { get; } + /// Represents the Azure resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..76bafc3c7a2d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSentimentEvaluationSummary(document.RootElement, options); + } + + internal static SentimentEvaluationSummary DeserializeSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SentimentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SentimentEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} 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 SentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSentimentEvaluationSummary(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.Authoring/src/Generated/Models/SentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.cs new file mode 100644 index 000000000000..02a73f988602 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a sentiment in a custom sentiment project. + public partial class SentimentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal SentimentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal SentimentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SentimentEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..a51b799bec80 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SingleLabelClassEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SingleLabelClassEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleLabelClassEvaluationSummary(document.RootElement, options); + } + + internal static SingleLabelClassEvaluationSummary DeserializeSingleLabelClassEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SingleLabelClassEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeSingleLabelClassEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} 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 SingleLabelClassEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSingleLabelClassEvaluationSummary(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.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.cs new file mode 100644 index 000000000000..2a2e041f9d7a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a class in a single-label classification project. + public partial class SingleLabelClassEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal SingleLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal SingleLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SingleLabelClassEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..c917409f2951 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class SingleLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("classes"u8); + writer.WriteStartObject(); + foreach (var item in Classes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SingleLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static SingleLabelClassificationEvaluationSummary DeserializeSingleLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary classes = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("classes"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SingleLabelClassEvaluationSummary.DeserializeSingleLabelClassEvaluationSummary(property0.Value, options)); + } + classes = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleLabelClassificationEvaluationSummary( + confusionMatrix, + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SingleLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} 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 SingleLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSingleLabelClassificationEvaluationSummary(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.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..3a735be43129 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.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.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom single-label classification project. + public partial class SingleLabelClassificationEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal SingleLabelClassificationEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(classes, nameof(classes)); + + ConfusionMatrix = confusionMatrix; + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal SingleLabelClassificationEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SingleLabelClassificationEvaluationSummary() + { + } + + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the classes evaluation. + public IReadOnlyDictionary Classes { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..8d1f2520c7be --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class SpanSentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("sentiments"u8); + writer.WriteStartObject(); + foreach (var item in Sentiments) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SpanSentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSpanSentimentEvaluationSummary(document.RootElement, options); + } + + internal static SpanSentimentEvaluationSummary DeserializeSpanSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary sentiments = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("sentiments"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SentimentEvaluationSummary.DeserializeSentimentEvaluationSummary(property0.Value, options)); + } + sentiments = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SpanSentimentEvaluationSummary( + confusionMatrix, + sentiments, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SpanSentimentEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeSpanSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} 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 SpanSentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSpanSentimentEvaluationSummary(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.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.cs new file mode 100644 index 000000000000..7bb8d1d8d726 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.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.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom sentiment project. + public partial class SpanSentimentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + /// Represents the sentiment evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal SpanSentimentEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary sentiments, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(sentiments, nameof(sentiments)); + + ConfusionMatrix = confusionMatrix; + Sentiments = sentiments; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + /// Represents the sentiment evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal SpanSentimentEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary sentiments, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Sentiments = sentiments; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SpanSentimentEvaluationSummary() + { + } + + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the sentiment evaluation. + public IReadOnlyDictionary Sentiments { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/StringIndexType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/StringIndexType.cs new file mode 100644 index 000000000000..fefd32f82ab1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/StringIndexType.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.Text.Authoring.Models +{ + /// The StringIndexType. + 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 Utf16CodeUnitValue = "Utf16CodeUnit"; + + /// The 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.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs new file mode 100644 index 000000000000..692f5394699a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.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.AI.Language.Text.Authoring.Models +{ + public partial class SubTrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (Optional.IsDefined(StartDateTime)) + { + writer.WritePropertyName("startDateTime"u8); + writer.WriteStringValue(StartDateTime.Value, "O"); + } + if (Optional.IsDefined(EndDateTime)) + { + writer.WritePropertyName("endDateTime"u8); + writer.WriteStringValue(EndDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.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 + } + } + } + + SubTrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSubTrainingJobState(document.RootElement, options); + } + + internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int percentComplete = default; + DateTimeOffset? startDateTime = default; + DateTimeOffset? endDateTime = default; + JobStatus status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + SubTrainingJobState IPersistableModel.Create(BinaryData 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 DeserializeSubTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} 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 SubTrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSubTrainingJobState(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.Authoring/src/Generated/Models/SubTrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.cs new file mode 100644 index 000000000000..da27123aa226 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the detailed state of a training sub-operation. + public partial class SubTrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the status of the sub-operation. + internal SubTrainingJobState(int percentComplete, JobStatus status) + { + PercentComplete = percentComplete; + Status = status; + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// Keeps track of any properties unknown to the library. + internal SubTrainingJobState(int percentComplete, DateTimeOffset? startDateTime, DateTimeOffset? endDateTime, JobStatus status, IDictionary serializedAdditionalRawData) + { + PercentComplete = percentComplete; + StartDateTime = startDateTime; + EndDateTime = endDateTime; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SubTrainingJobState() + { + } + + /// Represents progress percentage. + public int PercentComplete { get; } + /// Represents the start date time. + public DateTimeOffset? StartDateTime { get; } + /// Represents the end date time. + public DateTimeOffset? EndDateTime { get; } + /// Represents the status of the sub-operation. + public JobStatus Status { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs new file mode 100644 index 000000000000..4b9ed7f539a1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SupportedLanguage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("languageName"u8); + writer.WriteStringValue(LanguageName); + } + writer.WritePropertyName("languageCode"u8); + writer.WriteStringValue(LanguageCode); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SupportedLanguage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSupportedLanguage(document.RootElement, options); + } + + internal static SupportedLanguage DeserializeSupportedLanguage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string languageName = default; + string languageCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("languageName"u8)) + { + languageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("languageCode"u8)) + { + languageCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{options.Format}' format."); + } + } + + SupportedLanguage IPersistableModel.Create(BinaryData 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 DeserializeSupportedLanguage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} 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 SupportedLanguage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSupportedLanguage(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.Authoring/src/Generated/Models/SupportedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.cs new file mode 100644 index 000000000000..ca301a1aafee --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a supported language. + public partial class SupportedLanguage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// is null. + internal SupportedLanguage(string languageCode) + { + Argument.AssertNotNull(languageCode, nameof(languageCode)); + + LanguageCode = languageCode; + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal SupportedLanguage(string languageName, string languageCode, IDictionary serializedAdditionalRawData) + { + LanguageName = languageName; + LanguageCode = languageCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SupportedLanguage() + { + } + + /// The language name. + public string LanguageName { get; } + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string LanguageCode { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs new file mode 100644 index 000000000000..9f6daa985967 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.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.Text.Authoring.Models +{ + public partial class SwapDeploymentsDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("firstDeploymentName"u8); + writer.WriteStringValue(FirstDeploymentName); + writer.WritePropertyName("secondDeploymentName"u8); + writer.WriteStringValue(SecondDeploymentName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SwapDeploymentsDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + + internal static SwapDeploymentsDetails DeserializeSwapDeploymentsDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstDeploymentName = default; + string secondDeploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstDeploymentName"u8)) + { + firstDeploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondDeploymentName"u8)) + { + secondDeploymentName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsDetails(firstDeploymentName, secondDeploymentName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsDetails IPersistableModel.Create(BinaryData 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 DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} 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 SwapDeploymentsDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsDetails(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.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs new file mode 100644 index 000000000000..7c9948cf6222 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.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.Text.Authoring.Models +{ + /// Represents the options for swapping two deployments together. + public partial class SwapDeploymentsDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// or is null. + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) + { + Argument.AssertNotNull(firstDeploymentName, nameof(firstDeploymentName)); + Argument.AssertNotNull(secondDeploymentName, nameof(secondDeploymentName)); + + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + } + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName, IDictionary serializedAdditionalRawData) + { + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsDetails() + { + } + + /// Represents the first deployment name. + public string FirstDeploymentName { get; } + /// Represents the second deployment name. + public string SecondDeploymentName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs new file mode 100644 index 000000000000..dde6e28f3bc7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class SwapDeploymentsJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + SwapDeploymentsJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + + internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(SwapDeploymentsJobState)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsJobState IPersistableModel.Create(BinaryData 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 DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} 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 SwapDeploymentsJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsJobState(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.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs new file mode 100644 index 000000000000..76a22023a980 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class SwapDeploymentsJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal SwapDeploymentsJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.Serialization.cs new file mode 100644 index 000000000000..639bd57d140b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.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.Text.Authoring.Models +{ + public partial class TextAnalysisAuthoringError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringError)} 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 + } + } + } + + TextAnalysisAuthoringError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTextAnalysisAuthoringError(document.RootElement, options); + } + + internal static TextAnalysisAuthoringError DeserializeTextAnalysisAuthoringError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorCode 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 ErrorCode(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(DeserializeTextAnalysisAuthoringError(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 TextAnalysisAuthoringError( + 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(TextAnalysisAuthoringError)} does not support writing '{options.Format}' format."); + } + } + + TextAnalysisAuthoringError IPersistableModel.Create(BinaryData 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 DeserializeTextAnalysisAuthoringError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TextAnalysisAuthoringError)} 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 TextAnalysisAuthoringError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextAnalysisAuthoringError(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.Authoring/src/Generated/Models/TextAnalysisAuthoringError.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.cs new file mode 100644 index 000000000000..15dff55f6060 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.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.Text.Authoring.Models +{ + /// The error object. + public partial class TextAnalysisAuthoringError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 TextAnalysisAuthoringError(ErrorCode 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 TextAnalysisAuthoringError(ErrorCode 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 TextAnalysisAuthoringError() + { + } + + /// One of a server-defined set of error codes. + public ErrorCode 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.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringSentiment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringSentiment.cs new file mode 100644 index 000000000000..07d7c9165af7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringSentiment.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.Authoring.Models +{ + /// The TextAnalysisAuthoringSentiment. + public readonly partial struct TextAnalysisAuthoringSentiment : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TextAnalysisAuthoringSentiment(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PositiveValue = "positive"; + private const string NegativeValue = "negative"; + private const string NeutralValue = "neutral"; + + /// positive. + public static TextAnalysisAuthoringSentiment Positive { get; } = new TextAnalysisAuthoringSentiment(PositiveValue); + /// negative. + public static TextAnalysisAuthoringSentiment Negative { get; } = new TextAnalysisAuthoringSentiment(NegativeValue); + /// neutral. + public static TextAnalysisAuthoringSentiment Neutral { get; } = new TextAnalysisAuthoringSentiment(NeutralValue); + /// Determines if two values are the same. + public static bool operator ==(TextAnalysisAuthoringSentiment left, TextAnalysisAuthoringSentiment right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TextAnalysisAuthoringSentiment left, TextAnalysisAuthoringSentiment right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TextAnalysisAuthoringSentiment(string value) => new TextAnalysisAuthoringSentiment(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TextAnalysisAuthoringSentiment other && Equals(other); + /// + public bool Equals(TextAnalysisAuthoringSentiment other) => string.Equals(_value, other._value, StringComparison.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.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.Serialization.cs new file mode 100644 index 000000000000..80e627120fa3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.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.Text.Authoring.Models +{ + public partial class TextAnalysisAuthoringWarning : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TextAnalysisAuthoringWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTextAnalysisAuthoringWarning(document.RootElement, options); + } + + internal static TextAnalysisAuthoringWarning DeserializeTextAnalysisAuthoringWarning(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TextAnalysisAuthoringWarning(code, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} does not support writing '{options.Format}' format."); + } + } + + TextAnalysisAuthoringWarning IPersistableModel.Create(BinaryData 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 DeserializeTextAnalysisAuthoringWarning(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} 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 TextAnalysisAuthoringWarning FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextAnalysisAuthoringWarning(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.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.cs new file mode 100644 index 000000000000..cfea09f1cf4d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.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.Text.Authoring.Models +{ + /// Represents a warning that was encountered while executing the request. + public partial class TextAnalysisAuthoringWarning + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 warning code. + /// The warning message. + /// or is null. + internal TextAnalysisAuthoringWarning(string code, string message) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// Keeps track of any properties unknown to the library. + internal TextAnalysisAuthoringWarning(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TextAnalysisAuthoringWarning() + { + } + + /// The warning code. + public string Code { get; } + /// The warning message. + public string Message { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..912d38014e63 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TextSentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("spanSentimentsEvaluation"u8); + writer.WriteObjectValue(SpanSentimentsEvaluation, options); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + TextSentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTextSentimentEvaluationSummary(document.RootElement, options); + } + + internal static TextSentimentEvaluationSummary DeserializeTextSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SpanSentimentEvaluationSummary spanSentimentsEvaluation = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("spanSentimentsEvaluation"u8)) + { + spanSentimentsEvaluation = SpanSentimentEvaluationSummary.DeserializeSpanSentimentEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TextSentimentEvaluationSummary( + spanSentimentsEvaluation, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + TextSentimentEvaluationSummary IPersistableModel.Create(BinaryData 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 DeserializeTextSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} 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 TextSentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextSentimentEvaluationSummary(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.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.cs new file mode 100644 index 000000000000..b26aef8f4bcb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom text sentiment project. + public partial class TextSentimentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents evaluation of span level sentiments. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// is null. + internal TextSentimentEvaluationSummary(SpanSentimentEvaluationSummary spanSentimentsEvaluation, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(spanSentimentsEvaluation, nameof(spanSentimentsEvaluation)); + + SpanSentimentsEvaluation = spanSentimentsEvaluation; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents evaluation of span level sentiments. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal TextSentimentEvaluationSummary(SpanSentimentEvaluationSummary spanSentimentsEvaluation, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + SpanSentimentsEvaluation = spanSentimentsEvaluation; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TextSentimentEvaluationSummary() + { + } + + /// Represents evaluation of span level sentiments. + public SpanSentimentEvaluationSummary SpanSentimentsEvaluation { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs new file mode 100644 index 000000000000..cc67acb26600 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TrainingConfigVersion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersionProperty); + } + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + TrainingConfigVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingConfigVersion(document.RootElement, options); + } + + internal static TrainingConfigVersion DeserializeTrainingConfigVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainingConfigVersion = default; + DateTimeOffset modelExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingConfigVersion(trainingConfigVersion, modelExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{options.Format}' format."); + } + } + + TrainingConfigVersion IPersistableModel.Create(BinaryData 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 DeserializeTrainingConfigVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} 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 TrainingConfigVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingConfigVersion(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.Authoring/src/Generated/Models/TrainingConfigVersion.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.cs new file mode 100644 index 000000000000..439f9952112a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a training config version. + public partial class TrainingConfigVersion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the training config version expiration date. + internal TrainingConfigVersion(DateTimeOffset modelExpirationDate) + { + ModelExpirationDate = modelExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// Keeps track of any properties unknown to the library. + internal TrainingConfigVersion(string trainingConfigVersionProperty, DateTimeOffset modelExpirationDate, IDictionary serializedAdditionalRawData) + { + TrainingConfigVersionProperty = trainingConfigVersionProperty; + ModelExpirationDate = modelExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingConfigVersion() + { + } + + /// Represents the version of the config. + public string TrainingConfigVersionProperty { get; } + /// Represents the training config version expiration date. + public DateTimeOffset ModelExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs new file mode 100644 index 000000000000..4b9afd2b96e2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.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.AI.Language.Text.Authoring.Models +{ + public partial class TrainingJobDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + if (Optional.IsDefined(EvaluationOptions)) + { + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + } + if (Optional.IsDefined(DataGenerationSettings)) + { + writer.WritePropertyName("dataGenerationSettings"u8); + writer.WriteObjectValue(DataGenerationSettings, 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 + } + } + } + + TrainingJobDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobDetails(document.RootElement, options); + } + + internal static TrainingJobDetails DeserializeTrainingJobDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + EvaluationDetails evaluationOptions = default; + DataGenerationSettings dataGenerationSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (property.NameEquals("dataGenerationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataGenerationSettings = DataGenerationSettings.DeserializeDataGenerationSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobDetails(modelLabel, trainingConfigVersion, evaluationOptions, dataGenerationSettings, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobDetails IPersistableModel.Create(BinaryData 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 DeserializeTrainingJobDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} 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 TrainingJobDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobDetails(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.Authoring/src/Generated/Models/TrainingJobDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.cs new file mode 100644 index 000000000000..2f80cac3f016 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.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.Text.Authoring.Models +{ + /// Represents the options for starting a new training job. + public partial class TrainingJobDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. + /// or is null. + public TrainingJobDetails(string modelLabel, string trainingConfigVersion) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// Represents the settings for using data generation as part of training a custom model. + /// Keeps track of any properties unknown to the library. + internal TrainingJobDetails(string modelLabel, string trainingConfigVersion, EvaluationDetails evaluationOptions, DataGenerationSettings dataGenerationSettings, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + EvaluationOptions = evaluationOptions; + DataGenerationSettings = dataGenerationSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobDetails() + { + } + + /// Represents the output model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + public EvaluationDetails EvaluationOptions { get; set; } + /// Represents the settings for using data generation as part of training a custom model. + public DataGenerationSettings DataGenerationSettings { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs new file mode 100644 index 000000000000..d349f1b2beb4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.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.Text.Authoring.Models +{ + public partial class TrainingJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + writer.WritePropertyName("trainingStatus"u8); + writer.WriteObjectValue(TrainingStatus, options); + if (Optional.IsDefined(EvaluationStatus)) + { + writer.WritePropertyName("evaluationStatus"u8); + writer.WriteObjectValue(EvaluationStatus, options); + } + if (Optional.IsDefined(EstimatedEndDateTime)) + { + writer.WritePropertyName("estimatedEndDateTime"u8); + writer.WriteStringValue(EstimatedEndDateTime.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobResult(document.RootElement, options); + } + + internal static TrainingJobResult DeserializeTrainingJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + SubTrainingJobState trainingStatus = default; + SubTrainingJobState evaluationStatus = default; + DateTimeOffset? estimatedEndDateTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingStatus"u8)) + { + trainingStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("evaluationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("estimatedEndDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedEndDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobResult IPersistableModel.Create(BinaryData 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 DeserializeTrainingJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} 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 TrainingJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobResult(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.Authoring/src/Generated/Models/TrainingJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.cs new file mode 100644 index 000000000000..189d1d1c5a27 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the output of a training job. + public partial class TrainingJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents model train status. + /// , or is null. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingJobState trainingStatus) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + Argument.AssertNotNull(trainingStatus, nameof(trainingStatus)); + + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingStatus = trainingStatus; + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents model train status. + /// Represents model evaluation status. + /// Represents the estimate end date time for training and evaluation. + /// Keeps track of any properties unknown to the library. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingJobState trainingStatus, SubTrainingJobState evaluationStatus, DateTimeOffset? estimatedEndDateTime, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingStatus = trainingStatus; + EvaluationStatus = evaluationStatus; + EstimatedEndDateTime = estimatedEndDateTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobResult() + { + } + + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents model train status. + public SubTrainingJobState TrainingStatus { get; } + /// Represents model evaluation status. + public SubTrainingJobState EvaluationStatus { get; } + /// Represents the estimate end date time for training and evaluation. + public DateTimeOffset? EstimatedEndDateTime { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs new file mode 100644 index 000000000000..4955c000e750 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, 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 + } + } + } + + TrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobState(document.RootElement, options); + } + + internal static TrainingJobState DeserializeTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + TrainingJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = TrainingJobResult.DeserializeTrainingJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobState IPersistableModel.Create(BinaryData 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 DeserializeTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobState)} 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 TrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobState(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.Authoring/src/Generated/Models/TrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.cs new file mode 100644 index 000000000000..70273a6d0a8b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a training job. + public partial class TrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents training tasks detailed result. + /// is null. + internal TrainingJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, TrainingJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// Keeps track of any properties unknown to the library. + internal TrainingJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, TrainingJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents training tasks detailed result. + public TrainingJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs new file mode 100644 index 000000000000..7af5951389dc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class UnassignDeploymentResourcesDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + 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 + } + } + } + + UnassignDeploymentResourcesDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); + } + + internal static UnassignDeploymentResourcesDetails DeserializeUnassignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedResourceIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnassignDeploymentResourcesDetails(assignedResourceIds, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); + } + } + + UnassignDeploymentResourcesDetails IPersistableModel.Create(BinaryData 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 DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} 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 UnassignDeploymentResourcesDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnassignDeploymentResourcesDetails(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.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..d124017054e1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options to unassign Azure resources from a project. + public partial class UnassignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// is null. + public UnassignDeploymentResourcesDetails(IEnumerable assignedResourceIds) + { + Argument.AssertNotNull(assignedResourceIds, nameof(assignedResourceIds)); + + AssignedResourceIds = assignedResourceIds.ToList(); + } + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// Keeps track of any properties unknown to the library. + internal UnassignDeploymentResourcesDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UnassignDeploymentResourcesDetails() + { + } + + /// Represents the assigned resource IDs to be unassigned. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..ec140802f56a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + public partial class UnassignDeploymentResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + 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 + } + } + } + + UnassignDeploymentResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnassignDeploymentResourcesJobState(document.RootElement, options); + } + + internal static UnassignDeploymentResourcesJobState DeserializeUnassignDeploymentResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = 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("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnassignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? 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(UnassignDeploymentResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + UnassignDeploymentResourcesJobState IPersistableModel.Create(BinaryData 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 DeserializeUnassignDeploymentResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesJobState)} 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 UnassignDeploymentResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnassignDeploymentResourcesJobState(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.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.cs new file mode 100644 index 000000000000..b37cfe90d944 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.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.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a unassign deployment resources job. + public partial class UnassignDeploymentResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal UnassignDeploymentResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal UnassignDeploymentResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UnassignDeploymentResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..4d412ce70bd5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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.Authoring.Models +{ + internal partial class UnknownDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(DocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEvaluationResult(document.RootElement, options); + } + + internal static UnknownDocumentEvaluationResult DeserializeUnknownDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = "Unknown"; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + 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 UnknownDocumentEvaluationResult(projectKind, location, 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(DocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEvaluationResult IPersistableModel.Create(BinaryData 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 DeserializeDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} 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 UnknownDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownDocumentEvaluationResult(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.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.cs new file mode 100644 index 000000000000..8b2d8e34dd8e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.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.AI.Language.Text.Authoring.Models +{ + /// Unknown version of DocumentEvaluationResult. + internal partial class UnknownDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal UnknownDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData) : base(projectKind, location, language, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownDocumentEvaluationResult() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.Serialization.cs similarity index 61% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.Serialization.cs index cdc53f548a18..d8bec44da2be 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Text.Authoring.Models { - public partial class PrebuiltComponent : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownEvaluationSummary : 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(EvaluationSummary)} 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) + EvaluationSummary 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(EvaluationSummary)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePrebuiltComponent(document.RootElement, options); + return DeserializeEvaluationSummary(document.RootElement, options); } - internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownEvaluationSummary DeserializeUnknownEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +57,20 @@ internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement eleme { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + ProjectKind projectKind = "Unknown"; + EvaluationDetails evaluationOptions = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (property.NameEquals("projectKind"u8)) { - value = property.Value.GetString(); + projectKind = new ProjectKind(property.Value.GetString()); continue; } - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("evaluationOptions"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); continue; } if (options.Format != "W") @@ -84,53 +79,53 @@ internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new PrebuiltComponent(entityComponentKind, serializedAdditionalRawData, value); + return new UnknownEvaluationSummary(projectKind, evaluationOptions, 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(EvaluationSummary)} does not support writing '{options.Format}' format."); } } - PrebuiltComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EvaluationSummary 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 DeserializeEvaluationSummary(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EvaluationSummary)} 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 UnknownEvaluationSummary FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializePrebuiltComponent(document.RootElement); + return DeserializeUnknownEvaluationSummary(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.Authoring/src/Generated/Models/UnknownEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.cs new file mode 100644 index 000000000000..11bd4629143a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.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.Authoring.Models +{ + /// Unknown version of EvaluationSummary. + internal partial class UnknownEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + internal UnknownEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownEvaluationSummary() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..90a43b0d5610 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.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.Authoring.Models +{ + internal partial class UnknownExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static UnknownExportedProjectAssets DeserializeUnknownExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownExportedProjectAssets(projectKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData 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 DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} 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 UnknownExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownExportedProjectAssets(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.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs new file mode 100644 index 000000000000..590bfa73caf5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.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.Authoring.Models +{ + /// Unknown version of ExportedProjectAssets. + internal partial class UnknownExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) : base(projectKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownExportedProjectAssets() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/TextAnalysisAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/TextAnalysisAuthoring.cs new file mode 100644 index 000000000000..9a10c2fd530f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/TextAnalysisAuthoring.cs @@ -0,0 +1,6705 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.AI.Language.Text.Authoring.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Language.Text.Authoring +{ + // Data plane generated sub-client. + /// The TextAnalysisAuthoring sub-client. + public partial class TextAnalysisAuthoring + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of TextAnalysisAuthoring for mocking. + protected TextAnalysisAuthoring() + { + } + + /// Initializes a new instance of TextAnalysisAuthoring. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The key credential to copy. + /// The token credential to copy. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// The API version to use for this operation. + internal TextAnalysisAuthoring(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _keyCredential = keyCredential; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectAsync(projectName, context).ConfigureAwait(false); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProject(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProject(projectName, context); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project name. + /// 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 GetProjectAsync(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project name. + /// 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 GetProject(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] The most basic operation that applies to a resource. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateProjectAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] The most basic operation that applies to a resource. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateProject(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CopyProjectAuthorizationAsync(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CopyProjectAuthorizationAsync(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CopyProjectAuthorization(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CopyProjectAuthorization(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure resource. + /// + /// + /// + /// 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 new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CopyProjectAuthorizationAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure resource. + /// + /// + /// + /// 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 new project name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CopyProjectAuthorization(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetCopyProjectStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCopyProjectStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetCopyProjectStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCopyProjectStatus(projectName, jobId, context); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetCopyProjectStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetCopyProjectStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentAsync(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentAsync(projectName, deploymentName, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeployment(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeployment(projectName, deploymentName, context); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// 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 GetDeploymentAsync(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// 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 GetDeployment(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentDeleteFromResourcesStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentDeleteFromResourcesStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// 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 GetDeploymentStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSwapDeploymentsStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetSwapDeploymentsStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSwapDeploymentsStatus(projectName, jobId, context); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetSwapDeploymentsStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetSwapDeploymentsStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportStatus(projectName, jobId, context); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetExportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetExportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelAsync(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelAsync(projectName, exportedModelName, context).ConfigureAwait(false); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModel(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModel(projectName, exportedModelName, context); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// 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 GetExportedModelAsync(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// 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 GetExportedModel(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelJobStatusAsync(projectName, exportedModelName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModelJobStatus(projectName, exportedModelName, jobId, context); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// The job ID. + /// 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 GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported model. + /// + /// + /// + /// 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 new project name. + /// The exported model name. + /// The job ID. + /// 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 GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details and URL needed to download the exported model. + /// The name of the project to use. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelManifestAsync(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelManifestAsync(projectName, exportedModelName, context).ConfigureAwait(false); + return Response.FromValue(ExportedModelManifest.FromResponse(response), response); + } + + /// Gets the details and URL needed to download the exported model. + /// The name of the project to use. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModelManifest(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModelManifest(projectName, exportedModelName, context); + return Response.FromValue(ExportedModelManifest.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details and URL needed to download the exported model. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// 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 GetExportedModelManifestAsync(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelManifest"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelManifestRequest(projectName, exportedModelName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details and URL needed to download the exported model. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// 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 GetExportedModelManifest(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelManifest"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelManifestRequest(projectName, exportedModelName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetImportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetImportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetImportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetImportStatus(projectName, jobId, context); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetImportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetImportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainedModelAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainedModel(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainedModel(projectName, trainedModelLabel, context); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a trained model. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// 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 GetTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a trained model. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// 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 GetTrainedModel(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + 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] Deletes an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// 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 DeleteTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, 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] Deletes an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// 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 DeleteTrainedModel(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEvaluationStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEvaluationStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetModelEvaluationSummaryAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetModelEvaluationSummary(projectName, trainedModelLabel, context); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 GetModelEvaluationSummary(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLoadSnapshotStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLoadSnapshotStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// 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 GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAssignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(AssignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAssignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(AssignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetAssignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing unassign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetUnassignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(UnassignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing unassign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetUnassignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(UnassignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetUnassignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainingStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainingStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingStatus(projectName, jobId, context); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetTrainingStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// 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 GetTrainingStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectDeletionStatusAsync(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectDeletionStatusAsync(jobId, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProjectDeletionStatus(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProjectDeletionStatus(jobId, context); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatusAsync(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatus(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetProjectsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetProjects(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeployments(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetExportedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DocumentEvaluationResult.DeserializeDocumentEvaluationResult(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DocumentEvaluationResult.DeserializeDocumentEvaluationResult(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeploymentResources(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainingJobs(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetAssignedResourceDeployments(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetAssignedResourceDeployments(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// Lists the supported languages. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetSupportedLanguagesAsync(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SupportedLanguage.DeserializeSupportedLanguage(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// Lists the supported languages. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetSupportedLanguages(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SupportedLanguage.DeserializeSupportedLanguage(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported languages. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetSupportedLanguagesAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported languages. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetSupportedLanguages(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetSupportedPrebuiltEntitiesAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => PrebuiltEntity.DeserializePrebuiltEntity(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The cancellation token to use. + /// + public virtual Pageable GetSupportedPrebuiltEntities(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => PrebuiltEntity.DeserializePrebuiltEntity(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetSupportedPrebuiltEntitiesAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetSupportedPrebuiltEntities(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// Lists the support training config version for a given project type. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetTrainingConfigVersionsAsync(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingConfigVersion.DeserializeTrainingConfigVersion(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + /// Lists the support training config version for a given project type. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetTrainingConfigVersions(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingConfigVersion.DeserializeTrainingConfigVersion(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTrainingConfigVersionsAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTrainingConfigVersions(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task DeleteProjectAsync(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteProject", 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] Deletes a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation DeleteProject(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Copies an existing project to another Azure resource. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task CopyProjectAsync(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CopyProjectAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Copies an existing project to another Azure resource. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation CopyProject(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CopyProject(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Copies an existing project to another Azure resource. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task CopyProjectAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Copies an existing project to another Azure resource. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation CopyProject(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to export a project's data. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ExportAsync(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return await ExportAsync(waitUntil, projectName, stringIndexType.ToString(), assetKind, trainedModelLabel, context).ConfigureAwait(false); + } + + /// Triggers a job to export a project's data. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Export(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return Export(waitUntil, projectName, stringIndexType.ToString(), assetKind, trainedModelLabel, context); + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task ExportAsync(WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, assetKind, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Export(WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, assetKind, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The project data to import. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ImportAsync(WaitUntil waitUntil, string projectName, ExportedProject body, string format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await ImportAsync(waitUntil, projectName, content, format, context).ConfigureAwait(false); + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The project data to import. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Import(WaitUntil waitUntil, string projectName, ExportedProject body, string format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return Import(waitUntil, projectName, content, format, context); + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task ImportAsync(WaitUntil waitUntil, string projectName, RequestContent content, string format = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, format, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Import(WaitUntil waitUntil, string projectName, RequestContent content, string format = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, format, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a training job for a project. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> TrainAsync(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await TrainAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.Train"); + } + + /// Triggers a training job for a project. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Train(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = Train(waitUntil, projectName, content, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.Train"); + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> TrainAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Train(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new deployment or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeployProjectAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Creates a new deployment or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeployProject(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeployProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeployProject", 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] Deletes a project deployment. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task DeleteDeploymentAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeployment", 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] Deletes a project deployment. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation DeleteDeployment(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeployment", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a project deployment from the specified assigned resources. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeleteDeploymentFromResourcesAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Deletes a project deployment from the specified assigned resources. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeleteDeploymentFromResources(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Swaps two existing deployments with each other. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await SwapDeploymentsAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Swaps two existing deployments with each other. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation SwapDeployments(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return SwapDeployments(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation SwapDeployments(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new exported model or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CreateOrUpdateExportedModelAsync(waitUntil, projectName, exportedModelName, content, context).ConfigureAwait(false); + } + + /// Creates a new exported model or replaces an existing one. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CreateOrUpdateExportedModel(waitUntil, projectName, exportedModelName, content, context); + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CreateOrUpdateExportedModel", 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] Deletes an existing exported model. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task DeleteExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteExportedModel", 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] Deletes an existing exported model. + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation DeleteExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers evaluation operation on a trained model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await EvaluateModelAsync(waitUntil, projectName, trainedModelLabel, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel"); + } + + /// Triggers evaluation operation on a trained model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = EvaluateModel(waitUntil, projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel"); + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained model. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained model. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel", 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] Long-running operation. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task LoadSnapshotAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.LoadSnapshot", 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] Long-running operation. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation LoadSnapshot(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.LoadSnapshot", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await AssignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation AssignDeploymentResources(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return AssignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation AssignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await UnassignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation UnassignDeploymentResources(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return UnassignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation UnassignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a cancellation for a running training job. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await CancelTrainingJobAsync(waitUntil, projectName, jobId, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob"); + } + + /// Triggers a cancellation for a running training job. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = CancelTrainingJob(waitUntil, projectName, jobId, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob"); + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// 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 representing an asynchronous operation on the service. + /// + public virtual async Task> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// 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 representing an asynchronous operation on the service. + /// + public virtual Operation CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetProjectsRequest(int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectRequest(string projectName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateProjectRequest(string projectName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteProjectRequest(string projectName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCopyProjectAuthorizationRequest(string projectName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:authorize-copy", 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 CreateCopyProjectRequest(string projectName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:copy", 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 CreateExportRequest(string projectName, string stringIndexType, string assetKind, string trainedModelLabel, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:export", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (assetKind != null) + { + uri.AppendQuery("assetKind", assetKind, true); + } + if (trainedModelLabel != null) + { + uri.AppendQuery("trainedModelLabel", trainedModelLabel, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateImportRequest(string projectName, RequestContent content, string format, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:import", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (format != null) + { + request.Headers.Add("format", format); + } + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateTrainRequest(string projectName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:train", 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 CreateGetCopyProjectStatusRequest(string projectName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/copy/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentRequest(string projectName, string deploymentName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeployProjectRequest(string projectName, string deploymentName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + 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 CreateDeleteDeploymentRequest(string projectName, string deploymentName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteDeploymentFromResourcesRequest(string projectName, string deploymentName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/:delete-from-resources", 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 CreateGetDeploymentDeleteFromResourcesStatusRequest(string projectName, string deploymentName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/delete-from-resources/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentStatusRequest(string projectName, string deploymentName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateSwapDeploymentsRequest(string projectName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/:swap", 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 CreateGetSwapDeploymentsStatusRequest(string projectName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/swap/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportStatusRequest(string projectName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/export/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelRequest(string projectName, string exportedModelName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrUpdateExportedModelRequest(string projectName, string exportedModelName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + 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 CreateDeleteExportedModelRequest(string projectName, string exportedModelName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelJobStatusRequest(string projectName, string exportedModelName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelManifestRequest(string projectName, string exportedModelName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendPath("/manifest", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetImportStatusRequest(string projectName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/import/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteTrainedModelRequest(string projectName, string trainedModelLabel, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateEvaluateModelRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:evaluate", 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 CreateLoadSnapshotRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:load-snapshot", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEvaluationStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluate/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsRequest(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/result", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationSummaryRequest(string projectName, string trainedModelLabel, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/summary-result", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetLoadSnapshotStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/load-snapshot/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAssignDeploymentResourcesRequest(string projectName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:assign", 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 CreateUnassignDeploymentResourcesRequest(string projectName, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:unassign", 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 CreateGetAssignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/assign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetUnassignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/unassign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingStatusRequest(string projectName, string jobId, 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCancelTrainingJobRequest(string projectName, string 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("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/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; + } + + internal HttpMessage CreateGetProjectDeletionStatusRequest(string jobId, 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("/authoring/analyze-text/projects/global/deletion-jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAssignedResourceDeploymentsRequest(int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/global/deployments/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedLanguagesRequest(string projectKind, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/global/languages", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (projectKind != null) + { + uri.AppendQuery("projectKind", projectKind, true); + } + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedPrebuiltEntitiesRequest(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("/authoring/analyze-text/projects/global/prebuilt-entities", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingConfigVersionsRequest(string projectKind, int? maxCount, int? skip, int? maxpagesize, 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("/authoring/analyze-text/projects/global/training-config-versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (projectKind != null) + { + uri.AppendQuery("projectKind", projectKind, true); + } + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsNextPageRequest(string nextLink, string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAssignedResourceDeploymentsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedLanguagesNextPageRequest(string nextLink, string projectKind, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedPrebuiltEntitiesNextPageRequest(string nextLink, 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.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingConfigVersionsNextPageRequest(string nextLink, string projectKind, int? maxCount, int? skip, int? maxpagesize, 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.AppendRawNextLink(nextLink, false); + 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 _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + + private TrainingJobResult FetchTrainingJobResultFromTrainingJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return TrainingJobResult.DeserializeTrainingJobResult(resultJsonElement); + } + + private EvaluationJobResult FetchEvaluationJobResultFromEvaluationJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return EvaluationJobResult.DeserializeEvaluationJobResult(resultJsonElement); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Properties/AssemblyInfo.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..5a3f23c6c4fd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.Text.Authoring.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.Text.Authoring/tests/Azure.AI.Language.Text.Authoring.Tests.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Azure.AI.Language.Text.Authoring.Tests.csproj new file mode 100644 index 000000000000..35ad37e67673 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Azure.AI.Language.Text.Authoring.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Generated/Samples/Samples_TextAnalysisAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Generated/Samples/Samples_TextAnalysisAuthoring.cs new file mode 100644 index 000000000000..8dec7c7ae587 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Generated/Samples/Samples_TextAnalysisAuthoring.cs @@ -0,0 +1,6356 @@ +// 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.AI.Language.Text.Authoring.Models; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Language.Text.Authoring.Samples +{ + public partial class Samples_TextAnalysisAuthoring + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_CreateProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_CreateProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_CreateProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_CreateProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetAssignedResourceDeployments(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetAssignedResourceDeployments(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedLanguages(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedLanguagesAsync(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (SupportedLanguage item in client.GetSupportedLanguages()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedLanguages("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedLanguagesAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (SupportedLanguage item in client.GetSupportedLanguages(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingConfigVersions(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingConfigVersions("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); + Operation operation = client.Import(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { +new +{ +summaryLocation = "", +location = "", +language = "", +dataset = "", +} + }, + projectKind = "CustomAbstractiveSummarization", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { +new +{ +summaryLocation = "", +location = "", +language = "", +dataset = "", +} + }, + projectKind = "CustomAbstractiveSummarization", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") + { + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", + }) + { + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") +{ +Location = "", +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = client.Import(WaitUntil.Completed, "", body, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") + { + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", + }) + { + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") +{ +Location = "", +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", ""); + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", ""); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", "") + { + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), + }; + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", "") + { + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), + }; + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_LoadSnapshot_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_LoadSnapshot_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_LoadSnapshot_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_LoadSnapshot_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml new file mode 100644 index 000000000000..641e71d12553 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cognitiveservices/Language.AnalyzeText-authoring +commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c +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/BaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.cs new file mode 100644 index 000000000000..658e1f9e4705 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/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.Text +{ + /// + /// 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.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/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/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.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..2dc110d8a1d7 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: 92214b1faaad098434ae37b69fcc896fdf8ecc8c +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 cc8c7e98498b..134ec8e411fd 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: 0410d404c68289cb1737d06bba92133bb84b515c +commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c 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..b7b27484ef1a --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json @@ -0,0 +1,34659 @@ +{ + "$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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "decorators": [] + }, + { + "$id": "326", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "328", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "description": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "330", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "description": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "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": "334", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "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": "338", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Versions", + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "340", + "kind": "enumvalue", + "name": "v2024_11_01", + "value": "2024-11-01", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "338" + }, + "description": "Public Api version", + "decorators": [] + } + ], + "description": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "342", + "kind": "model", + "name": "ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet", + "usage": "Input,Output,Json", + "description": "An Compute Fleet resource", + "decorators": [], + "baseModel": { + "$id": "343", + "kind": "model", + "name": "TrackedResource", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$id": "344", + "kind": "model", + "name": "Resource", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "345", + "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": "346", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "347", + "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": "348", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the resource", + "type": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name" + }, + { + "$id": "350", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type" + }, + { + "$id": "352", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "353", + "kind": "model", + "name": "SystemData", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json", + "description": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "354", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The identity that created the resource.", + "type": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy" + }, + { + "$id": "356", + "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": "357", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "description": "The timestamp of resource creation (UTC).", + "type": { + "$id": "358", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "359", + "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": "360", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The identity that last modified the resource.", + "type": { + "$id": "361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy" + }, + { + "$id": "362", + "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": "363", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "description": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "364", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "365", + "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": "366", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "Resource tags.", + "type": { + "$id": "367", + "kind": "dict", + "keyType": { + "$id": "368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "369", + "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": "370", + "kind": "property", + "name": "location", + "serializedName": "location", + "description": "The geo-location where the resource lives", + "type": { + "$id": "371", + "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": "372", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "The resource-specific properties for this resource.", + "type": { + "$id": "373", + "kind": "model", + "name": "ComputeFleetProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties", + "usage": "Input,Output,Json", + "description": "Details of the Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "374", + "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": "375", + "kind": "property", + "name": "spotPriorityProfile", + "serializedName": "spotPriorityProfile", + "description": "Configuration Options for Spot instances in Compute Fleet.", + "type": { + "$id": "376", + "kind": "model", + "name": "SpotPriorityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile", + "usage": "Input,Output,Json", + "description": "Configuration Options for Spot instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "377", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "description": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "378", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.capacity" + }, + { + "$id": "379", + "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": "380", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.minCapacity" + }, + { + "$id": "381", + "kind": "property", + "name": "maxPricePerVM", + "serializedName": "maxPricePerVM", + "description": "Price per hour of each Spot VM will never exceed this.", + "type": { + "$id": "382", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.maxPricePerVM" + }, + { + "$id": "383", + "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": "384", + "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": "385", + "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": "386", + "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": "387", + "kind": "property", + "name": "regularPriorityProfile", + "serializedName": "regularPriorityProfile", + "description": "Configuration Options for Regular instances in Compute Fleet.", + "type": { + "$id": "388", + "kind": "model", + "name": "RegularPriorityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile", + "usage": "Input,Output,Json", + "description": "Configuration Options for Regular instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "389", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "description": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "390", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.capacity" + }, + { + "$id": "391", + "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": "392", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.minCapacity" + }, + { + "$id": "393", + "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": "394", + "kind": "property", + "name": "vmSizesProfile", + "serializedName": "vmSizesProfile", + "description": "List of VM sizes supported for Compute Fleet", + "type": { + "$id": "395", + "kind": "array", + "name": "ArrayVmSizeProfile", + "valueType": { + "$id": "396", + "kind": "model", + "name": "ComputeFleetVmSizeProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile", + "usage": "Input,Output,Json", + "description": "Specifications about a VM Size. This will also contain the corresponding rank and weight in future.", + "decorators": [], + "properties": [ + { + "$id": "397", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The Sku name (e.g. 'Standard_DS1_v2')", + "type": { + "$id": "398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile.name" + }, + { + "$id": "399", + "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": "400", + "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": "401", + "kind": "property", + "name": "vmAttributes", + "serializedName": "vmAttributes", + "description": "Attribute based Fleet.", + "type": { + "$id": "402", + "kind": "model", + "name": "ComputeFleetVMAttributes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes", + "usage": "Input,Output,Json", + "description": "VMAttributes that will be used to filter VMSizes which will be used to build Fleet.", + "decorators": [], + "properties": [ + { + "$id": "403", + "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": "404", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxInteger", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger", + "usage": "Input,Output,Json", + "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": "405", + "kind": "property", + "name": "min", + "serializedName": "min", + "description": "Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.", + "type": { + "$id": "406", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger.min" + }, + { + "$id": "407", + "kind": "property", + "name": "max", + "serializedName": "max", + "description": "Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.", + "type": { + "$id": "408", + "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": "409", + "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": "410", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxDouble", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble", + "usage": "Input,Output,Json", + "description": "VMAttributes using double values.", + "decorators": [], + "properties": [ + { + "$id": "411", + "kind": "property", + "name": "min", + "serializedName": "min", + "description": "Minimum value. default 0. Double.MinValue()", + "type": { + "$id": "412", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble.min" + }, + { + "$id": "413", + "kind": "property", + "name": "max", + "serializedName": "max", + "description": "Maximum value. Double.MaxValue(1.7976931348623157E+308)", + "type": { + "$id": "414", + "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": "415", + "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": "410" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.memoryInGiBPerVCpu" + }, + { + "$id": "416", + "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": "417", + "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": "410" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageInGiB" + }, + { + "$id": "418", + "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": "419", + "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": "420", + "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": "404" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.dataDiskCount" + }, + { + "$id": "421", + "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": "404" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkInterfaceCount" + }, + { + "$id": "422", + "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": "410" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkBandwidthInMbps" + }, + { + "$id": "423", + "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": "424", + "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": "404" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.rdmaNetworkInterfaceCount" + }, + { + "$id": "425", + "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": "426", + "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": "427", + "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": "428", + "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": "429", + "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": "430", + "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": "404" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorCount" + }, + { + "$id": "431", + "kind": "property", + "name": "vmCategories", + "serializedName": "vmCategories", + "description": "The VM category specified as a list. Optional parameter.", + "type": { + "$id": "432", + "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": "433", + "kind": "property", + "name": "architectureTypes", + "serializedName": "architectureTypes", + "description": "The VM architecture types specified as a list. Optional parameter.", + "type": { + "$id": "434", + "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": "435", + "kind": "property", + "name": "cpuManufacturers", + "serializedName": "cpuManufacturers", + "description": "The VM CPU manufacturers specified as a list. Optional parameter.", + "type": { + "$id": "436", + "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": "437", + "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": "438", + "kind": "property", + "name": "excludedVMSizes", + "serializedName": "excludedVMSizes", + "description": "Specifies which VMSizes should be excluded while building Fleet. Optional parameter.", + "type": { + "$id": "439", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "440", + "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": "441", + "kind": "property", + "name": "additionalLocationsProfile", + "serializedName": "additionalLocationsProfile", + "description": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "type": { + "$id": "442", + "kind": "model", + "name": "AdditionalLocationsProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalLocationsProfile", + "usage": "Input,Output,Json", + "description": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "decorators": [], + "properties": [ + { + "$id": "443", + "kind": "property", + "name": "locationProfiles", + "serializedName": "locationProfiles", + "description": "The list of location profiles.", + "type": { + "$id": "444", + "kind": "array", + "name": "ArrayLocationProfile", + "valueType": { + "$id": "445", + "kind": "model", + "name": "LocationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile", + "usage": "Input,Output,Json", + "description": "Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride (optional).", + "decorators": [], + "properties": [ + { + "$id": "446", + "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": "447", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile.location" + }, + { + "$id": "449", + "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": "450", + "kind": "model", + "name": "ComputeFleetVmProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile", + "usage": "Input,Output,Json", + "description": "Describes the base virtual machine profile for fleet", + "decorators": [], + "properties": [ + { + "$id": "451", + "kind": "property", + "name": "osProfile", + "serializedName": "osProfile", + "description": "Specifies the operating system settings for the virtual machines in the scale\nset.", + "type": { + "$id": "452", + "kind": "model", + "name": "ComputeFleetVmssOSProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set OS profile.", + "decorators": [], + "properties": [ + { + "$id": "453", + "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": "454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.computerNamePrefix" + }, + { + "$id": "455", + "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": "456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.adminUsername" + }, + { + "$id": "457", + "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": "458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.adminPassword" + }, + { + "$id": "459", + "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": "460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.customData" + }, + { + "$id": "461", + "kind": "property", + "name": "windowsConfiguration", + "serializedName": "windowsConfiguration", + "description": "Specifies Windows operating system settings on the virtual machine.", + "type": { + "$id": "462", + "kind": "model", + "name": "ComputeFleetWindowsConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration", + "usage": "Input,Output,Json", + "description": "Specifies Windows operating system settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "463", + "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": "464", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.provisionVMAgent" + }, + { + "$id": "465", + "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": "466", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.enableAutomaticUpdates" + }, + { + "$id": "467", + "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": "468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.timeZone" + }, + { + "$id": "469", + "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": "470", + "kind": "array", + "name": "ArrayAdditionalUnattendContent", + "valueType": { + "$id": "471", + "kind": "model", + "name": "WindowsSetupAdditionalInformation", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent", + "usage": "Input,Output,Json", + "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": "472", + "kind": "property", + "name": "passName", + "serializedName": "passName", + "description": "The pass name. Currently, the only allowable value is OobeSystem.", + "type": { + "$id": "473", + "kind": "constant", + "valueType": { + "$ref": "98" + }, + "value": "OobeSystem", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.passName" + }, + { + "$id": "474", + "kind": "property", + "name": "componentName", + "serializedName": "componentName", + "description": "The component name. Currently, the only allowable value is\nMicrosoft-Windows-Shell-Setup.", + "type": { + "$id": "475", + "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": "476", + "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": "477", + "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": "478", + "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": "479", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "description": "[Preview Feature] Specifies settings related to VM Guest Patching on Windows.", + "type": { + "$id": "480", + "kind": "model", + "name": "ComputeFleetVmGuestPatchSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings", + "usage": "Input,Output,Json", + "description": "Specifies settings related to VM Guest Patching on Windows.", + "decorators": [], + "properties": [ + { + "$id": "481", + "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": "482", + "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": "483", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.enableHotpatching" + }, + { + "$id": "484", + "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": "485", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Windows.", + "type": { + "$id": "486", + "kind": "model", + "name": "ComputeFleetWindowsVMGuestPatchAutomaticByPlatformSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json", + "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Windows patch settings.", + "decorators": [], + "properties": [ + { + "$id": "487", + "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": "488", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "description": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "489", + "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": "490", + "kind": "property", + "name": "winRM", + "serializedName": "winRM", + "description": "Specifies the Windows Remote Management listeners. This enables remote Windows\nPowerShell.", + "type": { + "$id": "491", + "kind": "model", + "name": "WinRMConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMConfiguration", + "usage": "Input,Output,Json", + "description": "Describes Windows Remote Management configuration of the VM", + "decorators": [], + "properties": [ + { + "$id": "492", + "kind": "property", + "name": "listeners", + "serializedName": "listeners", + "description": "The list of Windows Remote Management listeners", + "type": { + "$id": "493", + "kind": "array", + "name": "ArrayWinRmListener", + "valueType": { + "$id": "494", + "kind": "model", + "name": "ComputeFleetWinRMListener", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener", + "usage": "Input,Output,Json", + "description": "Describes Protocol and thumbprint of Windows Remote Management listener", + "decorators": [], + "properties": [ + { + "$id": "495", + "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": "496", + "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": "497", + "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": "498", + "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": "499", + "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": "500", + "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": "501", + "kind": "model", + "name": "ComputeFleetLinuxConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration", + "usage": "Input,Output,Json", + "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": "502", + "kind": "property", + "name": "IsPasswordAuthenticationDisabled", + "serializedName": "disablePasswordAuthentication", + "description": "Specifies whether password authentication should be disabled.", + "type": { + "$id": "503", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.disablePasswordAuthentication" + }, + { + "$id": "504", + "kind": "property", + "name": "ssh", + "serializedName": "ssh", + "description": "Specifies the ssh key configuration for a Linux OS.", + "type": { + "$id": "505", + "kind": "model", + "name": "ComputeFleetSshConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshConfiguration", + "usage": "Input,Output,Json", + "description": "SSH configuration for Linux based VMs running on Azure", + "decorators": [], + "properties": [ + { + "$id": "506", + "kind": "property", + "name": "publicKeys", + "serializedName": "publicKeys", + "description": "The list of SSH public keys used to authenticate with linux based VMs.", + "type": { + "$id": "507", + "kind": "array", + "name": "ArraySshPublicKey", + "valueType": { + "$id": "508", + "kind": "model", + "name": "ComputeFleetSshPublicKey", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey", + "usage": "Input,Output,Json", + "description": "Contains information about SSH certificate public key and the path on the Linux\nVM where the public key is placed.", + "decorators": [], + "properties": [ + { + "$id": "509", + "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": "510", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey.path" + }, + { + "$id": "511", + "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": "512", + "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": "513", + "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": "514", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.provisionVMAgent" + }, + { + "$id": "515", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "description": "[Preview Feature] Specifies settings related to VM Guest Patching on Linux.", + "type": { + "$id": "516", + "kind": "model", + "name": "ComputeFleetLinuxPatchSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings", + "usage": "Input,Output,Json", + "description": "Specifies settings related to VM Guest Patching on Linux.", + "decorators": [], + "properties": [ + { + "$id": "517", + "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": "518", + "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": "519", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Linux.", + "type": { + "$id": "520", + "kind": "model", + "name": "ComputeFleetLinuxVMGuestPatchAutomaticByPlatformSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json", + "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Linux patch settings.", + "decorators": [], + "properties": [ + { + "$id": "521", + "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": "522", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "description": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "523", + "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": "524", + "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": "525", + "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": "526", + "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": "527", + "kind": "array", + "name": "ArrayVaultSecretGroup", + "valueType": { + "$id": "528", + "kind": "model", + "name": "ComputeFleetVaultSecretGroup", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup", + "usage": "Input,Output,Json", + "description": "Describes a set of certificates which are all in the same Key Vault.", + "decorators": [], + "properties": [ + { + "$id": "529", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "description": "The relative URL of the Key Vault containing all of the certificates in\nVaultCertificates.", + "type": { + "$id": "530", + "kind": "model", + "name": "SubResource", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SubResource", + "usage": "Input,Output,Json", + "description": "Describes SubResource", + "decorators": [], + "properties": [ + { + "$id": "531", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "532", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "533", + "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": "534", + "kind": "property", + "name": "vaultCertificates", + "serializedName": "vaultCertificates", + "description": "The list of key vault references in SourceVault which contain certificates.", + "type": { + "$id": "535", + "kind": "array", + "name": "ArrayVaultCertificate", + "valueType": { + "$id": "536", + "kind": "model", + "name": "ComputeFleetVaultCertificate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate", + "usage": "Input,Output,Json", + "description": "Describes a single certificate reference in a Key Vault, and where the\ncertificate should reside on the VM.", + "decorators": [], + "properties": [ + { + "$id": "537", + "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": "538", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate.certificateUrl" + }, + { + "$id": "539", + "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": "540", + "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": "541", + "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": "542", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.allowExtensionOperations" + }, + { + "$id": "543", + "kind": "property", + "name": "IsGuestProvisionSignalRequired", + "serializedName": "requireGuestProvisionSignal", + "description": "Optional property which must either be set to True or omitted.", + "type": { + "$id": "544", + "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": "545", + "kind": "property", + "name": "storageProfile", + "serializedName": "storageProfile", + "description": "Specifies the storage settings for the virtual machine disks.", + "type": { + "$id": "546", + "kind": "model", + "name": "ComputeFleetVmssStorageProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set storage profile.", + "decorators": [], + "properties": [ + { + "$id": "547", + "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": "548", + "kind": "model", + "name": "ComputeFleetImageReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference", + "usage": "Input,Output,Json", + "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": "549", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "550", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.id" + }, + { + "$id": "552", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The image publisher.", + "type": { + "$id": "553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.publisher" + }, + { + "$id": "554", + "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": "555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.offer" + }, + { + "$id": "556", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "description": "The image SKU.", + "type": { + "$id": "557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sku" + }, + { + "$id": "558", + "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": "559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.version" + }, + { + "$id": "560", + "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": "561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.exactVersion" + }, + { + "$id": "562", + "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": "563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sharedGalleryImageId" + }, + { + "$id": "564", + "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": "565", + "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": "566", + "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": "567", + "kind": "model", + "name": "ComputeFleetVmssOSDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set operating system disk.", + "decorators": [], + "properties": [ + { + "$id": "568", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The disk name.", + "type": { + "$id": "569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.name" + }, + { + "$id": "570", + "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": "571", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "description": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "572", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.writeAcceleratorEnabled" + }, + { + "$id": "573", + "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": "574", + "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": "575", + "kind": "model", + "name": "ComputeFleetDiffDiskSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings", + "usage": "Input,Output,Json", + "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": "576", + "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": "577", + "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": "578", + "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": "579", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.diskSizeGB" + }, + { + "$id": "580", + "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": "581", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "Specifies information about the unmanaged user image to base the scale set on.", + "type": { + "$id": "582", + "kind": "model", + "name": "ComputeFleetVirtualHardDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualHardDisk", + "usage": "Input,Output,Json", + "description": "Describes the uri of a disk.", + "decorators": [], + "properties": [ + { + "$id": "583", + "kind": "property", + "name": "uri", + "serializedName": "uri", + "description": "Specifies the virtual hard disk's uri.", + "type": { + "$id": "584", + "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": "585", + "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": "586", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "587", + "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": "588", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "description": "The managed disk parameters.", + "type": { + "$id": "589", + "kind": "model", + "name": "ComputeFleetVmssManagedDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters", + "usage": "Input,Output,Json", + "description": "Describes the parameters of a ScaleSet managed disk.", + "decorators": [], + "properties": [ + { + "$id": "590", + "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": "591", + "kind": "property", + "name": "diskEncryptionSet", + "serializedName": "diskEncryptionSet", + "description": "Specifies the customer managed disk encryption set resource id for the managed\ndisk.", + "type": { + "$id": "592", + "kind": "model", + "name": "DiskEncryptionSetParameters", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskEncryptionSetParameters", + "usage": "Input,Output,Json", + "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": "593", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "594", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "595", + "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": "596", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "description": "Specifies the security profile for the managed disk.", + "type": { + "$id": "597", + "kind": "model", + "name": "ComputeFleetVMDiskSecurityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile", + "usage": "Input,Output,Json", + "description": "Specifies the security profile settings for the managed disk. **Note:** It can\nonly be set for Confidential VMs.", + "decorators": [], + "properties": [ + { + "$id": "598", + "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": "599", + "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": "592" + }, + "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": "600", + "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": "601", + "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": "602", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetDataDisk", + "valueType": { + "$id": "603", + "kind": "model", + "name": "ComputeFleetVmssDataDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set data disk.", + "decorators": [], + "properties": [ + { + "$id": "604", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The disk name.", + "type": { + "$id": "605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.name" + }, + { + "$id": "606", + "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": "607", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.lun" + }, + { + "$id": "608", + "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": "609", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "description": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "610", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.writeAcceleratorEnabled" + }, + { + "$id": "611", + "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": "612", + "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": "613", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskSizeGB" + }, + { + "$id": "614", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "description": "The managed disk parameters.", + "type": { + "$ref": "589" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.managedDisk" + }, + { + "$id": "615", + "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": "616", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskIOPSReadWrite" + }, + { + "$id": "617", + "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": "618", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskMBpsReadWrite" + }, + { + "$id": "619", + "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": "620", + "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": "621", + "kind": "property", + "name": "networkProfile", + "serializedName": "networkProfile", + "description": "Specifies properties of the network interfaces of the virtual machines in the\nscale set.", + "type": { + "$id": "622", + "kind": "model", + "name": "ComputeFleetVmssNetworkProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set network profile.", + "decorators": [], + "properties": [ + { + "$id": "623", + "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": "624", + "kind": "model", + "name": "ApiEntityReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiEntityReference", + "usage": "Input,Output,Json", + "description": "The API entity reference.", + "decorators": [], + "properties": [ + { + "$id": "625", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ARM resource id in the form of\n/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...", + "type": { + "$id": "626", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "627", + "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": "628", + "kind": "property", + "name": "networkInterfaceConfigurations", + "serializedName": "networkInterfaceConfigurations", + "description": "The list of network configurations.", + "type": { + "$id": "629", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetNetworkConfiguration", + "valueType": { + "$id": "630", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set network profile's network configurations.", + "decorators": [], + "properties": [ + { + "$id": "631", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The network configuration name.", + "type": { + "$id": "632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration.name" + }, + { + "$id": "633", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes a virtual machine scale set network profile's IP configuration.", + "type": { + "$id": "634", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfigurationProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "635", + "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": "636", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.primary" + }, + { + "$id": "637", + "kind": "property", + "name": "IsAcceleratedNetworkingEnabled", + "serializedName": "enableAcceleratedNetworking", + "description": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "638", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableAcceleratedNetworking" + }, + { + "$id": "639", + "kind": "property", + "name": "IsTcpStateTrackingDisabled", + "serializedName": "disableTcpStateTracking", + "description": "Specifies whether the network interface is disabled for tcp state tracking.", + "type": { + "$id": "640", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking" + }, + { + "$id": "641", + "kind": "property", + "name": "IsFpgaEnabled", + "serializedName": "enableFpga", + "description": "Specifies whether the network interface is FPGA networking-enabled.", + "type": { + "$id": "642", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableFpga" + }, + { + "$id": "643", + "kind": "property", + "name": "networkSecurityGroup", + "serializedName": "networkSecurityGroup", + "description": "The network security group.", + "type": { + "$ref": "530" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.networkSecurityGroup" + }, + { + "$id": "644", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "description": "The dns settings to be applied on the network interfaces.", + "type": { + "$id": "645", + "kind": "model", + "name": "ComputeFleetVmssNetworkDnsSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings", + "usage": "Input,Output,Json", + "description": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "646", + "kind": "property", + "name": "dnsServers", + "serializedName": "dnsServers", + "description": "List of DNS servers IP addresses", + "type": { + "$id": "647", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "648", + "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": "649", + "kind": "property", + "name": "ipConfigurations", + "serializedName": "ipConfigurations", + "description": "Specifies the IP configurations of the network interface.", + "type": { + "$id": "650", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpConfiguration", + "valueType": { + "$id": "651", + "kind": "model", + "name": "ComputeFleetVmssIPConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "652", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The IP configuration name.", + "type": { + "$id": "653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration.name" + }, + { + "$id": "654", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "type": { + "$id": "655", + "kind": "model", + "name": "ComputeFleetVmssIPConfigurationProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "decorators": [], + "properties": [ + { + "$id": "656", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "description": "Specifies the identifier of the subnet.", + "type": { + "$ref": "624" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.subnet" + }, + { + "$id": "657", + "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": "658", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.primary" + }, + { + "$id": "659", + "kind": "property", + "name": "publicIPAddressConfiguration", + "serializedName": "publicIPAddressConfiguration", + "description": "The publicIPAddressConfiguration.", + "type": { + "$id": "660", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration", + "usage": "Input,Output,Json", + "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "661", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The publicIP address 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.VirtualMachineScaleSetPublicIPAddressConfiguration.name" + }, + { + "$id": "663", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "type": { + "$id": "664", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfigurationProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties", + "usage": "Input,Output,Json", + "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "665", + "kind": "property", + "name": "idleTimeoutInMinutes", + "serializedName": "idleTimeoutInMinutes", + "description": "The idle timeout of the public IP address.", + "type": { + "$id": "666", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.idleTimeoutInMinutes" + }, + { + "$id": "667", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "description": "The dns settings to be applied on the publicIP addresses .", + "type": { + "$id": "668", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressDnsSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", + "usage": "Input,Output,Json", + "description": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "669", + "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": "670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.domainNameLabel" + }, + { + "$id": "671", + "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": "672", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "description": "The list of IP tags associated with the public IP address.", + "type": { + "$id": "673", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpTag", + "valueType": { + "$id": "674", + "kind": "model", + "name": "ComputeFleetVmssIPTag", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag", + "usage": "Input,Output,Json", + "description": "Contains the IP tag associated with the public IP address.", + "decorators": [], + "properties": [ + { + "$id": "675", + "kind": "property", + "name": "ipTagType", + "serializedName": "ipTagType", + "description": "IP tag type. Example: FirstPartyUsage.", + "type": { + "$id": "676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag.ipTagType" + }, + { + "$id": "677", + "kind": "property", + "name": "tag", + "serializedName": "tag", + "description": "IP tag associated with the public IP. Example: SQL, Storage etc.", + "type": { + "$id": "678", + "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": "679", + "kind": "property", + "name": "publicIPPrefix", + "serializedName": "publicIPPrefix", + "description": "The PublicIPPrefix from which to allocate publicIP addresses.", + "type": { + "$ref": "530" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.publicIPPrefix" + }, + { + "$id": "680", + "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": "681", + "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": "682", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "description": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "type": { + "$id": "683", + "kind": "model", + "name": "ComputeFleetPublicIPAddressSku", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku", + "usage": "Input,Output,Json", + "description": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "decorators": [], + "properties": [ + { + "$id": "684", + "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": "685", + "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": "686", + "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": "687", + "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": "688", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "530" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools" + }, + { + "$id": "689", + "kind": "property", + "name": "applicationSecurityGroups", + "serializedName": "applicationSecurityGroups", + "description": "Specifies an array of references to application security group.", + "type": { + "$id": "690", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "530" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups" + }, + { + "$id": "691", + "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": "692", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "530" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools" + }, + { + "$id": "693", + "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": "694", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "530" + }, + "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": "695", + "kind": "property", + "name": "IsIPForwardingEnabled", + "serializedName": "enableIPForwarding", + "description": "Whether IP forwarding enabled on this NIC.", + "type": { + "$id": "696", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableIPForwarding" + }, + { + "$id": "697", + "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": "698", + "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": "699", + "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": "700", + "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": "701", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "description": "Specifies the Security related profile settings for the virtual machines in the\nscale set.", + "type": { + "$id": "702", + "kind": "model", + "name": "ComputeFleetSecurityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile", + "usage": "Input,Output,Json", + "description": "Specifies the Security profile settings for the virtual machine or virtual\nmachine scale set.", + "decorators": [], + "properties": [ + { + "$id": "703", + "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": "704", + "kind": "model", + "name": "ComputeFleetUefiSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings", + "usage": "Input,Output,Json", + "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": "705", + "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": "706", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings.secureBootEnabled" + }, + { + "$id": "707", + "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": "708", + "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": "709", + "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": "710", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.encryptionAtHost" + }, + { + "$id": "711", + "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": "712", + "kind": "property", + "name": "encryptionIdentity", + "serializedName": "encryptionIdentity", + "description": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "type": { + "$id": "713", + "kind": "model", + "name": "ComputeFleetEncryptionIdentity", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EncryptionIdentity", + "usage": "Input,Output,Json", + "description": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "decorators": [], + "properties": [ + { + "$id": "714", + "kind": "property", + "name": "userAssignedIdentityResourceId", + "serializedName": "userAssignedIdentityResourceId", + "description": "Specifies ARM Resource ID of one of the user identities associated with the VM.", + "type": { + "$id": "715", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "716", + "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": "717", + "kind": "property", + "name": "proxyAgentSettings", + "serializedName": "proxyAgentSettings", + "description": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "type": { + "$id": "718", + "kind": "model", + "name": "ComputeFleetProxyAgentSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings", + "usage": "Input,Output,Json", + "description": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "decorators": [], + "properties": [ + { + "$id": "719", + "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": "720", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.enabled" + }, + { + "$id": "721", + "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": "722", + "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": "723", + "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": "724", + "kind": "property", + "name": "diagnosticsProfile", + "serializedName": "diagnosticsProfile", + "description": "Specifies the boot diagnostic settings state.", + "type": { + "$id": "725", + "kind": "model", + "name": "ComputeFleetDiagnosticsProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiagnosticsProfile", + "usage": "Input,Output,Json", + "description": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.", + "decorators": [], + "properties": [ + { + "$id": "726", + "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": "727", + "kind": "model", + "name": "ComputeFleetBootDiagnostics", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics", + "usage": "Input,Output,Json", + "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": "728", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "description": "Whether boot diagnostics should be enabled on the Virtual Machine.", + "type": { + "$id": "729", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics.enabled" + }, + { + "$id": "730", + "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": "731", + "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": "732", + "kind": "property", + "name": "extensionProfile", + "serializedName": "extensionProfile", + "description": "Specifies a collection of settings for extensions installed on virtual machines\nin the scale set.", + "type": { + "$id": "733", + "kind": "model", + "name": "ComputeFleetVmssExtensionProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile", + "usage": "Input,Output,Json", + "description": "Describes a virtual machine scale set extension profile.", + "decorators": [], + "properties": [ + { + "$id": "734", + "kind": "property", + "name": "extensions", + "serializedName": "extensions", + "description": "The virtual machine scale set child extension resources.", + "type": { + "$id": "735", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetExtension", + "valueType": { + "$id": "736", + "kind": "model", + "name": "ComputeFleetVmssExtension", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension", + "usage": "Input,Output,Json", + "description": "Describes a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "737", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "738", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.id" + }, + { + "$id": "740", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the extension.", + "type": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.name" + }, + { + "$id": "742", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "description": "Resource type", + "type": { + "$id": "743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.type" + }, + { + "$id": "744", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes the properties of a Virtual Machine Scale Set Extension.", + "type": { + "$id": "745", + "kind": "model", + "name": "ComputeFleetVmssExtensionProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties", + "usage": "Input,Output,Json", + "description": "Describes the properties of a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "746", + "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": "747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.forceUpdateTag" + }, + { + "$id": "748", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The name of the extension handler publisher.", + "type": { + "$id": "749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.publisher" + }, + { + "$id": "750", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "description": "Specifies the type of the extension; an example is \"CustomScriptExtension\".", + "type": { + "$id": "751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.type" + }, + { + "$id": "752", + "kind": "property", + "name": "typeHandlerVersion", + "serializedName": "typeHandlerVersion", + "description": "Specifies the version of the script handler.", + "type": { + "$id": "753", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.typeHandlerVersion" + }, + { + "$id": "754", + "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": "755", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.autoUpgradeMinorVersion" + }, + { + "$id": "756", + "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": "757", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.enableAutomaticUpgrade" + }, + { + "$id": "758", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "description": "Json formatted public settings for the extension.", + "type": { + "$id": "759", + "kind": "dict", + "keyType": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "761", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.settings" + }, + { + "$id": "762", + "kind": "property", + "name": "protectedSettings", + "serializedName": "protectedSettings", + "description": "The extension can contain either protectedSettings or\nprotectedSettingsFromKeyVault or no protected settings at all.", + "type": { + "$id": "763", + "kind": "dict", + "keyType": { + "$id": "764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "765", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.protectedSettings" + }, + { + "$id": "766", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "description": "The provisioning state, which only appears in the response.", + "type": { + "$id": "767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.provisioningState" + }, + { + "$id": "768", + "kind": "property", + "name": "provisionAfterExtensions", + "serializedName": "provisionAfterExtensions", + "description": "Collection of extension names after which this extension needs to be\nprovisioned.", + "type": { + "$id": "769", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "770", + "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": "771", + "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": "772", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.suppressFailures" + }, + { + "$id": "773", + "kind": "property", + "name": "protectedSettingsFromKeyVault", + "serializedName": "protectedSettingsFromKeyVault", + "description": "The extensions protected settings that are passed by reference, and consumed\nfrom key vault", + "type": { + "$id": "774", + "kind": "model", + "name": "ComputeFleetKeyVaultSecretReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference", + "usage": "Input,Output,Json", + "description": "Describes a reference to Key Vault Secret", + "decorators": [], + "properties": [ + { + "$id": "775", + "kind": "property", + "name": "secretUrl", + "serializedName": "secretUrl", + "description": "The URL referencing a secret in a Key Vault.", + "type": { + "$id": "776", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference.secretUrl" + }, + { + "$id": "777", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "description": "The relative URL of the Key Vault containing the secret.", + "type": { + "$ref": "530" + }, + "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": "778", + "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": "779", + "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": "780", + "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": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.licenseType" + }, + { + "$id": "782", + "kind": "property", + "name": "scheduledEventsProfile", + "serializedName": "scheduledEventsProfile", + "description": "Specifies Scheduled Event related configurations.", + "type": { + "$id": "783", + "kind": "model", + "name": "ComputeFleetScheduledEventsProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile", + "usage": "Input,Output,Json", + "description": "Specifies Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "784", + "kind": "property", + "name": "terminateNotificationProfile", + "serializedName": "terminateNotificationProfile", + "description": "Specifies Terminate Scheduled Event related configurations.", + "type": { + "$id": "785", + "kind": "model", + "name": "ComputeFleetTerminateNotificationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile", + "usage": "Input,Output,Json", + "description": "Specifies Terminate Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "786", + "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": "787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile.notBeforeTimeout" + }, + { + "$id": "788", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "description": "Specifies whether the Terminate Scheduled event is enabled or disabled.", + "type": { + "$id": "789", + "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": "790", + "kind": "property", + "name": "osImageNotificationProfile", + "serializedName": "osImageNotificationProfile", + "description": "Specifies OS Image Scheduled Event related configurations.", + "type": { + "$id": "791", + "kind": "model", + "name": "ComputeFleetOSImageNotificationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile", + "usage": "Input,Output,Json", + "description": "Specifies OS Image Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "792", + "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": "793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile.notBeforeTimeout" + }, + { + "$id": "794", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "description": "Specifies whether the OS Image Scheduled event is enabled or disabled.", + "type": { + "$id": "795", + "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": "796", + "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": "797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.userData" + }, + { + "$id": "798", + "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": "799", + "kind": "model", + "name": "CapacityReservationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CapacityReservationProfile", + "usage": "Input,Output,Json", + "description": "The parameters of a capacity reservation Profile.", + "decorators": [], + "properties": [ + { + "$id": "800", + "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": "530" + }, + "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": "801", + "kind": "property", + "name": "applicationProfile", + "serializedName": "applicationProfile", + "description": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "802", + "kind": "model", + "name": "ComputeFleetApplicationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApplicationProfile", + "usage": "Input,Output,Json", + "description": "Contains the list of gallery applications that should be made available to the\nVM/VMSS", + "decorators": [], + "properties": [ + { + "$id": "803", + "kind": "property", + "name": "galleryApplications", + "serializedName": "galleryApplications", + "description": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "804", + "kind": "array", + "name": "ArrayVmGalleryApplication", + "valueType": { + "$id": "805", + "kind": "model", + "name": "ComputeFleetVMGalleryApplication", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication", + "usage": "Input,Output,Json", + "description": "Specifies the required information to reference a compute gallery application\nversion", + "decorators": [], + "properties": [ + { + "$id": "806", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "Optional, Specifies a passthrough value for more generic context.", + "type": { + "$id": "807", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.tags" + }, + { + "$id": "808", + "kind": "property", + "name": "order", + "serializedName": "order", + "description": "Optional, Specifies the order in which the packages have to be installed", + "type": { + "$id": "809", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.order" + }, + { + "$id": "810", + "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": "811", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.packageReferenceId" + }, + { + "$id": "813", + "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": "814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.configurationReference" + }, + { + "$id": "815", + "kind": "property", + "name": "IsTreatFailureAsDeploymentFailureEnabled", + "serializedName": "treatFailureAsDeploymentFailure", + "description": "Optional, If true, any failure for any operation in the VmApplication will fail\nthe deployment", + "type": { + "$id": "816", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.treatFailureAsDeploymentFailure" + }, + { + "$id": "817", + "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": "818", + "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": "819", + "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": "820", + "kind": "model", + "name": "ComputeFleetVmssHardwareProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile", + "usage": "Input,Output,Json", + "description": "Specifies the hardware settings for the virtual machine scale set.", + "decorators": [], + "properties": [ + { + "$id": "821", + "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": "822", + "kind": "model", + "name": "ComputeFleetVMSizeProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties", + "usage": "Input,Output,Json", + "description": "Specifies VM Size Property settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "823", + "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": "824", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties.vCPUsAvailable" + }, + { + "$id": "825", + "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": "826", + "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": "827", + "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": "828", + "kind": "model", + "name": "ServiceArtifactReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ServiceArtifactReference", + "usage": "Input,Output,Json", + "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": "829", + "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": "830", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "831", + "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": "832", + "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": "833", + "kind": "model", + "name": "ComputeFleetSecurityPostureReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference", + "usage": "Input,Output,Json", + "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": "834", + "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": "835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.id" + }, + { + "$id": "836", + "kind": "property", + "name": "excludeExtensions", + "serializedName": "excludeExtensions", + "description": "List of virtual machine extension names to exclude when applying the security\nposture.", + "type": { + "$id": "837", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "838", + "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": "839", + "kind": "property", + "name": "isOverridable", + "serializedName": "isOverridable", + "description": "Whether the security posture can be overridden by the user.", + "type": { + "$id": "840", + "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": "841", + "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": "842", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "843", + "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": "844", + "kind": "property", + "name": "computeProfile", + "serializedName": "computeProfile", + "description": "Compute Profile to use for running user's workloads.", + "type": { + "$id": "845", + "kind": "model", + "name": "ComputeFleetComputeProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile", + "usage": "Input,Output,Json", + "description": "Compute Profile to use for running user's workloads.", + "decorators": [], + "properties": [ + { + "$id": "846", + "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": "450" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.baseVirtualMachineProfile" + }, + { + "$id": "847", + "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": "848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.computeApiVersion" + }, + { + "$id": "849", + "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": "850", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.platformFaultDomainCount" + }, + { + "$id": "851", + "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": "852", + "kind": "model", + "name": "AdditionalCapabilities", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities", + "usage": "Input,Output,Json", + "description": "AdditionalCapabilities for VM.", + "decorators": [], + "properties": [ + { + "$id": "853", + "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": "854", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities.ultraSSDEnabled" + }, + { + "$id": "855", + "kind": "property", + "name": "isHibernationEnabled", + "serializedName": "hibernationEnabled", + "description": "The flag that enables or disables hibernation capability on the VM.", + "type": { + "$id": "856", + "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": "857", + "kind": "property", + "name": "CreatedOn", + "serializedName": "timeCreated", + "description": "Specifies the time at which the Compute Fleet is created.", + "type": { + "$id": "858", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "859", + "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": "860", + "kind": "property", + "name": "uniqueId", + "serializedName": "uniqueId", + "description": "Specifies the ID which uniquely identifies a Compute Fleet.", + "type": { + "$id": "861", + "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": "862", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "description": "Zones in which the Compute Fleet is available", + "type": { + "$id": "863", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "864", + "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": "865", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "description": "The managed service identities assigned to this resource.", + "type": { + "$id": "866", + "kind": "model", + "name": "ManagedServiceIdentity", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json", + "description": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "867", + "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": "868", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "869", + "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": "870", + "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": "871", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "872", + "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": "873", + "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": "874", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "description": "The identities assigned to this resource by the user.", + "type": { + "$id": "875", + "kind": "dict", + "keyType": { + "$id": "876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "877", + "kind": "nullable", + "type": { + "$id": "878", + "kind": "model", + "name": "UserAssignedIdentity", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json", + "description": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "879", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "description": "The principal ID of the 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.UserAssignedIdentity.principalId" + }, + { + "$id": "882", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "description": "The client ID of the assigned identity.", + "type": { + "$id": "883", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "884", + "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": "885", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "description": "Details of the resource plan.", + "type": { + "$id": "886", + "kind": "model", + "name": "Plan", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan", + "usage": "Input,Output,Json", + "description": "Plan for the resource.", + "decorators": [], + "properties": [ + { + "$id": "887", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.name" + }, + { + "$id": "889", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.publisher" + }, + { + "$id": "891", + "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": "892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.product" + }, + { + "$id": "893", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "894", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.promotionCode" + }, + { + "$id": "895", + "kind": "property", + "name": "version", + "serializedName": "version", + "description": "The version of the desired product/artifact.", + "type": { + "$id": "896", + "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": "373" + }, + { + "$ref": "376" + }, + { + "$ref": "388" + }, + { + "$ref": "396" + }, + { + "$ref": "402" + }, + { + "$ref": "404" + }, + { + "$ref": "410" + }, + { + "$ref": "442" + }, + { + "$ref": "445" + }, + { + "$ref": "450" + }, + { + "$ref": "452" + }, + { + "$ref": "462" + }, + { + "$ref": "471" + }, + { + "$ref": "480" + }, + { + "$ref": "486" + }, + { + "$ref": "491" + }, + { + "$ref": "494" + }, + { + "$ref": "501" + }, + { + "$ref": "505" + }, + { + "$ref": "508" + }, + { + "$ref": "516" + }, + { + "$ref": "520" + }, + { + "$ref": "528" + }, + { + "$ref": "530" + }, + { + "$ref": "536" + }, + { + "$ref": "546" + }, + { + "$ref": "548" + }, + { + "$ref": "567" + }, + { + "$ref": "575" + }, + { + "$ref": "582" + }, + { + "$ref": "589" + }, + { + "$ref": "592" + }, + { + "$ref": "597" + }, + { + "$ref": "603" + }, + { + "$ref": "622" + }, + { + "$ref": "624" + }, + { + "$ref": "630" + }, + { + "$ref": "634" + }, + { + "$ref": "645" + }, + { + "$ref": "651" + }, + { + "$ref": "655" + }, + { + "$ref": "660" + }, + { + "$ref": "664" + }, + { + "$ref": "668" + }, + { + "$ref": "674" + }, + { + "$ref": "683" + }, + { + "$ref": "702" + }, + { + "$ref": "704" + }, + { + "$ref": "713" + }, + { + "$ref": "718" + }, + { + "$ref": "725" + }, + { + "$ref": "727" + }, + { + "$ref": "733" + }, + { + "$ref": "736" + }, + { + "$ref": "745" + }, + { + "$ref": "774" + }, + { + "$ref": "783" + }, + { + "$ref": "785" + }, + { + "$ref": "791" + }, + { + "$ref": "799" + }, + { + "$ref": "802" + }, + { + "$ref": "805" + }, + { + "$ref": "820" + }, + { + "$ref": "822" + }, + { + "$ref": "828" + }, + { + "$ref": "833" + }, + { + "$ref": "845" + }, + { + "$ref": "852" + }, + { + "$ref": "866" + }, + { + "$ref": "878" + }, + { + "$ref": "886" + }, + { + "$ref": "343" + }, + { + "$ref": "344" + }, + { + "$ref": "353" + }, + { + "$id": "897", + "kind": "model", + "name": "ErrorResponse", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Output,Error,Json", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "898", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "The error object.", + "type": { + "$id": "899", + "kind": "model", + "name": "ErrorDetail", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Output,Json", + "description": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "900", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "The error code.", + "type": { + "$id": "901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code" + }, + { + "$id": "902", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "The error message.", + "type": { + "$id": "903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message" + }, + { + "$id": "904", + "kind": "property", + "name": "target", + "serializedName": "target", + "description": "The error target.", + "type": { + "$id": "905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target" + }, + { + "$id": "906", + "kind": "property", + "name": "details", + "serializedName": "details", + "description": "The error details.", + "type": { + "$id": "907", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "899" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details" + }, + { + "$id": "908", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "description": "The error additional info.", + "type": { + "$id": "909", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "910", + "kind": "model", + "name": "ErrorAdditionalInfo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Output,Json", + "description": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "911", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The additional info type.", + "type": { + "$id": "912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type" + }, + { + "$id": "913", + "kind": "property", + "name": "info", + "serializedName": "info", + "description": "The additional info.", + "type": { + "$id": "914", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Output,Json", + "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": "899" + }, + { + "$ref": "910" + }, + { + "$ref": "914" + }, + { + "$id": "915", + "kind": "model", + "name": "FleetUpdate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate", + "usage": "Input,Json", + "description": "Fleet Update Model", + "decorators": [], + "properties": [ + { + "$id": "916", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "Resource tags.", + "type": { + "$id": "917", + "kind": "dict", + "keyType": { + "$id": "918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "919", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.tags" + }, + { + "$id": "920", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "description": "Updatable managed service identity", + "type": { + "$id": "921", + "kind": "model", + "name": "ManagedServiceIdentityUpdate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate", + "usage": "Input,Json", + "description": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "922", + "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": "923", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "description": "The identities assigned to this resource by the user.", + "type": { + "$id": "924", + "kind": "dict", + "keyType": { + "$id": "925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "877" + }, + "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": "926", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "description": "Updatable resource plan", + "type": { + "$id": "927", + "kind": "model", + "name": "ResourcePlanUpdate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate", + "usage": "Input,Json", + "description": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "928", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.name" + }, + { + "$id": "930", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.publisher" + }, + { + "$id": "932", + "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": "933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.product" + }, + { + "$id": "934", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.promotionCode" + }, + { + "$id": "936", + "kind": "property", + "name": "version", + "serializedName": "version", + "description": "The version of the desired product/artifact.", + "type": { + "$id": "937", + "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": "938", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "RP-specific updatable properties", + "type": { + "$ref": "373" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.properties" + } + ] + }, + { + "$ref": "921" + }, + { + "$ref": "927" + }, + { + "$id": "939", + "kind": "model", + "name": "FleetListResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "description": "The response of a Fleet list operation.", + "decorators": [], + "properties": [ + { + "$id": "940", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The Fleet items on this page", + "type": { + "$id": "941", + "kind": "array", + "name": "ArrayFleet", + "valueType": { + "$ref": "342" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value" + }, + { + "$id": "942", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "943", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "944", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink" + } + ] + }, + { + "$id": "945", + "kind": "model", + "name": "VirtualMachineScaleSetListResult", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult", + "usage": "Output,Json", + "description": "The response of a VirtualMachineScaleSet list operation.", + "decorators": [], + "properties": [ + { + "$id": "946", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The VirtualMachineScaleSet items on this page", + "type": { + "$id": "947", + "kind": "array", + "name": "ArrayVirtualMachineScaleSet", + "valueType": { + "$id": "948", + "kind": "model", + "name": "ComputeFleetVmss", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet", + "usage": "Output,Json", + "description": "An AzureFleet's virtualMachineScaleSet", + "decorators": [], + "properties": [ + { + "$id": "949", + "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": "950", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.id" + }, + { + "$id": "952", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Type of the virtualMachineScaleSet", + "type": { + "$id": "953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.type" + }, + { + "$id": "954", + "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": "955", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "Error Information when `operationStatus` is `Failed`", + "type": { + "$id": "956", + "kind": "model", + "name": "ComputeFleetApiError", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError", + "usage": "Output,Json", + "description": "ApiError for Fleet", + "decorators": [], + "properties": [ + { + "$id": "957", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "The error code.", + "type": { + "$id": "958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.code" + }, + { + "$id": "959", + "kind": "property", + "name": "target", + "serializedName": "target", + "description": "The target of the particular error.", + "type": { + "$id": "960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.target" + }, + { + "$id": "961", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "The error message.", + "type": { + "$id": "962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.message" + }, + { + "$id": "963", + "kind": "property", + "name": "details", + "serializedName": "details", + "description": "The API error details", + "type": { + "$id": "964", + "kind": "array", + "name": "ArrayApiErrorBase", + "valueType": { + "$id": "965", + "kind": "model", + "name": "ComputeFleetApiErrorInfo", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase", + "usage": "Output,Json", + "description": "API error base.", + "decorators": [], + "properties": [ + { + "$id": "966", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "The error code.", + "type": { + "$id": "967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.code" + }, + { + "$id": "968", + "kind": "property", + "name": "target", + "serializedName": "target", + "description": "The target of the particular error.", + "type": { + "$id": "969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.target" + }, + { + "$id": "970", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "The error message.", + "type": { + "$id": "971", + "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": "972", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "description": "The API inner error", + "type": { + "$id": "973", + "kind": "model", + "name": "ComputeFleetInnerError", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError", + "usage": "Output,Json", + "description": "Inner error details.", + "decorators": [], + "properties": [ + { + "$id": "974", + "kind": "property", + "name": "exceptionType", + "serializedName": "exceptionType", + "description": "The exception type.", + "type": { + "$id": "975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.exceptionType" + }, + { + "$id": "976", + "kind": "property", + "name": "errorDetail", + "serializedName": "errorDetail", + "description": "The internal error message or exception dump.", + "type": { + "$id": "977", + "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": "978", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "979", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.nextLink" + } + ] + }, + { + "$ref": "948" + }, + { + "$ref": "956" + }, + { + "$ref": "965" + }, + { + "$ref": "973" + }, + { + "$id": "980", + "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": "981", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The Operation items on this page", + "type": { + "$id": "982", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "983", + "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": "984", + "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": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name" + }, + { + "$id": "986", + "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": "987", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction" + }, + { + "$id": "988", + "kind": "property", + "name": "display", + "serializedName": "display", + "description": "Localized display information for this particular operation.", + "type": { + "$id": "989", + "kind": "model", + "name": "OperationDisplay", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "description": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "990", + "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": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider" + }, + { + "$id": "992", + "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": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource" + }, + { + "$id": "994", + "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": "995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation" + }, + { + "$id": "996", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "997", + "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": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display" + }, + { + "$id": "998", + "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": "326" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin" + }, + { + "$id": "999", + "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": "334" + }, + "optional": true, + "readOnly": false, + "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": "1000", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "1001", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1002", + "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": "983" + }, + { + "$ref": "989" + } + ], + "Clients": [ + { + "$id": "1003", + "Name": "AzureFleetClient", + "Operations": [], + "Protocol": { + "$id": "1004" + }, + "Parameters": [ + { + "$id": "1005", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "1006", + "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": "1007", + "Type": { + "$id": "1008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "1009", + "Name": "Operations", + "Operations": [ + { + "$id": "1010", + "Name": "list", + "ResourceName": "Operations", + "Description": "List the operations for the provider", + "Accessibility": "internal", + "Parameters": [ + { + "$id": "1011", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1013", + "Type": { + "$id": "1014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1015", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1016", + "kind": "constant", + "valueType": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1018", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "980" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.AzureFleet/operations", + "BufferResponse": true, + "Paging": { + "$id": "1019", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "1020", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-11-01/Operations_List.json", + "parameters": [ + { + "$id": "1021", + "parameter": { + "$ref": "1011" + }, + "value": { + "$id": "1022", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "2024-11-01" + } + } + ], + "responses": [ + { + "$id": "1023", + "response": { + "$ref": "1018" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1024", + "kind": "model", + "type": { + "$ref": "980" + }, + "value": { + "$id": "1025", + "value": { + "$id": "1026", + "kind": "array", + "type": { + "$ref": "982" + }, + "value": [ + { + "$id": "1027", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "1028", + "origin": { + "$id": "1029", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "user,system" + }, + "name": { + "$id": "1030", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "Microsoft.AzureFleet/fleets/read" + }, + "isDataAction": { + "$id": "1031", + "kind": "boolean", + "type": { + "$ref": "987" + }, + "value": false + }, + "display": { + "$id": "1032", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "1033", + "provider": { + "$id": "1034", + "kind": "string", + "type": { + "$ref": "991" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "993" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1036", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "Get Azure Fleet" + }, + "description": { + "$id": "1037", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "Get properties of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1038", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "1039", + "origin": { + "$id": "1040", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "user,system" + }, + "name": { + "$id": "1041", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "Microsoft.AzureFleet/fleets/write" + }, + "isDataAction": { + "$id": "1042", + "kind": "boolean", + "type": { + "$ref": "987" + }, + "value": false + }, + "display": { + "$id": "1043", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "1044", + "provider": { + "$id": "1045", + "kind": "string", + "type": { + "$ref": "991" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "993" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1047", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "Create or Update Azure Fleet" + }, + "description": { + "$id": "1048", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "Creates a new Azure Fleet resource or updates an existing one" + } + } + } + } + }, + { + "$id": "1049", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "1050", + "origin": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "user,system" + }, + "name": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "Microsoft.AzureFleet/fleets/delete" + }, + "isDataAction": { + "$id": "1053", + "kind": "boolean", + "type": { + "$ref": "987" + }, + "value": false + }, + "display": { + "$id": "1054", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "1055", + "provider": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "991" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "993" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "Delete Virtual Machine and Virtual Machine scale sets in a Azure Fleet resource" + }, + "description": { + "$id": "1059", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "Deletes all compute resources of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1060", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "1061", + "origin": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "user,system" + }, + "name": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "Microsoft.AzureFleet/register/action" + }, + "isDataAction": { + "$id": "1064", + "kind": "boolean", + "type": { + "$ref": "987" + }, + "value": false + }, + "display": { + "$id": "1065", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "1066", + "provider": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "991" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "993" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "Register subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "Registers Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + }, + { + "$id": "1071", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "1072", + "origin": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "user,system" + }, + "name": { + "$id": "1074", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "Microsoft.AzureFleet/unregister/action" + }, + "isDataAction": { + "$id": "1075", + "kind": "boolean", + "type": { + "$ref": "987" + }, + "value": false + }, + "display": { + "$id": "1076", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "1077", + "provider": { + "$id": "1078", + "kind": "string", + "type": { + "$ref": "991" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1079", + "kind": "string", + "type": { + "$ref": "993" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1080", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "Unregister Subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1081", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "Unregisters Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1082" + }, + "Parent": "AzureFleetClient", + "Parameters": [ + { + "$id": "1083", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "1084", + "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": "1085", + "Type": { + "$id": "1086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "1087", + "Name": "Fleets", + "Operations": [ + { + "$id": "1088", + "Name": "get", + "ResourceName": "Fleet", + "Description": "Get a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1089", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1091", + "Type": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1093", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1094", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1096", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1098", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "1099", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1100", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1101", + "kind": "constant", + "valueType": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1103", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "342" + }, + "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": "1104", + "kind": "http", + "name": "Fleets_Get", + "description": "Fleets_Get", + "filePath": "2024-11-01/Fleets_Get.json", + "parameters": [ + { + "$id": "1105", + "parameter": { + "$ref": "1089" + }, + "value": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "1090" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1107", + "parameter": { + "$ref": "1093" + }, + "value": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "1109", + "parameter": { + "$ref": "1096" + }, + "value": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "1097" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "1111", + "parameter": { + "$ref": "1098" + }, + "value": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "1099" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "1113", + "response": { + "$ref": "1103" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1114", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "1115", + "properties": { + "$id": "1116", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1117", + "provisioningState": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "1119", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "1120", + "capacity": { + "$id": "1121", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1122", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "1123", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1124", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1126", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1127", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1128", + "capacity": { + "$id": "1129", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1130", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1131", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1132", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "1133", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1134", + "name": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1136", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1137", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "1138", + "baseVirtualMachineProfile": { + "$id": "1139", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "1140", + "osProfile": { + "$id": "1141", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "1142", + "computerNamePrefix": { + "$id": "1143", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1144", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "1145", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "1146", + "provisionVMAgent": { + "$id": "1147", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1148", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "1149", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1150", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "1151", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1152", + "passName": { + "$id": "1153", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1154", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1155", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "1156", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "1157", + "patchMode": { + "$id": "1158", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1159", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "1160", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1161", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "1162", + "rebootSetting": { + "$id": "1163", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1164", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1165", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "1166", + "listeners": { + "$id": "1167", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "1168", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1169", + "protocol": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1172", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1173", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1174", + "disablePasswordAuthentication": { + "$id": "1175", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "1176", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1177", + "publicKeys": { + "$id": "1178", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1179", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1180", + "path": { + "$id": "1181", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1183", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "1184", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "1185", + "patchMode": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1187", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1188", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "1189", + "rebootSetting": { + "$id": "1190", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1191", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1192", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1193", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "1194", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "1195", + "sourceVault": { + "$id": "1196", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1197", + "id": { + "$id": "1198", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1199", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "1200", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1201", + "certificateUrl": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1204", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1205", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1206", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1207", + "imageReference": { + "$id": "1208", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "1209", + "publisher": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1211", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1213", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "1214", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "1215", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1216", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "1217", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1218", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "1219", + "name": { + "$id": "1220", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1221", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1222", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "1223", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1224", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "1225", + "option": { + "$id": "1226", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "1227", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1228", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "1229", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "1230", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "1231", + "uri": { + "$id": "1232", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1233", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1235", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "1236", + "storageAccountType": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1238", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1239", + "id": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1241", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "1242", + "securityEncryptionType": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1244", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1245", + "id": { + "$id": "1246", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "1247", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "1248", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "1249", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "1250", + "name": { + "$id": "1251", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "1252", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "1253", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1254", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "1255", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "1256", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "1257", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "1258", + "storageAccountType": { + "$id": "1259", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1260", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1261", + "id": { + "$id": "1262", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1263", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "1264", + "securityEncryptionType": { + "$id": "1265", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1266", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1267", + "id": { + "$id": "1268", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "1269", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "1270", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "1271", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "1272", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "1273", + "healthProbe": { + "$id": "1274", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "1275", + "id": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "1277", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "1278", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "1279", + "name": { + "$id": "1280", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "1281", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "1282", + "primary": { + "$id": "1283", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "1284", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "1285", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "1286", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "1287", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1288", + "id": { + "$id": "1289", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "1290", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "1291", + "dnsServers": { + "$id": "1292", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "1293", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "1294", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "1295", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "1296", + "name": { + "$id": "1297", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "1298", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "1299", + "subnet": { + "$id": "1300", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "1301", + "id": { + "$id": "1302", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "1303", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "1304", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "1305", + "name": { + "$id": "1306", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "1307", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "1308", + "idleTimeoutInMinutes": { + "$id": "1309", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "1310", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "1311", + "domainNameLabel": { + "$id": "1312", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "1313", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "1314", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "1315", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "1316", + "ipTagType": { + "$id": "1317", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "1319", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1320", + "id": { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "1323", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "1324", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "1325", + "name": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "1327", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "1329", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "1330", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1331", + "id": { + "$id": "1332", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "1333", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "1334", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1335", + "id": { + "$id": "1336", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "1337", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "1338", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1339", + "id": { + "$id": "1340", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "1341", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "1342", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1343", + "id": { + "$id": "1344", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "1345", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "1346", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "1347", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "1348", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "1350", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "1351", + "uefiSettings": { + "$id": "1352", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "1353", + "secureBootEnabled": { + "$id": "1354", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "1355", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "1356", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "1357", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "1358", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "1359", + "userAssignedIdentityResourceId": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "1361", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "1362", + "enabled": { + "$id": "1363", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "1364", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "1365", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "1366", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "1367", + "bootDiagnostics": { + "$id": "1368", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "1369", + "enabled": { + "$id": "1370", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "1372", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "1373", + "extensions": { + "$id": "1374", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "1375", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "1376", + "name": { + "$id": "1377", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "1378", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "cmeam" + }, + "properties": { + "$id": "1379", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "1380", + "forceUpdateTag": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "1382", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "1383", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "1384", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "1385", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1386", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "settings": { + "$id": "1387", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "1388" + } + }, + "provisioningState": { + "$id": "1389", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "1390", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "1391", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "1392", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "1393", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "1394", + "secretUrl": { + "$id": "1395", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "1396", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1397", + "id": { + "$id": "1398", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "1399", + "kind": "string", + "type": { + "$ref": "738" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "1400", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "1401", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "1402", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "1403", + "terminateNotificationProfile": { + "$id": "1404", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "1405", + "notBeforeTimeout": { + "$id": "1406", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "1407", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "1408", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "1409", + "notBeforeTimeout": { + "$id": "1410", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "1411", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "1412", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "1413", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "1414", + "capacityReservationGroup": { + "$id": "1415", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1416", + "id": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "1418", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "1419", + "galleryApplications": { + "$id": "1420", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "1421", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "1422", + "tags": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "1424", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "1425", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "1426", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1427", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "1428", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "1429", + "vmSizeProperties": { + "$id": "1430", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "1431", + "vCPUsAvailable": { + "$id": "1432", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "1433", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "1434", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "1435", + "id": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "1437", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "1438", + "id": { + "$id": "1439", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "1440", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "1441", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "1442", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "1443", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "1444", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "1445", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "1446", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "1447", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "1448", + "kind": "array", + "type": { + "$ref": "863" + }, + "value": [ + { + "$id": "1449", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone1" + }, + { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "1451", + "kind": "model", + "type": { + "$ref": "866" + }, + "value": { + "$id": "1452", + "principalId": { + "$id": "1453", + "kind": "string", + "type": { + "$ref": "868" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "1455", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "1456", + "kind": "dict", + "type": { + "$ref": "875" + }, + "value": { + "$id": "1457", + "key9851": { + "$id": "1458", + "kind": "model", + "type": { + "$ref": "878" + }, + "value": { + "$id": "1459", + "principalId": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "1461", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "1462", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "1463", + "key3518": { + "$id": "1464", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "1465", + "kind": "model", + "type": { + "$ref": "886" + }, + "value": { + "$id": "1466", + "name": { + "$id": "1467", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "1468", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "1469", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "1470", + "kind": "string", + "type": { + "$ref": "894" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "1471", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "westus" + }, + "id": { + "$id": "1473", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "1474", + "kind": "string", + "type": { + "$id": "1475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "testFleet" + }, + "type": { + "$id": "1476", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "1477", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1478", + "createdBy": { + "$id": "1479", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "1480", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "358" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1484", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1485", + "Name": "createOrUpdate", + "ResourceName": "Fleet", + "Description": "Create a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1486", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1488", + "Type": { + "$id": "1489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1490", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1491", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1493", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1495", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "1496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1497", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1498", + "kind": "constant", + "valueType": { + "$id": "1499", + "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": "1500", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1501", + "kind": "constant", + "valueType": { + "$id": "1502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1503", + "Name": "resource", + "NameInRequest": "resource", + "Description": "Resource create parameters.", + "Type": { + "$ref": "342" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1504", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "342" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1505", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "342" + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "1506", + "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": "1507", + "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": "1508", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "1509", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "342" + }, + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "Decorators": [ + { + "$id": "1510", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1511", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "1512", + "kind": "http", + "name": "Fleets_CreateOrUpdate", + "description": "Fleets_CreateOrUpdate", + "filePath": "2024-11-01/Fleets_CreateOrUpdate.json", + "parameters": [ + { + "$id": "1513", + "parameter": { + "$ref": "1486" + }, + "value": { + "$id": "1514", + "kind": "string", + "type": { + "$ref": "1487" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1515", + "parameter": { + "$ref": "1490" + }, + "value": { + "$id": "1516", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "1517", + "parameter": { + "$ref": "1493" + }, + "value": { + "$id": "1518", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "1519", + "parameter": { + "$ref": "1495" + }, + "value": { + "$id": "1520", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "testFleet" + } + }, + { + "$id": "1521", + "parameter": { + "$ref": "1503" + }, + "value": { + "$id": "1522", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "1523", + "properties": { + "$id": "1524", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1525", + "spotPriorityProfile": { + "$id": "1526", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "1527", + "capacity": { + "$id": "1528", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1529", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "1530", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1532", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1533", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1534", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1535", + "capacity": { + "$id": "1536", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1537", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1539", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "1540", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1541", + "name": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1543", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1544", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "1545", + "baseVirtualMachineProfile": { + "$id": "1546", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "1547", + "osProfile": { + "$id": "1548", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "1549", + "computerNamePrefix": { + "$id": "1550", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1551", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "1552", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "1553", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "1554", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "1555", + "provisionVMAgent": { + "$id": "1556", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1557", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "1558", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1559", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "1560", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1561", + "passName": { + "$id": "1562", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1563", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1564", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "1565", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "1566", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "1567", + "patchMode": { + "$id": "1568", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1569", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "1570", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1571", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "1572", + "rebootSetting": { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1574", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1575", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "1576", + "listeners": { + "$id": "1577", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "1578", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1579", + "protocol": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "1581", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1582", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1583", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1584", + "disablePasswordAuthentication": { + "$id": "1585", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "1586", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1587", + "publicKeys": { + "$id": "1588", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1589", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1590", + "path": { + "$id": "1591", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1592", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1593", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "1594", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "1595", + "patchMode": { + "$id": "1596", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1597", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1598", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "1599", + "rebootSetting": { + "$id": "1600", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1601", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1602", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1603", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "1604", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "1605", + "sourceVault": { + "$id": "1606", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1607", + "id": { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1609", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "1610", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1611", + "certificateUrl": { + "$id": "1612", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1613", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1614", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1615", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1616", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1617", + "imageReference": { + "$id": "1618", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "1619", + "publisher": { + "$id": "1620", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1621", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1623", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "1624", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1625", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "1626", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1627", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "1628", + "name": { + "$id": "1629", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1631", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "1632", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1633", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "1634", + "option": { + "$id": "1635", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "1636", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1637", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "1638", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "1639", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "1640", + "uri": { + "$id": "1641", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1642", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "1643", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1644", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "1645", + "storageAccountType": { + "$id": "1646", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1647", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1648", + "id": { + "$id": "1649", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1650", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "1651", + "securityEncryptionType": { + "$id": "1652", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1653", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1654", + "id": { + "$id": "1655", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "1656", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "1657", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "1658", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "1659", + "name": { + "$id": "1660", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "1661", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "1662", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1663", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "1664", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "1665", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "1666", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "1667", + "storageAccountType": { + "$id": "1668", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1669", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1670", + "id": { + "$id": "1671", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1672", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "1673", + "securityEncryptionType": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1675", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "1676", + "id": { + "$id": "1677", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "1678", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "1679", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "1680", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "1681", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "1682", + "healthProbe": { + "$id": "1683", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "1684", + "id": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "1686", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "1687", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "1688", + "name": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "1690", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "1691", + "primary": { + "$id": "1692", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "1693", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "1694", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "1695", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "1696", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1697", + "id": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "1699", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "1700", + "dnsServers": { + "$id": "1701", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "1703", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "1704", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "1705", + "name": { + "$id": "1706", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "1707", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "1708", + "subnet": { + "$id": "1709", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "1710", + "id": { + "$id": "1711", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "1712", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "1713", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "1714", + "name": { + "$id": "1715", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "1716", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "1717", + "idleTimeoutInMinutes": { + "$id": "1718", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "1719", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "1720", + "domainNameLabel": { + "$id": "1721", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "1722", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "1723", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "1724", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "1725", + "ipTagType": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "1728", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1729", + "id": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "1733", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "1734", + "name": { + "$id": "1735", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "1736", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "1737", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "1738", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "1739", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1740", + "id": { + "$id": "1741", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "1742", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "1743", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1744", + "id": { + "$id": "1745", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "1746", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "1747", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1748", + "id": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "1750", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "1751", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1752", + "id": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "1754", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "1755", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "1757", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "1759", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "1760", + "uefiSettings": { + "$id": "1761", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "1762", + "secureBootEnabled": { + "$id": "1763", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "1764", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "1765", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "1766", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "1767", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "1768", + "userAssignedIdentityResourceId": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "1770", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "1771", + "enabled": { + "$id": "1772", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "1774", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "1775", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "1776", + "bootDiagnostics": { + "$id": "1777", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "1778", + "enabled": { + "$id": "1779", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "1781", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "1782", + "extensions": { + "$id": "1783", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "1784", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "1785", + "name": { + "$id": "1786", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "1787", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "1788", + "forceUpdateTag": { + "$id": "1789", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "1790", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "1791", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "1792", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "1793", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1794", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "settings": { + "$id": "1795", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "1796" + } + }, + "protectedSettings": { + "$id": "1797", + "kind": "dict", + "type": { + "$ref": "763" + }, + "value": { + "$id": "1798" + } + }, + "provisionAfterExtensions": { + "$id": "1799", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "1801", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "1802", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "1803", + "secretUrl": { + "$id": "1804", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myvaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "1805", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1806", + "id": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "1809", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "1810", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "1811", + "terminateNotificationProfile": { + "$id": "1812", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "1813", + "notBeforeTimeout": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "1815", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "1816", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "1817", + "notBeforeTimeout": { + "$id": "1818", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "1819", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "1820", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "1821", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "1822", + "capacityReservationGroup": { + "$id": "1823", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1824", + "id": { + "$id": "1825", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "1826", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "1827", + "galleryApplications": { + "$id": "1828", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "1829", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "1830", + "tags": { + "$id": "1831", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "1832", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "1833", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "1834", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "1835", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1836", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "1837", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "1838", + "vmSizeProperties": { + "$id": "1839", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "1840", + "vCPUsAvailable": { + "$id": "1841", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "1842", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "1843", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "1844", + "id": { + "$id": "1845", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "1846", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "1847", + "id": { + "$id": "1848", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "1849", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "1851", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "1852", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "1853", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + } + } + }, + "zones": { + "$id": "1854", + "kind": "array", + "type": { + "$ref": "863" + }, + "value": [ + { + "$id": "1855", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone1" + }, + { + "$id": "1856", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "1857", + "kind": "model", + "type": { + "$ref": "866" + }, + "value": { + "$id": "1858", + "type": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "1860", + "kind": "dict", + "type": { + "$ref": "875" + }, + "value": { + "$id": "1861", + "key9851": { + "$id": "1862", + "kind": "model", + "type": { + "$ref": "878" + }, + "value": { + "$id": "1863" + } + } + } + } + } + }, + "tags": { + "$id": "1864", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "1865", + "key3518": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "westus" + }, + "plan": { + "$id": "1868", + "kind": "model", + "type": { + "$ref": "886" + }, + "value": { + "$id": "1869", + "name": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "1871", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "1872", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "1873", + "kind": "string", + "type": { + "$ref": "894" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1875", + "response": { + "$ref": "1504" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1876", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "1877", + "properties": { + "$id": "1878", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1879", + "provisioningState": { + "$id": "1880", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "1881", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "1882", + "capacity": { + "$id": "1883", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + }, + "minCapacity": { + "$id": "1884", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 20 + }, + "maxPricePerVM": { + "$id": "1885", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1886", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1887", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1888", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1889", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1890", + "capacity": { + "$id": "1891", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 10 + }, + "minCapacity": { + "$id": "1892", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1894", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "1895", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1896", + "name": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1898", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1899", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "1900", + "baseVirtualMachineProfile": { + "$id": "1901", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "1902", + "osProfile": { + "$id": "1903", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "1904", + "computerNamePrefix": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1906", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "1907", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "1908", + "provisionVMAgent": { + "$id": "1909", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1910", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1912", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "1913", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1914", + "passName": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1917", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "1918", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "1919", + "patchMode": { + "$id": "1920", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1921", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1923", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "1924", + "rebootSetting": { + "$id": "1925", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1926", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1927", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "1928", + "listeners": { + "$id": "1929", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "1930", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1931", + "protocol": { + "$id": "1932", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "1933", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1934", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1935", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1936", + "disablePasswordAuthentication": { + "$id": "1937", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "1938", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1939", + "publicKeys": { + "$id": "1940", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1941", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1942", + "path": { + "$id": "1943", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1945", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "1946", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "1947", + "patchMode": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1949", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1950", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "1951", + "rebootSetting": { + "$id": "1952", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1953", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1954", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1955", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "1956", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "1957", + "sourceVault": { + "$id": "1958", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "1959", + "id": { + "$id": "1960", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1961", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "1962", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1963", + "certificateUrl": { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1965", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1966", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1967", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1968", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1969", + "imageReference": { + "$id": "1970", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "1971", + "publisher": { + "$id": "1972", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1973", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1974", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1975", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "1976", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "1977", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1978", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "1979", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1980", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "1981", + "name": { + "$id": "1982", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1983", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1984", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "1985", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1986", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "1987", + "option": { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "1989", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1990", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "1991", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "1992", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "1993", + "uri": { + "$id": "1994", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1995", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "1996", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1997", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "1998", + "storageAccountType": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2000", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2001", + "id": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2003", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "2004", + "securityEncryptionType": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2006", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2007", + "id": { + "$id": "2008", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2010", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "2011", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2012", + "name": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2014", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "2015", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2016", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "2017", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2018", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2019", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2020", + "storageAccountType": { + "$id": "2021", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2022", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2023", + "id": { + "$id": "2024", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2025", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "2026", + "securityEncryptionType": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2028", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2029", + "id": { + "$id": "2030", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2031", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2032", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2033", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "2034", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "2035", + "healthProbe": { + "$id": "2036", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2037", + "id": { + "$id": "2038", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2039", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "2040", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "2041", + "name": { + "$id": "2042", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "2043", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "2044", + "primary": { + "$id": "2045", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2046", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2047", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "2048", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2049", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2050", + "id": { + "$id": "2051", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2052", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "2053", + "dnsServers": { + "$id": "2054", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "2055", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2056", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "2057", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "2058", + "name": { + "$id": "2059", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2060", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "2061", + "subnet": { + "$id": "2062", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2063", + "id": { + "$id": "2064", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2065", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2066", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2067", + "name": { + "$id": "2068", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2069", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2070", + "idleTimeoutInMinutes": { + "$id": "2071", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2072", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2073", + "domainNameLabel": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2075", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2076", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "2077", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2078", + "ipTagType": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2080", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2081", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2082", + "id": { + "$id": "2083", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2084", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2085", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2086", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "2087", + "name": { + "$id": "2088", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "2089", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2091", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "2092", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2093", + "id": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2095", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "2096", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2097", + "id": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2099", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "2100", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2101", + "id": { + "$id": "2102", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2103", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "2104", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2105", + "id": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2107", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "2108", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2111", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2112", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "2113", + "uefiSettings": { + "$id": "2114", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "2115", + "secureBootEnabled": { + "$id": "2116", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2117", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2118", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "2119", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2120", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "2121", + "userAssignedIdentityResourceId": { + "$id": "2122", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2123", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2124", + "enabled": { + "$id": "2125", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "2126", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2127", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2128", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "2129", + "bootDiagnostics": { + "$id": "2130", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "2131", + "enabled": { + "$id": "2132", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "2133", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2134", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2135", + "extensions": { + "$id": "2136", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "2137", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "2138", + "name": { + "$id": "2139", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2140", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2141", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2142", + "forceUpdateTag": { + "$id": "2143", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2145", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2147", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2148", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "settings": { + "$id": "2149", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "2150" + } + }, + "provisioningState": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2152", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "2153", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2154", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2155", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "2156", + "secretUrl": { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2158", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2159", + "id": { + "$id": "2160", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "738" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2162", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2164", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "2165", + "terminateNotificationProfile": { + "$id": "2166", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "2167", + "notBeforeTimeout": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2169", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2170", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "2171", + "notBeforeTimeout": { + "$id": "2172", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2173", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2174", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2175", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "2176", + "capacityReservationGroup": { + "$id": "2177", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2178", + "id": { + "$id": "2179", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2180", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2181", + "galleryApplications": { + "$id": "2182", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "2183", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "2184", + "tags": { + "$id": "2185", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2186", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2187", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2188", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2189", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2190", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "2191", + "vmSizeProperties": { + "$id": "2192", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2193", + "vCPUsAvailable": { + "$id": "2194", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2195", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2196", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2197", + "id": { + "$id": "2198", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2199", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "2200", + "id": { + "$id": "2201", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2202", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "2203", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2204", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2205", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2206", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2207", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2208", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2209", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2210", + "kind": "array", + "type": { + "$ref": "863" + }, + "value": [ + { + "$id": "2211", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone1" + }, + { + "$id": "2212", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2213", + "kind": "model", + "type": { + "$ref": "866" + }, + "value": { + "$id": "2214", + "principalId": { + "$id": "2215", + "kind": "string", + "type": { + "$ref": "868" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2216", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2217", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2218", + "kind": "dict", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2219", + "key9851": { + "$id": "2220", + "kind": "model", + "type": { + "$ref": "878" + }, + "value": { + "$id": "2221", + "principalId": { + "$id": "2222", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2223", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "2224", + "kind": "model", + "type": { + "$ref": "886" + }, + "value": { + "$id": "2225", + "name": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2229", + "kind": "string", + "type": { + "$ref": "894" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "2231", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "2232", + "key3518": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "westus" + }, + "id": { + "$id": "2235", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2236", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "testFleet" + }, + "type": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2238", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "2239", + "createdBy": { + "$id": "2240", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2241", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "2242", + "kind": "string", + "type": { + "$ref": "358" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2243", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2244", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2245", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "2246", + "response": { + "$ref": "1505" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2247", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "2248", + "properties": { + "$id": "2249", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2250", + "provisioningState": { + "$id": "2251", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "2252", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2253", + "capacity": { + "$id": "2254", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + }, + "minCapacity": { + "$id": "2255", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 0 + }, + "maxPricePerVM": { + "$id": "2256", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2257", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2259", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2260", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "2261", + "capacity": { + "$id": "2262", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2263", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2265", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2266", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2267", + "name": { + "$id": "2268", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2269", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2270", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2271", + "baseVirtualMachineProfile": { + "$id": "2272", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "2273", + "osProfile": { + "$id": "2274", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "2275", + "computerNamePrefix": { + "$id": "2276", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2278", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "2279", + "provisionVMAgent": { + "$id": "2280", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2281", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "2282", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2283", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "2284", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2285", + "passName": { + "$id": "2286", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2287", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2288", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "2289", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "2290", + "patchMode": { + "$id": "2291", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2292", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2294", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2295", + "rebootSetting": { + "$id": "2296", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2297", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2298", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "2299", + "listeners": { + "$id": "2300", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "2301", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2302", + "protocol": { + "$id": "2303", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2304", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2305", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2306", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2307", + "disablePasswordAuthentication": { + "$id": "2308", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "2309", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "2310", + "publicKeys": { + "$id": "2311", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "2312", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "2313", + "path": { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2315", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2316", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "2317", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "2318", + "patchMode": { + "$id": "2319", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2320", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2321", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "2322", + "rebootSetting": { + "$id": "2323", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2324", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2325", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2326", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "2327", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "2328", + "sourceVault": { + "$id": "2329", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2330", + "id": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2332", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "2333", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "2334", + "certificateUrl": { + "$id": "2335", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2336", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2337", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2338", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2339", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2340", + "imageReference": { + "$id": "2341", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "2342", + "publisher": { + "$id": "2343", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2344", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2345", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2346", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "2347", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "2348", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2349", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "2350", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2351", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "2352", + "name": { + "$id": "2353", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2354", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2355", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2357", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "2358", + "option": { + "$id": "2359", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "2360", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2361", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "2362", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "2363", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "2364", + "uri": { + "$id": "2365", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2366", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "2367", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2368", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2369", + "storageAccountType": { + "$id": "2370", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2371", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2372", + "id": { + "$id": "2373", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2374", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "2375", + "securityEncryptionType": { + "$id": "2376", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2377", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2378", + "id": { + "$id": "2379", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2380", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2381", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "2382", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2383", + "name": { + "$id": "2384", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2385", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "2386", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2387", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "2388", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2389", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2390", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2391", + "storageAccountType": { + "$id": "2392", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2393", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2394", + "id": { + "$id": "2395", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2396", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "2397", + "securityEncryptionType": { + "$id": "2398", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2399", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2400", + "id": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2402", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2403", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2404", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "2405", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "2406", + "healthProbe": { + "$id": "2407", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2408", + "id": { + "$id": "2409", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2410", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "2411", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "2412", + "name": { + "$id": "2413", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "2414", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "2415", + "primary": { + "$id": "2416", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2417", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2418", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "2419", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2420", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2421", + "id": { + "$id": "2422", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2423", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "2424", + "dnsServers": { + "$id": "2425", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2427", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "2428", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "2429", + "name": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2431", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "2432", + "subnet": { + "$id": "2433", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2434", + "id": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2436", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2437", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2438", + "name": { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2440", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2441", + "idleTimeoutInMinutes": { + "$id": "2442", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2443", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2444", + "domainNameLabel": { + "$id": "2445", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2446", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2447", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "2448", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2449", + "ipTagType": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2451", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2452", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2453", + "id": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2455", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2456", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2457", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "2458", + "name": { + "$id": "2459", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2461", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2462", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "2463", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2464", + "id": { + "$id": "2465", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2466", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "2467", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2468", + "id": { + "$id": "2469", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2470", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "2471", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2472", + "id": { + "$id": "2473", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2474", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "2475", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2476", + "id": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2478", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "2479", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2480", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2481", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2482", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2483", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "2484", + "uefiSettings": { + "$id": "2485", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "2486", + "secureBootEnabled": { + "$id": "2487", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2488", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2489", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "2490", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2491", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "2492", + "userAssignedIdentityResourceId": { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2494", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2495", + "enabled": { + "$id": "2496", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "2497", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2498", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2499", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "2500", + "bootDiagnostics": { + "$id": "2501", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "2502", + "enabled": { + "$id": "2503", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2505", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2506", + "extensions": { + "$id": "2507", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "2508", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "2509", + "name": { + "$id": "2510", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2511", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2512", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2513", + "forceUpdateTag": { + "$id": "2514", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2516", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2518", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2519", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "settings": { + "$id": "2520", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "2521" + } + }, + "provisioningState": { + "$id": "2522", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2523", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "2524", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2525", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2526", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "2527", + "secretUrl": { + "$id": "2528", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2529", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2530", + "id": { + "$id": "2531", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2532", + "kind": "string", + "type": { + "$ref": "738" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2533", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2534", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2535", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "2536", + "terminateNotificationProfile": { + "$id": "2537", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "2538", + "notBeforeTimeout": { + "$id": "2539", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2540", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2541", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "2542", + "notBeforeTimeout": { + "$id": "2543", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2544", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2545", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2546", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "2547", + "capacityReservationGroup": { + "$id": "2548", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2549", + "id": { + "$id": "2550", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2551", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2552", + "galleryApplications": { + "$id": "2553", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "2554", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "2555", + "tags": { + "$id": "2556", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2557", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2558", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2559", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2560", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2561", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "2562", + "vmSizeProperties": { + "$id": "2563", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2564", + "vCPUsAvailable": { + "$id": "2565", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2566", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2567", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2568", + "id": { + "$id": "2569", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2570", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "2571", + "id": { + "$id": "2572", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2573", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "2574", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2575", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2576", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2577", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2578", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2579", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2580", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2581", + "kind": "array", + "type": { + "$ref": "863" + }, + "value": [ + { + "$id": "2582", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone1" + }, + { + "$id": "2583", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2584", + "kind": "model", + "type": { + "$ref": "866" + }, + "value": { + "$id": "2585", + "principalId": { + "$id": "2586", + "kind": "string", + "type": { + "$ref": "868" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2588", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2589", + "kind": "dict", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2590", + "key9851": { + "$id": "2591", + "kind": "model", + "type": { + "$ref": "878" + }, + "value": { + "$id": "2592", + "principalId": { + "$id": "2593", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2594", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "2595", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "2596", + "key3518": { + "$id": "2597", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "2598", + "kind": "model", + "type": { + "$ref": "886" + }, + "value": { + "$id": "2599", + "name": { + "$id": "2600", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2601", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2602", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2603", + "kind": "string", + "type": { + "$ref": "894" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2604", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "2605", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "westus" + }, + "id": { + "$id": "2606", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2607", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "testFleet" + }, + "type": { + "$id": "2608", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2609", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "2610", + "createdBy": { + "$id": "2611", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2612", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "2613", + "kind": "string", + "type": { + "$ref": "358" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2614", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2615", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2616", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + }, + { + "$id": "2617", + "kind": "http", + "name": "Fleets_CreateOrUpdate_MinimumSet", + "description": "Fleets_CreateOrUpdate_MinimumSet", + "filePath": "2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json", + "parameters": [ + { + "$id": "2618", + "parameter": { + "$ref": "1486" + }, + "value": { + "$id": "2619", + "kind": "string", + "type": { + "$ref": "1487" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2620", + "parameter": { + "$ref": "1490" + }, + "value": { + "$id": "2621", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "2622", + "parameter": { + "$ref": "1493" + }, + "value": { + "$id": "2623", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "2624", + "parameter": { + "$ref": "1495" + }, + "value": { + "$id": "2625", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "testFleet" + } + }, + { + "$id": "2626", + "parameter": { + "$ref": "1503" + }, + "value": { + "$id": "2627", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "2628", + "properties": { + "$id": "2629", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2630", + "spotPriorityProfile": { + "$id": "2631", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2632", + "capacity": { + "$id": "2633", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2634", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "2635", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2636", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2637", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2638", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "2639", + "capacity": { + "$id": "2640", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2641", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "2642", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2643", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2644", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2645", + "name": { + "$id": "2646", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "2647", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2648", + "name": { + "$id": "2649", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "2650", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2651", + "name": { + "$id": "2652", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "2653", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2654", + "baseVirtualMachineProfile": { + "$id": "2655", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "2656", + "storageProfile": { + "$id": "2657", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2658", + "imageReference": { + "$id": "2659", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "2660", + "publisher": { + "$id": "2661", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "canonical" + }, + "offer": { + "$id": "2662", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "2663", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "2664", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "2665", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "2666", + "caching": { + "$id": "2667", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "2669", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "2670", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2671", + "storageAccountType": { + "$id": "2672", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "2673", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "2674", + "computerNamePrefix": { + "$id": "2675", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "2676", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "azureuser" + }, + "adminPassword": { + "$id": "2677", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "TestPassword$0" + }, + "linuxConfiguration": { + "$id": "2678", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2679", + "disablePasswordAuthentication": { + "$id": "2680", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "2681", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "2682", + "networkInterfaceConfigurations": { + "$id": "2683", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "2684", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "2685", + "name": { + "$id": "2686", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2687", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "2688", + "primary": { + "$id": "2689", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2690", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": false + }, + "ipConfigurations": { + "$id": "2691", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "2692", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "2693", + "name": { + "$id": "2694", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2695", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "2696", + "subnet": { + "$id": "2697", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2698", + "id": { + "$id": "2699", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2700", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "2701", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "2702", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2703", + "id": { + "$id": "2704", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2705", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "2706", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "2707", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + } + } + }, + "tags": { + "$id": "2708", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "2709", + "key": { + "$id": "2710", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "2711", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "eastus2euap" + } + } + } + } + ], + "responses": [ + { + "$id": "2712", + "response": { + "$ref": "1504" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2713", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "2714", + "properties": { + "$id": "2715", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2716", + "provisioningState": { + "$id": "2717", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "2718", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2719", + "capacity": { + "$id": "2720", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2721", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "2722", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2723", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2724", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2725", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "2726", + "capacity": { + "$id": "2727", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2728", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "2729", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2730", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2731", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2732", + "name": { + "$id": "2733", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "2734", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2735", + "name": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "2737", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2738", + "name": { + "$id": "2739", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "2740", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2741", + "baseVirtualMachineProfile": { + "$id": "2742", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "2743", + "storageProfile": { + "$id": "2744", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2745", + "imageReference": { + "$id": "2746", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "2747", + "publisher": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "canonical" + }, + "offer": { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "2750", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "2751", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "2752", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "2753", + "caching": { + "$id": "2754", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "2755", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "2756", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "2757", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2758", + "storageAccountType": { + "$id": "2759", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "2760", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "2761", + "computerNamePrefix": { + "$id": "2762", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "2763", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "2764", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2765", + "disablePasswordAuthentication": { + "$id": "2766", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "2767", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "2768", + "networkInterfaceConfigurations": { + "$id": "2769", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "2770", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "2771", + "name": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2773", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "2774", + "primary": { + "$id": "2775", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2776", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": false + }, + "ipConfigurations": { + "$id": "2777", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "2778", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "2779", + "name": { + "$id": "2780", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2781", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "2782", + "subnet": { + "$id": "2783", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2784", + "id": { + "$id": "2785", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2786", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "2787", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "2788", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2789", + "id": { + "$id": "2790", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2791", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "2792", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "2793", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2794", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2795", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "2796", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "2797", + "key": { + "$id": "2798", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "2799", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "2800", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2801", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "testFleet" + }, + "type": { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + }, + { + "$id": "2803", + "response": { + "$ref": "1505" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2804", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "2805", + "properties": { + "$id": "2806", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2807", + "provisioningState": { + "$id": "2808", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "2809", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2810", + "capacity": { + "$id": "2811", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2812", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "2813", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2814", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2815", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2816", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "2817", + "capacity": { + "$id": "2818", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2819", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2821", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2822", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2823", + "name": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "2825", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2826", + "name": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "2828", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2829", + "name": { + "$id": "2830", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "2831", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2832", + "baseVirtualMachineProfile": { + "$id": "2833", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "2834", + "storageProfile": { + "$id": "2835", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2836", + "imageReference": { + "$id": "2837", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "2838", + "publisher": { + "$id": "2839", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "canonical" + }, + "offer": { + "$id": "2840", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "2841", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "2842", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "2843", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "2844", + "caching": { + "$id": "2845", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "2846", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "2847", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "2848", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2849", + "storageAccountType": { + "$id": "2850", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "2851", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "2852", + "computerNamePrefix": { + "$id": "2853", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "2854", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "2855", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2856", + "disablePasswordAuthentication": { + "$id": "2857", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "2858", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "2859", + "networkInterfaceConfigurations": { + "$id": "2860", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "2861", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "2862", + "name": { + "$id": "2863", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2864", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "2865", + "primary": { + "$id": "2866", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2867", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": false + }, + "ipConfigurations": { + "$id": "2868", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "2869", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "2870", + "name": { + "$id": "2871", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2872", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "2873", + "subnet": { + "$id": "2874", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2875", + "id": { + "$id": "2876", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2877", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "2878", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "2879", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2880", + "id": { + "$id": "2881", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2882", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "2883", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "2884", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2885", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2886", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "2887", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "2888", + "key": { + "$id": "2889", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "2890", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "2891", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2892", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "testFleet" + }, + "type": { + "$id": "2893", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + } + ] + } + ] + }, + { + "$id": "2894", + "Name": "update", + "ResourceName": "Fleet", + "Description": "Update a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2895", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2897", + "Type": { + "$id": "2898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2899", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2900", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2902", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2904", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "2905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2906", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2907", + "kind": "constant", + "valueType": { + "$id": "2908", + "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": "2909", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2910", + "kind": "constant", + "valueType": { + "$id": "2911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "2912", + "Name": "properties", + "NameInRequest": "properties", + "Description": "The resource properties to be updated.", + "Type": { + "$ref": "915" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2913", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "342" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2914", + "StatusCodes": [ + 202 + ], + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "2915", + "Name": "location", + "NameInResponse": "Location", + "Description": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "2916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2917", + "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": "2918", + "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": "2919", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "2920", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "342" + }, + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.update", + "Decorators": [], + "Examples": [ + { + "$id": "2921", + "kind": "http", + "name": "Fleets_Update", + "description": "Fleets_Update", + "filePath": "2024-11-01/Fleets_Update.json", + "parameters": [ + { + "$id": "2922", + "parameter": { + "$ref": "2895" + }, + "value": { + "$id": "2923", + "kind": "string", + "type": { + "$ref": "2896" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2924", + "parameter": { + "$ref": "2899" + }, + "value": { + "$id": "2925", + "kind": "string", + "type": { + "$ref": "2900" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "2926", + "parameter": { + "$ref": "2902" + }, + "value": { + "$id": "2927", + "kind": "string", + "type": { + "$ref": "2903" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "2928", + "parameter": { + "$ref": "2904" + }, + "value": { + "$id": "2929", + "kind": "string", + "type": { + "$ref": "2905" + }, + "value": "testFleet" + } + }, + { + "$id": "2930", + "parameter": { + "$ref": "2912" + }, + "value": { + "$id": "2931", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "2932", + "identity": { + "$id": "2933", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2934", + "type": { + "$id": "2935", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2936", + "kind": "dict", + "type": { + "$ref": "924" + }, + "value": { + "$id": "2937" + } + } + } + }, + "tags": { + "$id": "2938", + "kind": "dict", + "type": { + "$ref": "917" + }, + "value": { + "$id": "2939" + } + }, + "properties": { + "$id": "2940", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2941", + "spotPriorityProfile": { + "$id": "2942", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2943", + "capacity": { + "$id": "2944", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2945", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "2946", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2947", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2948", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2949", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2950", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "2951", + "capacity": { + "$id": "2952", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2953", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2954", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2955", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2956", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2957", + "name": { + "$id": "2958", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2959", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2960", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2961", + "baseVirtualMachineProfile": { + "$id": "2962", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "2963", + "osProfile": { + "$id": "2964", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "2965", + "computerNamePrefix": { + "$id": "2966", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2967", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "2968", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "2969", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "2970", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "2971", + "provisionVMAgent": { + "$id": "2972", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2973", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "2974", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2975", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "2976", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2977", + "passName": { + "$id": "2978", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2979", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "2982", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "2983", + "patchMode": { + "$id": "2984", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2985", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "2986", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2987", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2988", + "rebootSetting": { + "$id": "2989", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2990", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2991", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "2992", + "listeners": { + "$id": "2993", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "2994", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2995", + "protocol": { + "$id": "2996", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "2997", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2998", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2999", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "3000", + "disablePasswordAuthentication": { + "$id": "3001", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "3002", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "3003", + "publicKeys": { + "$id": "3004", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "3005", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "3006", + "path": { + "$id": "3007", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3008", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3009", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "3010", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3011", + "patchMode": { + "$id": "3012", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3013", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3014", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "3015", + "rebootSetting": { + "$id": "3016", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3017", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3018", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3019", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "3020", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "3021", + "sourceVault": { + "$id": "3022", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3023", + "id": { + "$id": "3024", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3025", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "3026", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "3027", + "certificateUrl": { + "$id": "3028", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3030", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3031", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3032", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3033", + "imageReference": { + "$id": "3034", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "3035", + "publisher": { + "$id": "3036", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3037", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3038", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3039", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "3040", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3041", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "3042", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3043", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3044", + "name": { + "$id": "3045", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3046", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3047", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "3048", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3049", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "3050", + "option": { + "$id": "3051", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3052", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3053", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "3054", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3055", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "3056", + "uri": { + "$id": "3057", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3058", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3060", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "3061", + "storageAccountType": { + "$id": "3062", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3063", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3064", + "id": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3066", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "3067", + "securityEncryptionType": { + "$id": "3068", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3069", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3070", + "id": { + "$id": "3071", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3072", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3073", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "3074", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3075", + "name": { + "$id": "3076", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3077", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3079", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "3080", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3081", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3082", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "3083", + "storageAccountType": { + "$id": "3084", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3085", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3086", + "id": { + "$id": "3087", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3088", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "3089", + "securityEncryptionType": { + "$id": "3090", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3091", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3092", + "id": { + "$id": "3093", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3094", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3095", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3096", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3097", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "3098", + "healthProbe": { + "$id": "3099", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3100", + "id": { + "$id": "3101", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3102", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "3103", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "3104", + "name": { + "$id": "3105", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "3106", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "3107", + "primary": { + "$id": "3108", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3109", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3110", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "3111", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3112", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3113", + "id": { + "$id": "3114", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3115", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "3116", + "dnsServers": { + "$id": "3117", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "3118", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3119", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "3120", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "3121", + "name": { + "$id": "3122", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3123", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "3124", + "subnet": { + "$id": "3125", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3126", + "id": { + "$id": "3127", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3128", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3129", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "3130", + "name": { + "$id": "3131", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3132", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3133", + "idleTimeoutInMinutes": { + "$id": "3134", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3135", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3136", + "domainNameLabel": { + "$id": "3137", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3138", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3139", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "3140", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3141", + "ipTagType": { + "$id": "3142", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3143", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3144", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3145", + "id": { + "$id": "3146", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3147", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3148", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3149", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "3150", + "name": { + "$id": "3151", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3152", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3154", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "3155", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3156", + "id": { + "$id": "3157", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3158", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "3159", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3160", + "id": { + "$id": "3161", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3162", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "3163", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3164", + "id": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3166", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "3167", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3168", + "id": { + "$id": "3169", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3170", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "3171", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3172", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3173", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3174", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3175", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3176", + "uefiSettings": { + "$id": "3177", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3178", + "secureBootEnabled": { + "$id": "3179", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3180", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3181", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "3182", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3183", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "3184", + "userAssignedIdentityResourceId": { + "$id": "3185", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3186", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3187", + "enabled": { + "$id": "3188", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "3189", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3190", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3191", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "3192", + "bootDiagnostics": { + "$id": "3193", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3194", + "enabled": { + "$id": "3195", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "3196", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3197", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3198", + "extensions": { + "$id": "3199", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "3200", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "3201", + "name": { + "$id": "3202", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "3203", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3204", + "forceUpdateTag": { + "$id": "3205", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3206", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3207", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3208", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3209", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3210", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "settings": { + "$id": "3211", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3212" + } + }, + "protectedSettings": { + "$id": "3213", + "kind": "dict", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3214" + } + }, + "provisionAfterExtensions": { + "$id": "3215", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "3216", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3217", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3218", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "3219", + "secretUrl": { + "$id": "3220", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3221", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3222", + "id": { + "$id": "3223", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3224", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3225", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3226", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "3227", + "terminateNotificationProfile": { + "$id": "3228", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "3229", + "notBeforeTimeout": { + "$id": "3230", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3231", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3232", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "3233", + "notBeforeTimeout": { + "$id": "3234", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3235", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3236", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3237", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "3238", + "capacityReservationGroup": { + "$id": "3239", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3240", + "id": { + "$id": "3241", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3242", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3243", + "galleryApplications": { + "$id": "3244", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "3245", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "3246", + "tags": { + "$id": "3247", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3248", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3249", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "3250", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3251", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3252", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3253", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "3254", + "vmSizeProperties": { + "$id": "3255", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3256", + "vCPUsAvailable": { + "$id": "3257", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3258", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3259", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3260", + "id": { + "$id": "3261", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3262", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "3263", + "id": { + "$id": "3264", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3265", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "3266", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3267", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "3268", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3269", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + } + } + }, + "plan": { + "$id": "3270", + "kind": "model", + "type": { + "$ref": "927" + }, + "value": { + "$id": "3271", + "name": { + "$id": "3272", + "kind": "string", + "type": { + "$ref": "929" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "3273", + "kind": "string", + "type": { + "$ref": "931" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "3274", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "935" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "3276", + "kind": "string", + "type": { + "$ref": "937" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3277", + "response": { + "$ref": "2913" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3278", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "3279", + "properties": { + "$id": "3280", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "3281", + "spotPriorityProfile": { + "$id": "3282", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "3283", + "capacity": { + "$id": "3284", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3285", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3286", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3287", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3288", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3289", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3290", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "3291", + "capacity": { + "$id": "3292", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3293", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3294", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3295", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "3296", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "3297", + "name": { + "$id": "3298", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3299", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3300", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3301", + "baseVirtualMachineProfile": { + "$id": "3302", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "3303", + "osProfile": { + "$id": "3304", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "3305", + "computerNamePrefix": { + "$id": "3306", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "3307", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "3308", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "3309", + "provisionVMAgent": { + "$id": "3310", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "3311", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "3312", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "3313", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "3314", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "3315", + "passName": { + "$id": "3316", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3317", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3318", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "3319", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "3320", + "patchMode": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3322", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "3323", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3324", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "3325", + "rebootSetting": { + "$id": "3326", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3327", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3328", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "3329", + "listeners": { + "$id": "3330", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "3331", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "3332", + "protocol": { + "$id": "3333", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3334", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3335", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3336", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "3337", + "disablePasswordAuthentication": { + "$id": "3338", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "3339", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "3340", + "publicKeys": { + "$id": "3341", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "3342", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "3343", + "path": { + "$id": "3344", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3345", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3346", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "3347", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3348", + "patchMode": { + "$id": "3349", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3350", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3351", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "3352", + "rebootSetting": { + "$id": "3353", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3354", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3355", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3356", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "3357", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "3358", + "sourceVault": { + "$id": "3359", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3360", + "id": { + "$id": "3361", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3362", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "3363", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "3364", + "certificateUrl": { + "$id": "3365", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3366", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3367", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3368", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3369", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3370", + "imageReference": { + "$id": "3371", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "3372", + "publisher": { + "$id": "3373", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3374", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3375", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3376", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "3377", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3378", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "3379", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + }, + "exactVersion": { + "$id": "3380", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "zjbntmiskjexlr" + } + } + }, + "osDisk": { + "$id": "3381", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3382", + "name": { + "$id": "3383", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3384", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3385", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "3386", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3387", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "3388", + "option": { + "$id": "3389", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3390", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3391", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "3392", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3393", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "3394", + "uri": { + "$id": "3395", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3396", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "3397", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3398", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "3399", + "storageAccountType": { + "$id": "3400", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3401", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3402", + "id": { + "$id": "3403", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3404", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "3405", + "securityEncryptionType": { + "$id": "3406", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3407", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3408", + "id": { + "$id": "3409", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3410", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3411", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "3412", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3413", + "name": { + "$id": "3414", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3415", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "3416", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3417", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "3418", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3419", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3420", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "3421", + "storageAccountType": { + "$id": "3422", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3423", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3424", + "id": { + "$id": "3425", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3426", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "3427", + "securityEncryptionType": { + "$id": "3428", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3429", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3430", + "id": { + "$id": "3431", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3432", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3433", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3434", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3435", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "3436", + "healthProbe": { + "$id": "3437", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3438", + "id": { + "$id": "3439", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3440", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "3441", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "3442", + "name": { + "$id": "3443", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "3444", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "3445", + "primary": { + "$id": "3446", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3447", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3448", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "3449", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3450", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3451", + "id": { + "$id": "3452", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3453", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "3454", + "dnsServers": { + "$id": "3455", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3457", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "3458", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "3459", + "name": { + "$id": "3460", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3461", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "3462", + "subnet": { + "$id": "3463", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3464", + "id": { + "$id": "3465", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3466", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3467", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "3468", + "name": { + "$id": "3469", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3470", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3471", + "idleTimeoutInMinutes": { + "$id": "3472", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3473", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3474", + "domainNameLabel": { + "$id": "3475", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3476", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3477", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "3478", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3479", + "ipTagType": { + "$id": "3480", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3481", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3482", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3483", + "id": { + "$id": "3484", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3485", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3486", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3487", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "3488", + "name": { + "$id": "3489", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3490", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3491", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3492", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "3493", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3494", + "id": { + "$id": "3495", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3496", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "3497", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3498", + "id": { + "$id": "3499", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3500", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "3501", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3502", + "id": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3504", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "3505", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3506", + "id": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3508", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "3509", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3510", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3511", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3512", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3513", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3514", + "uefiSettings": { + "$id": "3515", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3516", + "secureBootEnabled": { + "$id": "3517", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3518", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3519", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "3520", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3521", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "3522", + "userAssignedIdentityResourceId": { + "$id": "3523", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3524", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3525", + "enabled": { + "$id": "3526", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "3527", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3528", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3529", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "3530", + "bootDiagnostics": { + "$id": "3531", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3532", + "enabled": { + "$id": "3533", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "3534", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3535", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3536", + "extensions": { + "$id": "3537", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "3538", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "3539", + "name": { + "$id": "3540", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "3541", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3542", + "forceUpdateTag": { + "$id": "3543", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3544", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3545", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3546", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3547", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3548", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "provisionAfterExtensions": { + "$id": "3549", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "3550", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3551", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3552", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "3553", + "secretUrl": { + "$id": "3554", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3555", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3556", + "id": { + "$id": "3557", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + }, + "settings": { + "$id": "3558", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3559" + } + }, + "provisioningState": { + "$id": "3560", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Succeeded" + } + } + }, + "type": { + "$id": "3561", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "cmeam" + }, + "id": { + "$id": "3562", + "kind": "string", + "type": { + "$ref": "738" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3563", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3564", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3565", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "3566", + "terminateNotificationProfile": { + "$id": "3567", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "3568", + "notBeforeTimeout": { + "$id": "3569", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3570", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3571", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "3572", + "notBeforeTimeout": { + "$id": "3573", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3574", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3575", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3576", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "3577", + "capacityReservationGroup": { + "$id": "3578", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3579", + "id": { + "$id": "3580", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3581", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3582", + "galleryApplications": { + "$id": "3583", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "3584", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "3585", + "tags": { + "$id": "3586", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3587", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3588", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3589", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3590", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3591", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "3592", + "vmSizeProperties": { + "$id": "3593", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3594", + "vCPUsAvailable": { + "$id": "3595", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3596", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3597", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3598", + "id": { + "$id": "3599", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3600", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "3601", + "id": { + "$id": "3602", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3603", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "3604", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3605", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "3606", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "3607", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3608", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "provisioningState": { + "$id": "3609", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "timeCreated": { + "$id": "3610", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3611", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "3612", + "kind": "array", + "type": { + "$ref": "863" + }, + "value": [ + { + "$id": "3613", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone1" + }, + { + "$id": "3614", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "3615", + "kind": "model", + "type": { + "$ref": "866" + }, + "value": { + "$id": "3616", + "type": { + "$id": "3617", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3618", + "kind": "dict", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3619" + } + }, + "principalId": { + "$id": "3620", + "kind": "string", + "type": { + "$ref": "868" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "3621", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + }, + "tags": { + "$id": "3622", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "3623" + } + }, + "location": { + "$id": "3624", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "westus" + }, + "plan": { + "$id": "3625", + "kind": "model", + "type": { + "$ref": "886" + }, + "value": { + "$id": "3626", + "name": { + "$id": "3627", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "uapfngmdekvpgjhomthtpxjfdmmll" + }, + "publisher": { + "$id": "3628", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "aqhles" + }, + "product": { + "$id": "3629", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "bfzbkdnbexmedxdc" + }, + "promotionCode": { + "$id": "3630", + "kind": "string", + "type": { + "$ref": "894" + }, + "value": "gspehogwfjxirz" + }, + "version": { + "$id": "3631", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "yza" + } + } + }, + "id": { + "$id": "3632", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3633", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "testFleet" + }, + "type": { + "$id": "3634", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "3635", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "3636", + "createdBy": { + "$id": "3637", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "3638", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "3639", + "kind": "string", + "type": { + "$ref": "358" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "3640", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "3641", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3642", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "3643", + "response": { + "$ref": "2914" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "3644", + "Name": "delete", + "ResourceName": "Fleet", + "Description": "Delete a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3645", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3647", + "Type": { + "$id": "3648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3649", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3650", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3652", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3654", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "3655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3656", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3657", + "kind": "constant", + "valueType": { + "$id": "3658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3659", + "StatusCodes": [ + 202 + ], + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "3660", + "Name": "location", + "NameInResponse": "Location", + "Description": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "3661", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3662", + "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": "3663", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "3664", + "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": "3665", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "3666", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.delete", + "Decorators": [], + "Examples": [ + { + "$id": "3667", + "kind": "http", + "name": "Fleets_Delete", + "description": "Fleets_Delete", + "filePath": "2024-11-01/Fleets_Delete.json", + "parameters": [ + { + "$id": "3668", + "parameter": { + "$ref": "3645" + }, + "value": { + "$id": "3669", + "kind": "string", + "type": { + "$ref": "3646" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3670", + "parameter": { + "$ref": "3649" + }, + "value": { + "$id": "3671", + "kind": "string", + "type": { + "$ref": "3650" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3672", + "parameter": { + "$ref": "3652" + }, + "value": { + "$id": "3673", + "kind": "string", + "type": { + "$ref": "3653" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3674", + "parameter": { + "$ref": "3654" + }, + "value": { + "$id": "3675", + "kind": "string", + "type": { + "$ref": "3655" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "3676", + "response": { + "$ref": "3659" + }, + "statusCode": 202 + }, + { + "$id": "3677", + "response": { + "$ref": "3664" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3678", + "Name": "listByResourceGroup", + "ResourceName": "Fleet", + "Description": "List Fleet resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3679", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3681", + "Type": { + "$id": "3682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3683", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3684", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3686", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3688", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3689", + "kind": "constant", + "valueType": { + "$id": "3690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3691", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "939" + }, + "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": "3692", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "3693", + "kind": "http", + "name": "Fleets_ListByResourceGroup", + "description": "Fleets_ListByResourceGroup", + "filePath": "2024-11-01/Fleets_ListByResourceGroup.json", + "parameters": [ + { + "$id": "3694", + "parameter": { + "$ref": "3679" + }, + "value": { + "$id": "3695", + "kind": "string", + "type": { + "$ref": "3680" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3696", + "parameter": { + "$ref": "3683" + }, + "value": { + "$id": "3697", + "kind": "string", + "type": { + "$ref": "3684" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3698", + "parameter": { + "$ref": "3686" + }, + "value": { + "$id": "3699", + "kind": "string", + "type": { + "$ref": "3687" + }, + "value": "rgazurefleet" + } + } + ], + "responses": [ + { + "$id": "3700", + "response": { + "$ref": "3691" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3701", + "kind": "model", + "type": { + "$ref": "939" + }, + "value": { + "$id": "3702", + "value": { + "$id": "3703", + "kind": "array", + "type": { + "$ref": "941" + }, + "value": [ + { + "$id": "3704", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "3705", + "properties": { + "$id": "3706", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "3707", + "provisioningState": { + "$id": "3708", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "3709", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "3710", + "capacity": { + "$id": "3711", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3712", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3713", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3714", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3715", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3716", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3717", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "3718", + "capacity": { + "$id": "3719", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3720", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3721", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3722", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "3723", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "3724", + "name": { + "$id": "3725", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3726", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3727", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3728", + "baseVirtualMachineProfile": { + "$id": "3729", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "3730", + "osProfile": { + "$id": "3731", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "3732", + "computerNamePrefix": { + "$id": "3733", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "3734", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "3735", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "3736", + "provisionVMAgent": { + "$id": "3737", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "3738", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "3739", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "3740", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "3741", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "3742", + "passName": { + "$id": "3743", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3744", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3745", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "3746", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "3747", + "patchMode": { + "$id": "3748", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3749", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "3750", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3751", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "3752", + "rebootSetting": { + "$id": "3753", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3754", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3755", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "3756", + "listeners": { + "$id": "3757", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "3758", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "3759", + "protocol": { + "$id": "3760", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3761", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3762", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3763", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "3764", + "disablePasswordAuthentication": { + "$id": "3765", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "3766", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "3767", + "publicKeys": { + "$id": "3768", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "3769", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "3770", + "path": { + "$id": "3771", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3772", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3773", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "3774", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3775", + "patchMode": { + "$id": "3776", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3777", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3778", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "3779", + "rebootSetting": { + "$id": "3780", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3781", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3782", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3783", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "3784", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "3785", + "sourceVault": { + "$id": "3786", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3787", + "id": { + "$id": "3788", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3789", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "3790", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "3791", + "certificateUrl": { + "$id": "3792", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3793", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3794", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3795", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3796", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3797", + "imageReference": { + "$id": "3798", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "3799", + "publisher": { + "$id": "3800", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3801", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3802", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3803", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "3804", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "3805", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3806", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "3807", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3808", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3809", + "name": { + "$id": "3810", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3811", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3812", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "3813", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3814", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "3815", + "option": { + "$id": "3816", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3817", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3818", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "3819", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3820", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "3821", + "uri": { + "$id": "3822", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3823", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "3824", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3825", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "3826", + "storageAccountType": { + "$id": "3827", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3828", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3829", + "id": { + "$id": "3830", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3831", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "3832", + "securityEncryptionType": { + "$id": "3833", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3834", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3835", + "id": { + "$id": "3836", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3837", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3838", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "3839", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3840", + "name": { + "$id": "3841", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3842", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "3843", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3844", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "3845", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3846", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3847", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "3848", + "storageAccountType": { + "$id": "3849", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3850", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3851", + "id": { + "$id": "3852", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3853", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "3854", + "securityEncryptionType": { + "$id": "3855", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3856", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "3857", + "id": { + "$id": "3858", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3859", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3860", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3861", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3862", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "3863", + "healthProbe": { + "$id": "3864", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3865", + "id": { + "$id": "3866", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3867", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "3868", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "3869", + "name": { + "$id": "3870", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "3871", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "3872", + "primary": { + "$id": "3873", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3874", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3875", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "3876", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3877", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3878", + "id": { + "$id": "3879", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3880", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "3881", + "dnsServers": { + "$id": "3882", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "3883", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3884", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "3885", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "3886", + "name": { + "$id": "3887", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3888", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "3889", + "subnet": { + "$id": "3890", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3891", + "id": { + "$id": "3892", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3893", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3894", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "3895", + "name": { + "$id": "3896", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3897", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3898", + "idleTimeoutInMinutes": { + "$id": "3899", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3900", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3901", + "domainNameLabel": { + "$id": "3902", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3903", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3904", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "3905", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3906", + "ipTagType": { + "$id": "3907", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3908", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3909", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3910", + "id": { + "$id": "3911", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3912", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3913", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3914", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "3915", + "name": { + "$id": "3916", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3917", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3918", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3919", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "3920", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3921", + "id": { + "$id": "3922", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3923", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "3924", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3925", + "id": { + "$id": "3926", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3927", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "3928", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3929", + "id": { + "$id": "3930", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3931", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "3932", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3933", + "id": { + "$id": "3934", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3935", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "3936", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3937", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3938", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3940", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3941", + "uefiSettings": { + "$id": "3942", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3943", + "secureBootEnabled": { + "$id": "3944", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3945", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3946", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "3947", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3948", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "3949", + "userAssignedIdentityResourceId": { + "$id": "3950", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3951", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3952", + "enabled": { + "$id": "3953", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "3954", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3955", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3956", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "3957", + "bootDiagnostics": { + "$id": "3958", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3959", + "enabled": { + "$id": "3960", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "3961", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3962", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3963", + "extensions": { + "$id": "3964", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "3965", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "3966", + "name": { + "$id": "3967", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "3968", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "cmeam" + }, + "properties": { + "$id": "3969", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3970", + "forceUpdateTag": { + "$id": "3971", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3972", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3973", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3974", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3975", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3976", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "settings": { + "$id": "3977", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3978" + } + }, + "provisioningState": { + "$id": "3979", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "3980", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "3981", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3982", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3983", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "3984", + "secretUrl": { + "$id": "3985", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3986", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "3987", + "id": { + "$id": "3988", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "3989", + "kind": "string", + "type": { + "$ref": "738" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3990", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3991", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3992", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "3993", + "terminateNotificationProfile": { + "$id": "3994", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "3995", + "notBeforeTimeout": { + "$id": "3996", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3997", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3998", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "3999", + "notBeforeTimeout": { + "$id": "4000", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4001", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4002", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4003", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "4004", + "capacityReservationGroup": { + "$id": "4005", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4006", + "id": { + "$id": "4007", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4008", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4009", + "galleryApplications": { + "$id": "4010", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "4011", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "4012", + "tags": { + "$id": "4013", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4014", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4015", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4016", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4017", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4018", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "4019", + "vmSizeProperties": { + "$id": "4020", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "4021", + "vCPUsAvailable": { + "$id": "4022", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4023", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4024", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "4025", + "id": { + "$id": "4026", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4027", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "4028", + "id": { + "$id": "4029", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "4030", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "4031", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4032", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4033", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4034", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4035", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "4036", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4037", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4038", + "kind": "array", + "type": { + "$ref": "863" + }, + "value": [ + { + "$id": "4039", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone1" + }, + { + "$id": "4040", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4041", + "kind": "model", + "type": { + "$ref": "866" + }, + "value": { + "$id": "4042", + "principalId": { + "$id": "4043", + "kind": "string", + "type": { + "$ref": "868" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4044", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "4045", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4046", + "kind": "dict", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4047", + "key9851": { + "$id": "4048", + "kind": "model", + "type": { + "$ref": "878" + }, + "value": { + "$id": "4049", + "principalId": { + "$id": "4050", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "4051", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "4052", + "kind": "model", + "type": { + "$ref": "886" + }, + "value": { + "$id": "4053", + "name": { + "$id": "4054", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4055", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4056", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4057", + "kind": "string", + "type": { + "$ref": "894" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4058", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "4059", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "4060", + "key3518": { + "$id": "4061", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "4062", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "westus" + }, + "id": { + "$id": "4063", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4064", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "testFleet" + }, + "type": { + "$id": "4065", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4066", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "4067", + "createdBy": { + "$id": "4068", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4069", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "4070", + "kind": "string", + "type": { + "$ref": "358" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4071", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4072", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4073", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4074", + "kind": "string", + "type": { + "$ref": "943" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "4075", + "Name": "listBySubscription", + "ResourceName": "Fleet", + "Description": "List Fleet resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4076", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "4077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4078", + "Type": { + "$id": "4079", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4080", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4081", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4083", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4084", + "kind": "constant", + "valueType": { + "$id": "4085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4086", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "939" + }, + "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": "4087", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "4088", + "kind": "http", + "name": "Fleets_ListBySubscription", + "description": "Fleets_ListBySubscription", + "filePath": "2024-11-01/Fleets_ListBySubscription.json", + "parameters": [ + { + "$id": "4089", + "parameter": { + "$ref": "4076" + }, + "value": { + "$id": "4090", + "kind": "string", + "type": { + "$ref": "4077" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4091", + "parameter": { + "$ref": "4080" + }, + "value": { + "$id": "4092", + "kind": "string", + "type": { + "$ref": "4081" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + } + ], + "responses": [ + { + "$id": "4093", + "response": { + "$ref": "4086" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4094", + "kind": "model", + "type": { + "$ref": "939" + }, + "value": { + "$id": "4095", + "value": { + "$id": "4096", + "kind": "array", + "type": { + "$ref": "941" + }, + "value": [ + { + "$id": "4097", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "4098", + "properties": { + "$id": "4099", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "4100", + "provisioningState": { + "$id": "4101", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4102", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "4103", + "capacity": { + "$id": "4104", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4105", + "kind": "number", + "type": { + "$ref": "380" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4106", + "kind": "number", + "type": { + "$ref": "382" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4107", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4108", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4109", + "kind": "boolean", + "type": { + "$ref": "386" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4110", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "4111", + "capacity": { + "$id": "4112", + "kind": "number", + "type": { + "$ref": "390" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4113", + "kind": "number", + "type": { + "$ref": "392" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4114", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4115", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "4116", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "4117", + "name": { + "$id": "4118", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4119", + "kind": "number", + "type": { + "$ref": "400" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4120", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "4121", + "baseVirtualMachineProfile": { + "$id": "4122", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "4123", + "osProfile": { + "$id": "4124", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "4125", + "computerNamePrefix": { + "$id": "4126", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4127", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4128", + "kind": "model", + "type": { + "$ref": "462" + }, + "value": { + "$id": "4129", + "provisionVMAgent": { + "$id": "4130", + "kind": "boolean", + "type": { + "$ref": "464" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4131", + "kind": "boolean", + "type": { + "$ref": "466" + }, + "value": true + }, + "timeZone": { + "$id": "4132", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4133", + "kind": "array", + "type": { + "$ref": "470" + }, + "value": [ + { + "$id": "4134", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "4135", + "passName": { + "$id": "4136", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4137", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4138", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4139", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "4140", + "patchMode": { + "$id": "4141", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4142", + "kind": "boolean", + "type": { + "$ref": "483" + }, + "value": true + }, + "assessmentMode": { + "$id": "4143", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4144", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "4145", + "rebootSetting": { + "$id": "4146", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4147", + "kind": "boolean", + "type": { + "$ref": "489" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4148", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "4149", + "listeners": { + "$id": "4150", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "4151", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "4152", + "protocol": { + "$id": "4153", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4154", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4155", + "kind": "boolean", + "type": { + "$ref": "499" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4156", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "4157", + "disablePasswordAuthentication": { + "$id": "4158", + "kind": "boolean", + "type": { + "$ref": "503" + }, + "value": true + }, + "ssh": { + "$id": "4159", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "4160", + "publicKeys": { + "$id": "4161", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "4162", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "4163", + "path": { + "$id": "4164", + "kind": "string", + "type": { + "$ref": "510" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4165", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4166", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "patchSettings": { + "$id": "4167", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "4168", + "patchMode": { + "$id": "4169", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4170", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4171", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "4172", + "rebootSetting": { + "$id": "4173", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4174", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4175", + "kind": "boolean", + "type": { + "$ref": "525" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4176", + "kind": "array", + "type": { + "$ref": "527" + }, + "value": [ + { + "$id": "4177", + "kind": "model", + "type": { + "$ref": "528" + }, + "value": { + "$id": "4178", + "sourceVault": { + "$id": "4179", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4180", + "id": { + "$id": "4181", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4182", + "kind": "array", + "type": { + "$ref": "535" + }, + "value": [ + { + "$id": "4183", + "kind": "model", + "type": { + "$ref": "536" + }, + "value": { + "$id": "4184", + "certificateUrl": { + "$id": "4185", + "kind": "string", + "type": { + "$ref": "538" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4186", + "kind": "string", + "type": { + "$ref": "540" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4187", + "kind": "boolean", + "type": { + "$ref": "542" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4188", + "kind": "boolean", + "type": { + "$ref": "544" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4189", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "4190", + "imageReference": { + "$id": "4191", + "kind": "model", + "type": { + "$ref": "548" + }, + "value": { + "$id": "4192", + "publisher": { + "$id": "4193", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4194", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "557" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4196", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4197", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4198", + "kind": "string", + "type": { + "$ref": "563" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4199", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "vlqe" + }, + "id": { + "$id": "4200", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4201", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "4202", + "name": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4204", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4205", + "kind": "boolean", + "type": { + "$ref": "572" + }, + "value": true + }, + "createOption": { + "$id": "4206", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4207", + "kind": "model", + "type": { + "$ref": "575" + }, + "value": { + "$id": "4208", + "option": { + "$id": "4209", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "4210", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4211", + "kind": "number", + "type": { + "$ref": "579" + }, + "value": 14 + }, + "osType": { + "$id": "4212", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "4213", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "4214", + "uri": { + "$id": "4215", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4216", + "kind": "array", + "type": { + "$ref": "586" + }, + "value": [ + { + "$id": "4217", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4218", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "4219", + "storageAccountType": { + "$id": "4220", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4221", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "4222", + "id": { + "$id": "4223", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4224", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "4225", + "securityEncryptionType": { + "$id": "4226", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4227", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "4228", + "id": { + "$id": "4229", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4230", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4231", + "kind": "array", + "type": { + "$ref": "602" + }, + "value": [ + { + "$id": "4232", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "4233", + "name": { + "$id": "4234", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4235", + "kind": "number", + "type": { + "$ref": "607" + }, + "value": 14 + }, + "caching": { + "$id": "4236", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4237", + "kind": "boolean", + "type": { + "$ref": "610" + }, + "value": true + }, + "createOption": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4239", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4240", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "4241", + "storageAccountType": { + "$id": "4242", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4243", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "4244", + "id": { + "$id": "4245", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4246", + "kind": "model", + "type": { + "$ref": "597" + }, + "value": { + "$id": "4247", + "securityEncryptionType": { + "$id": "4248", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4249", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "4250", + "id": { + "$id": "4251", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4252", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4253", + "kind": "number", + "type": { + "$ref": "618" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4254", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "4255", + "kind": "model", + "type": { + "$ref": "622" + }, + "value": { + "$id": "4256", + "healthProbe": { + "$id": "4257", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "4258", + "id": { + "$id": "4259", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4260", + "kind": "array", + "type": { + "$ref": "629" + }, + "value": [ + { + "$id": "4261", + "kind": "model", + "type": { + "$ref": "630" + }, + "value": { + "$id": "4262", + "name": { + "$id": "4263", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "i" + }, + "properties": { + "$id": "4264", + "kind": "model", + "type": { + "$ref": "634" + }, + "value": { + "$id": "4265", + "primary": { + "$id": "4266", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4267", + "kind": "boolean", + "type": { + "$ref": "638" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4268", + "kind": "boolean", + "type": { + "$ref": "640" + }, + "value": true + }, + "enableFpga": { + "$id": "4269", + "kind": "boolean", + "type": { + "$ref": "642" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4270", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4271", + "id": { + "$id": "4272", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4273", + "kind": "model", + "type": { + "$ref": "645" + }, + "value": { + "$id": "4274", + "dnsServers": { + "$id": "4275", + "kind": "array", + "type": { + "$ref": "647" + }, + "value": [ + { + "$id": "4276", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4277", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "4278", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "4279", + "name": { + "$id": "4280", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4281", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "$id": "4282", + "subnet": { + "$id": "4283", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "4284", + "id": { + "$id": "4285", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4286", + "kind": "boolean", + "type": { + "$ref": "658" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4287", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "4288", + "name": { + "$id": "4289", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4290", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4291", + "idleTimeoutInMinutes": { + "$id": "4292", + "kind": "number", + "type": { + "$ref": "666" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4293", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "4294", + "domainNameLabel": { + "$id": "4295", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4296", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4297", + "kind": "array", + "type": { + "$ref": "673" + }, + "value": [ + { + "$id": "4298", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "4299", + "ipTagType": { + "$id": "4300", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4301", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4302", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4303", + "id": { + "$id": "4304", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4305", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4306", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4307", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "4308", + "name": { + "$id": "4309", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "4310", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4312", + "kind": "array", + "type": { + "$ref": "688" + }, + "value": [ + { + "$id": "4313", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4314", + "id": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4316", + "kind": "array", + "type": { + "$ref": "690" + }, + "value": [ + { + "$id": "4317", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4318", + "id": { + "$id": "4319", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4320", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "4321", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4322", + "id": { + "$id": "4323", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4324", + "kind": "array", + "type": { + "$ref": "694" + }, + "value": [ + { + "$id": "4325", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4326", + "id": { + "$id": "4327", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4328", + "kind": "boolean", + "type": { + "$ref": "696" + }, + "value": true + }, + "deleteOption": { + "$id": "4329", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4330", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4331", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4332", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4333", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "4334", + "uefiSettings": { + "$id": "4335", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "4336", + "secureBootEnabled": { + "$id": "4337", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4338", + "kind": "boolean", + "type": { + "$ref": "708" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4339", + "kind": "boolean", + "type": { + "$ref": "710" + }, + "value": true + }, + "securityType": { + "$id": "4340", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4341", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "4342", + "userAssignedIdentityResourceId": { + "$id": "4343", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4344", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "4345", + "enabled": { + "$id": "4346", + "kind": "boolean", + "type": { + "$ref": "720" + }, + "value": true + }, + "mode": { + "$id": "4347", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4348", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4349", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "4350", + "bootDiagnostics": { + "$id": "4351", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "4352", + "enabled": { + "$id": "4353", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "storageUri": { + "$id": "4354", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4355", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "4356", + "extensions": { + "$id": "4357", + "kind": "array", + "type": { + "$ref": "735" + }, + "value": [ + { + "$id": "4358", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "4359", + "name": { + "$id": "4360", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "4361", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "cmeam" + }, + "properties": { + "$id": "4362", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4363", + "forceUpdateTag": { + "$id": "4364", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4365", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4366", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4367", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4368", + "kind": "boolean", + "type": { + "$ref": "755" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4369", + "kind": "boolean", + "type": { + "$ref": "757" + }, + "value": true + }, + "settings": { + "$id": "4370", + "kind": "dict", + "type": { + "$ref": "759" + }, + "value": { + "$id": "4371" + } + }, + "provisioningState": { + "$id": "4372", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "4373", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "4374", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4375", + "kind": "boolean", + "type": { + "$ref": "772" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4376", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "4377", + "secretUrl": { + "$id": "4378", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4379", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4380", + "id": { + "$id": "4381", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "4382", + "kind": "string", + "type": { + "$ref": "738" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4383", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4384", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4385", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "4386", + "terminateNotificationProfile": { + "$id": "4387", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "4388", + "notBeforeTimeout": { + "$id": "4389", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4390", + "kind": "boolean", + "type": { + "$ref": "789" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4391", + "kind": "model", + "type": { + "$ref": "791" + }, + "value": { + "$id": "4392", + "notBeforeTimeout": { + "$id": "4393", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4394", + "kind": "boolean", + "type": { + "$ref": "795" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4395", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4396", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "4397", + "capacityReservationGroup": { + "$id": "4398", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "4399", + "id": { + "$id": "4400", + "kind": "string", + "type": { + "$ref": "532" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4401", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4402", + "galleryApplications": { + "$id": "4403", + "kind": "array", + "type": { + "$ref": "804" + }, + "value": [ + { + "$id": "4404", + "kind": "model", + "type": { + "$ref": "805" + }, + "value": { + "$id": "4405", + "tags": { + "$id": "4406", + "kind": "string", + "type": { + "$ref": "807" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4407", + "kind": "number", + "type": { + "$ref": "809" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4408", + "kind": "string", + "type": { + "$ref": "811" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4409", + "kind": "boolean", + "type": { + "$ref": "816" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4410", + "kind": "boolean", + "type": { + "$ref": "818" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4411", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "4412", + "vmSizeProperties": { + "$id": "4413", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "4414", + "vCPUsAvailable": { + "$id": "4415", + "kind": "number", + "type": { + "$ref": "824" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4416", + "kind": "number", + "type": { + "$ref": "826" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4417", + "kind": "model", + "type": { + "$ref": "828" + }, + "value": { + "$id": "4418", + "id": { + "$id": "4419", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4420", + "kind": "model", + "type": { + "$ref": "833" + }, + "value": { + "$id": "4421", + "id": { + "$id": "4422", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "4423", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "4424", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4425", + "kind": "boolean", + "type": { + "$ref": "840" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4426", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4427", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4428", + "kind": "number", + "type": { + "$ref": "850" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "4429", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4430", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4431", + "kind": "array", + "type": { + "$ref": "863" + }, + "value": [ + { + "$id": "4432", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone1" + }, + { + "$id": "4433", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4434", + "kind": "model", + "type": { + "$ref": "866" + }, + "value": { + "$id": "4435", + "principalId": { + "$id": "4436", + "kind": "string", + "type": { + "$ref": "868" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4437", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "4438", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4439", + "kind": "dict", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4440", + "key9851": { + "$id": "4441", + "kind": "model", + "type": { + "$ref": "878" + }, + "value": { + "$id": "4442", + "principalId": { + "$id": "4443", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "4444", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "4445", + "kind": "model", + "type": { + "$ref": "886" + }, + "value": { + "$id": "4446", + "name": { + "$id": "4447", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4449", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4450", + "kind": "string", + "type": { + "$ref": "894" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4451", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "4452", + "kind": "dict", + "type": { + "$ref": "367" + }, + "value": { + "$id": "4453", + "key3518": { + "$id": "4454", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "371" + }, + "value": "westus" + }, + "id": { + "$id": "4456", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4457", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "testFleet" + }, + "type": { + "$id": "4458", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4459", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "4460", + "createdBy": { + "$id": "4461", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4462", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "4463", + "kind": "string", + "type": { + "$ref": "358" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4464", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4465", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4466", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4467", + "kind": "string", + "type": { + "$ref": "943" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "4468", + "Name": "listVirtualMachineScaleSets", + "ResourceName": "VirtualMachineScaleSet", + "Description": "List VirtualMachineScaleSet resources by Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4469", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "4470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4471", + "Type": { + "$id": "4472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4473", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4474", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4476", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4478", + "Name": "name", + "NameInRequest": "name", + "Description": "The name of the Fleet", + "Type": { + "$id": "4479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4480", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4481", + "kind": "constant", + "valueType": { + "$id": "4482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4483", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "945" + }, + "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": "4484", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets", + "Decorators": [], + "Examples": [ + { + "$id": "4485", + "kind": "http", + "name": "Fleets_ListVirtualMachineScaleSets", + "description": "Fleets_ListVirtualMachineScaleSets", + "filePath": "2024-11-01/Fleets_ListVirtualMachineScaleSets.json", + "parameters": [ + { + "$id": "4486", + "parameter": { + "$ref": "4469" + }, + "value": { + "$id": "4487", + "kind": "string", + "type": { + "$ref": "4470" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4488", + "parameter": { + "$ref": "4473" + }, + "value": { + "$id": "4489", + "kind": "string", + "type": { + "$ref": "4474" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4490", + "parameter": { + "$ref": "4476" + }, + "value": { + "$id": "4491", + "kind": "string", + "type": { + "$ref": "4477" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "4492", + "parameter": { + "$ref": "4478" + }, + "value": { + "$id": "4493", + "kind": "string", + "type": { + "$ref": "4479" + }, + "value": "myFleet" + } + } + ], + "responses": [ + { + "$id": "4494", + "response": { + "$ref": "4483" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4495", + "kind": "model", + "type": { + "$ref": "945" + }, + "value": { + "$id": "4496", + "value": { + "$id": "4497", + "kind": "array", + "type": { + "$ref": "947" + }, + "value": [ + { + "$id": "4498", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4499", + "name": { + "$id": "4500", + "kind": "string", + "type": { + "$id": "4501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "myVmss" + }, + "id": { + "$id": "4502", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/myFleet/virtualMachineScaleSets/myVmss" + }, + "type": { + "$id": "4503", + "kind": "string", + "type": { + "$ref": "953" + }, + "value": "Microsoft.AzureFleet/fleets/virtualMachineScaleSets" + }, + "operationStatus": { + "$id": "4504", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "error": { + "$id": "4505", + "kind": "model", + "type": { + "$ref": "956" + }, + "value": { + "$id": "4506", + "details": { + "$id": "4507", + "kind": "array", + "type": { + "$ref": "964" + }, + "value": [ + { + "$id": "4508", + "kind": "model", + "type": { + "$ref": "965" + }, + "value": { + "$id": "4509", + "code": { + "$id": "4510", + "kind": "string", + "type": { + "$ref": "967" + }, + "value": "gzhtOverconstrainedAllocationRequestyosk" + }, + "target": { + "$id": "4511", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "qfthabhrmndhfizfnrwpgxvnokpy" + }, + "message": { + "$id": "4512", + "kind": "string", + "type": { + "$ref": "971" + }, + "value": "Allocation Failed" + } + } + } + ] + }, + "innererror": { + "$id": "4513", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "4514", + "exceptionType": { + "$id": "4515", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "sfaomfpoaptnbxchrfskm" + }, + "errorDetail": { + "$id": "4516", + "kind": "string", + "type": { + "$ref": "977" + }, + "value": "ihjwbwykq" + } + } + }, + "code": { + "$id": "4517", + "kind": "string", + "type": { + "$ref": "958" + }, + "value": "OverconstrainedAllocationRequest" + }, + "target": { + "$id": "4518", + "kind": "string", + "type": { + "$ref": "960" + }, + "value": "nhaj" + }, + "message": { + "$id": "4519", + "kind": "string", + "type": { + "$ref": "962" + }, + "value": "Allocation Failed" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "4520" + }, + "Parent": "AzureFleetClient", + "Parameters": [ + { + "$id": "4521", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4522", + "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": "4523", + "Type": { + "$id": "4524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + } + ], + "Auth": { + "$id": "4525", + "OAuth2": { + "$id": "4526", + "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..5ec9614108c2 --- /dev/null +++ b/sdk/loadtesting/Azure.Developer.LoadTesting/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/loadtestservice/LoadTestService +commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c +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/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/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..6bcd362e278f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs @@ -0,0 +1,563 @@ +// 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. + /// A new instance for mocking. + public static OperationStatusResult OperationStatusResult(string id = null, string name = null, string status = null, double? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null) + { + operations ??= new List(); + + return new OperationStatusResult( + id, + name, + status, + percentComplete, + startOn, + endOn, + operations?.ToList(), + error, + 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..d7dcb2539741 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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" && _serializedAdditionalRawData != null) + { + foreach (var 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; + } + string id = default; + string name = default; + string status = default; + double? percentComplete = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + IReadOnlyList operations = default; + ResponseError error = 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("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 (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, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.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..b41e2b6c35b8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs @@ -0,0 +1,104 @@ +// 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 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. + /// Keeps track of any properties unknown to the library. + internal OperationStatusResult(string id, string name, string status, double? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + Status = status; + PercentComplete = percentComplete; + StartOn = startOn; + EndOn = endOn; + Operations = operations; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OperationStatusResult() + { + } + + /// Fully qualified ID for the async operation. + public string 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; } + } +} 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..82958bacf537 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/workloads/Workloads.SAPVirtualInstance.Management +commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c +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