Skip to content

Commit

Permalink
Add re-offertime UTC to decline API (#36512)
Browse files Browse the repository at this point in the history
* Add re-offertime UTC to decline API

* CI
  • Loading branch information
williamzhao87 authored May 26, 2023
1 parent 22a55b5 commit 89f9ffd
Show file tree
Hide file tree
Showing 21 changed files with 647 additions and 462 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@ public CreateWorkerOptions(string workerId, int totalCapacity) { }
public int TotalCapacity { get { throw null; } }
public string WorkerId { get { throw null; } }
}
public partial class DeclineJobOfferOptions
{
public DeclineJobOfferOptions(string workerId, string offerId) { }
public string OfferId { get { throw null; } }
public System.DateTimeOffset? ReofferTimeUtc { get { throw null; } set { } }
public string WorkerId { get { throw null; } }
}
public partial class DeclineOfferRequest
{
public DeclineOfferRequest() { }
public System.DateTimeOffset? ReofferTimeUtc { get { throw null; } set { } }
}
public partial class DirectMapRule : Azure.Communication.JobRouter.RouterRule
{
public DirectMapRule() { }
Expand Down Expand Up @@ -404,8 +416,8 @@ public RouterClient(System.Uri endpoint, Azure.Core.TokenCredential credential,
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.RouterJob>> CreateJobAsync(Azure.Communication.JobRouter.CreateJobWithClassificationPolicyOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.JobRouter.Models.RouterWorker> CreateWorker(Azure.Communication.JobRouter.CreateWorkerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.RouterWorker>> CreateWorkerAsync(Azure.Communication.JobRouter.CreateWorkerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.JobRouter.Models.DeclineJobOfferResult> DeclineJobOffer(string workerId, string offerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.DeclineJobOfferResult>> DeclineJobOfferAsync(string workerId, string offerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.JobRouter.Models.DeclineJobOfferResult> DeclineJobOffer(Azure.Communication.JobRouter.DeclineJobOfferOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.DeclineJobOfferResult>> DeclineJobOfferAsync(Azure.Communication.JobRouter.DeclineJobOfferOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response DeleteJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.JobRouter.Models.RouterWorker> DeleteWorker(string workerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down Expand Up @@ -589,6 +601,12 @@ public abstract partial class WorkerSelectorAttachment
internal WorkerSelectorAttachment() { }
protected string Kind { get { throw null; } set { } }
}
public enum WorkerState
{
Active = 0,
Draining = 1,
Inactive = 2,
}
public enum WorkerStateSelector
{
Active = 0,
Expand Down Expand Up @@ -820,7 +838,7 @@ public RouterWorker() { }
public double? LoadRatio { get { throw null; } }
public System.Collections.Generic.IReadOnlyList<Azure.Communication.JobRouter.Models.JobOffer> Offers { get { throw null; } }
public System.Collections.Generic.IDictionary<string, Azure.Communication.JobRouter.QueueAssignment> QueueAssignments { get { throw null; } set { } }
public Azure.Communication.JobRouter.Models.RouterWorkerState? State { get { throw null; } }
public Azure.Communication.JobRouter.WorkerState? State { get { throw null; } }
public System.Collections.Generic.IDictionary<string, Azure.Communication.JobRouter.LabelValue> Tags { get { throw null; } set { } }
public int? TotalCapacity { get { throw null; } set { } }
}
Expand All @@ -830,25 +848,6 @@ internal RouterWorkerItem() { }
public string Etag { get { throw null; } }
public Azure.Communication.JobRouter.Models.RouterWorker RouterWorker { get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct RouterWorkerState : System.IEquatable<Azure.Communication.JobRouter.Models.RouterWorkerState>
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public RouterWorkerState(string value) { throw null; }
public static Azure.Communication.JobRouter.Models.RouterWorkerState Active { get { throw null; } }
public static Azure.Communication.JobRouter.Models.RouterWorkerState Draining { get { throw null; } }
public static Azure.Communication.JobRouter.Models.RouterWorkerState Inactive { get { throw null; } }
public bool Equals(Azure.Communication.JobRouter.Models.RouterWorkerState 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.Communication.JobRouter.Models.RouterWorkerState left, Azure.Communication.JobRouter.Models.RouterWorkerState right) { throw null; }
public static implicit operator Azure.Communication.JobRouter.Models.RouterWorkerState (string value) { throw null; }
public static bool operator !=(Azure.Communication.JobRouter.Models.RouterWorkerState left, Azure.Communication.JobRouter.Models.RouterWorkerState right) { throw null; }
public override string ToString() { throw null; }
}
public partial class UnassignJobResult
{
internal UnassignJobResult() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Console.WriteLine($"Job has been successfully assigned with a worker with assign
```C# Snippet:Azure_Communication_JobRouter_Tests_Samples_Crud_DeclineJobOffer
// A worker can also choose to decline an offer
Response<DeclineJobOfferResult> declineOffer = routerClient.DeclineJobOffer(worker.Value.Id, issuedOffer.Id);
Response<DeclineJobOfferResult> declineOffer = routerClient.DeclineJobOffer(new DeclineJobOfferOptions(worker.Value.Id, issuedOffer.Id));
```

## Complete a job
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Console.WriteLine($"Job has been successfully assigned with a worker with assign
```C# Snippet:Azure_Communication_JobRouter_Tests_Samples_Crud_DeclineJobOffer_Async
// A worker can also choose to decline an offer
Response<DeclineJobOfferResult> declineOffer = await routerClient.DeclineJobOfferAsync(worker.Value.Id, issuedOffer.Id);
Response<DeclineJobOfferResult> declineOffer = await routerClient.DeclineJobOfferAsync(new DeclineJobOfferOptions(worker.Value.Id, issuedOffer.Id));
```

## Complete a job
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 89f9ffd

Please sign in to comment.