diff --git a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs index 020be8e57dc7..8dd1e78d2282 100644 --- a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs @@ -768,15 +768,6 @@ public partial class CloseJobResult { internal CloseJobResult() { } } - public partial class CommunicationError - { - internal CommunicationError() { } - public string Code { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } - public Azure.Communication.JobRouter.Models.CommunicationError InnerError { get { throw null; } } - public string Message { get { throw null; } } - public string Target { get { throw null; } } - } public partial class CompleteJobResult { internal CompleteJobResult() { } @@ -907,7 +898,6 @@ internal RouterJobPositionDetails() { } public static partial class RouterModelFactory { public static Azure.Communication.JobRouter.Models.AcceptJobOfferResult AcceptJobOfferResult(string assignmentId = null, string jobId = null, string workerId = null) { throw null; } - public static Azure.Communication.JobRouter.Models.CommunicationError CommunicationError(string code = null, string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.Communication.JobRouter.Models.CommunicationError innerError = null) { throw null; } public static Azure.Communication.JobRouter.Models.RouterJobAssignment RouterJobAssignment(string assignmentId = null, string workerId = null, System.DateTimeOffset assignedAt = default(System.DateTimeOffset), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? closedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.Communication.JobRouter.Models.RouterJobOffer RouterJobOffer(string offerId = null, string jobId = null, int capacityCost = 0, System.DateTimeOffset? offeredAt = default(System.DateTimeOffset?), System.DateTimeOffset? expiresAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.Communication.JobRouter.Models.RouterQueueItem RouterQueueItem(Azure.Communication.JobRouter.Models.RouterQueue queue = null, string etag = null) { throw null; } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterRestClient.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterRestClient.cs index b79cd84b1ab5..15694ece3888 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterRestClient.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterRestClient.cs @@ -1540,7 +1540,7 @@ internal HttpMessage CreateListWorkersRequest(RouterWorkerStateSelector? state, } /// Retrieves existing workers. - /// If specified, select workers by worker status. + /// If specified, select workers by worker state. /// If specified, select workers who have a channel configuration with this channel. /// If specified, select workers who are assigned to this queue. /// @@ -1568,7 +1568,7 @@ public async Task> ListWorkersAsync(RouterWorke } /// Retrieves existing workers. - /// If specified, select workers by worker status. + /// If specified, select workers by worker state. /// If specified, select workers who have a channel configuration with this channel. /// If specified, select workers who are assigned to this queue. /// @@ -1665,7 +1665,7 @@ public Response ListJobsNextPage(string nextLink, RouterJob /// Retrieves existing workers. /// The URL to the next page of results. - /// If specified, select workers by worker status. + /// If specified, select workers by worker state. /// If specified, select workers who have a channel configuration with this channel. /// If specified, select workers who are assigned to this queue. /// @@ -1700,7 +1700,7 @@ public async Task> ListWorkersNextPageAsync(str /// Retrieves existing workers. /// The URL to the next page of results. - /// If specified, select workers by worker status. + /// If specified, select workers by worker state. /// If specified, select workers who have a channel configuration with this channel. /// If specified, select workers who are assigned to this queue. /// diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.Serialization.cs index a95b878edc61..e25a471186de 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.Communication.JobRouter.Models { - public partial class CommunicationError + internal partial class CommunicationError { internal static CommunicationError DeserializeCommunicationError(JsonElement element) { diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.cs index f60244668ff7..dc84a9b221a8 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/CommunicationError.cs @@ -12,7 +12,7 @@ namespace Azure.Communication.JobRouter.Models { /// The Communication Services error. - public partial class CommunicationError + internal partial class CommunicationError { /// Initializes a new instance of CommunicationError. /// The error code. diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterModelFactory.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterModelFactory.cs index 7d34585d7a24..2bd744210257 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterModelFactory.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterModelFactory.cs @@ -7,27 +7,12 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Communication.JobRouter.Models { /// Model factory for models. public static partial class RouterModelFactory { - /// Initializes a new instance of CommunicationError. - /// The error code. - /// The error message. - /// The error target. - /// Further details about specific errors that led to this error. - /// The inner error if any. - /// A new instance for mocking. - public static CommunicationError CommunicationError(string code = null, string message = null, string target = null, IEnumerable details = null, CommunicationError innerError = null) - { - details ??= new List(); - - return new CommunicationError(code, message, target, details?.ToList(), innerError); - } - /// Initializes a new instance of RouterJobAssignment. /// The Id of the job assignment. /// The Id of the Worker assigned to the job. diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/CommunicationError.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/CommunicationError.cs index 83f4ceb56cf7..d9cbe3c33042 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/CommunicationError.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/CommunicationError.cs @@ -12,7 +12,7 @@ namespace Azure.Communication.JobRouter.Models /// Error model. /// [CodeGenModel("CommunicationError")] - public partial class CommunicationError + internal partial class CommunicationError { } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterModelFactory.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterModelFactory.cs index 3c823ba81bd5..b30ede5efcc1 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterModelFactory.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterModelFactory.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Collections.Generic; +using System.Linq; using Azure.Core; namespace Azure.Communication.JobRouter.Models @@ -8,5 +10,18 @@ namespace Azure.Communication.JobRouter.Models [CodeGenModel("AzureCommunicationServicesModelFactory")] public static partial class RouterModelFactory { + /// Initializes a new instance of CommunicationError. + /// The error code. + /// The error message. + /// The error target. + /// Further details about specific errors that led to this error. + /// The inner error if any. + /// A new instance for mocking. + internal static CommunicationError CommunicationError(string code = null, string message = null, string target = null, IEnumerable details = null, CommunicationError innerError = null) + { + details ??= new List(); + + return new CommunicationError(code, message, target, details?.ToList(), innerError); + } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/autorest.md b/sdk/communication/Azure.Communication.JobRouter/src/autorest.md index c9f7f99dacb2..a2fb41f9de5f 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/autorest.md +++ b/sdk/communication/Azure.Communication.JobRouter/src/autorest.md @@ -15,7 +15,7 @@ If any of the new objects needs to be overwritten, add the required changes to t tag: package-jobrouter-2022-07-18-preview model-namespace: false require: - - https://raw.githubusercontent.com/williamzhao87/azure-rest-api-specs/53a603c76359d0102a5b2e85337a14dc441083f6/specification/communication/data-plane/JobRouter/readme.md + - https://raw.githubusercontent.com/williamzhao87/azure-rest-api-specs/c6b35542072b325bfc07c32f5fc05fb5da6891bd/specification/communication/data-plane/JobRouter/readme.md generation1-convenience-client: true reflect-api-versions: true