-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update generated files with build 131601 (#418)
Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com>
- Loading branch information
1 parent
a31673a
commit e440763
Showing
326 changed files
with
5,312 additions
and
1,184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// <auto-generated/> | ||
using ApiSdk.Models; | ||
using Microsoft.Kiota.Abstractions.Serialization; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System; | ||
namespace ApiSdk.Communications.Calls.Item.SendDtmfTones { | ||
public class SendDtmfTonesPostRequestBody : IAdditionalDataHolder, IParsable { | ||
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary> | ||
public IDictionary<string, object> AdditionalData { get; set; } | ||
/// <summary>The clientContext property</summary> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
public string? ClientContext { get; set; } | ||
#nullable restore | ||
#else | ||
public string ClientContext { get; set; } | ||
#endif | ||
/// <summary>The delayBetweenTonesMs property</summary> | ||
public int? DelayBetweenTonesMs { get; set; } | ||
/// <summary>The tones property</summary> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
public List<Tone?>? Tones { get; set; } | ||
#nullable restore | ||
#else | ||
public List<Tone?> Tones { get; set; } | ||
#endif | ||
/// <summary> | ||
/// Instantiates a new sendDtmfTonesPostRequestBody and sets the default values. | ||
/// </summary> | ||
public SendDtmfTonesPostRequestBody() { | ||
AdditionalData = new Dictionary<string, object>(); | ||
} | ||
/// <summary> | ||
/// Creates a new instance of the appropriate class based on discriminator value | ||
/// </summary> | ||
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param> | ||
public static SendDtmfTonesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { | ||
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); | ||
return new SendDtmfTonesPostRequestBody(); | ||
} | ||
/// <summary> | ||
/// The deserialization information for the current model | ||
/// </summary> | ||
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() { | ||
return new Dictionary<string, Action<IParseNode>> { | ||
{"clientContext", n => { ClientContext = n.GetStringValue(); } }, | ||
{"delayBetweenTonesMs", n => { DelayBetweenTonesMs = n.GetIntValue(); } }, | ||
{"tones", n => { Tones = n.GetCollectionOfEnumValues<Tone>()?.ToList(); } }, | ||
}; | ||
} | ||
/// <summary> | ||
/// Serializes information the current object | ||
/// </summary> | ||
/// <param name="writer">Serialization writer to use to serialize this model</param> | ||
public virtual void Serialize(ISerializationWriter writer) { | ||
_ = writer ?? throw new ArgumentNullException(nameof(writer)); | ||
writer.WriteStringValue("clientContext", ClientContext); | ||
writer.WriteIntValue("delayBetweenTonesMs", DelayBetweenTonesMs); | ||
writer.WriteCollectionOfEnumValues<Tone>("tones", Tones); | ||
writer.WriteAdditionalData(AdditionalData); | ||
} | ||
} | ||
} |
102 changes: 102 additions & 0 deletions
102
src/generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
// <auto-generated/> | ||
using ApiSdk.Models.ODataErrors; | ||
using ApiSdk.Models; | ||
using Microsoft.Kiota.Abstractions.Serialization; | ||
using Microsoft.Kiota.Abstractions; | ||
using Microsoft.Kiota.Cli.Commons.Extensions; | ||
using Microsoft.Kiota.Cli.Commons.IO; | ||
using Microsoft.Kiota.Cli.Commons; | ||
using System.Collections.Generic; | ||
using System.CommandLine; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Threading; | ||
using System; | ||
namespace ApiSdk.Communications.Calls.Item.SendDtmfTones { | ||
/// <summary> | ||
/// Provides operations to call the sendDtmfTones method. | ||
/// </summary> | ||
public class SendDtmfTonesRequestBuilder : BaseCliRequestBuilder { | ||
/// <summary> | ||
/// Invoke action sendDtmfTones | ||
/// </summary> | ||
public Command BuildPostCommand() { | ||
var command = new Command("post"); | ||
command.Description = "Invoke action sendDtmfTones"; | ||
var callIdOption = new Option<string>("--call-id", description: "The unique identifier of call") { | ||
}; | ||
callIdOption.IsRequired = true; | ||
command.AddOption(callIdOption); | ||
var bodyOption = new Option<string>("--body", description: "The request body") { | ||
}; | ||
bodyOption.IsRequired = true; | ||
command.AddOption(bodyOption); | ||
var outputOption = new Option<FormatterType>("--output", () => FormatterType.JSON); | ||
command.AddOption(outputOption); | ||
var queryOption = new Option<string>("--query"); | ||
command.AddOption(queryOption); | ||
command.SetHandler(async (invocationContext) => { | ||
var callId = invocationContext.ParseResult.GetValueForOption(callIdOption); | ||
var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; | ||
var output = invocationContext.ParseResult.GetValueForOption(outputOption); | ||
var query = invocationContext.ParseResult.GetValueForOption(queryOption); | ||
IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); | ||
IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); | ||
var cancellationToken = invocationContext.GetCancellationToken(); | ||
var reqAdapter = invocationContext.GetRequestAdapter(); | ||
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); | ||
var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); | ||
var model = parseNode.GetObjectValue<SendDtmfTonesPostRequestBody>(SendDtmfTonesPostRequestBody.CreateFromDiscriminatorValue); | ||
if (model is null) { | ||
Console.Error.WriteLine("No model data to send."); | ||
return; | ||
} | ||
var requestInfo = ToPostRequestInformation(model, q => { | ||
}); | ||
if (callId is not null) requestInfo.PathParameters.Add("call%2Did", callId); | ||
requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); | ||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> { | ||
{"4XX", ODataError.CreateFromDiscriminatorValue}, | ||
{"5XX", ODataError.CreateFromDiscriminatorValue}, | ||
}; | ||
var response = await reqAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; | ||
response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; | ||
var formatter = outputFormatterFactory.GetFormatter(output); | ||
await formatter.WriteOutputAsync(response, cancellationToken); | ||
}); | ||
return command; | ||
} | ||
/// <summary> | ||
/// Instantiates a new SendDtmfTonesRequestBuilder and sets the default values. | ||
/// </summary> | ||
/// <param name="pathParameters">Path parameters for the request</param> | ||
public SendDtmfTonesRequestBuilder(Dictionary<string, object> pathParameters) : base("{+baseurl}/communications/calls/{call%2Did}/sendDtmfTones", pathParameters) { | ||
} | ||
/// <summary> | ||
/// Instantiates a new SendDtmfTonesRequestBuilder and sets the default values. | ||
/// </summary> | ||
/// <param name="rawUrl">The raw URL to use for the request builder.</param> | ||
public SendDtmfTonesRequestBuilder(string rawUrl) : base("{+baseurl}/communications/calls/{call%2Did}/sendDtmfTones", rawUrl) { | ||
} | ||
/// <summary> | ||
/// Invoke action sendDtmfTones | ||
/// </summary> | ||
/// <param name="body">The request body</param> | ||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
public RequestInformation ToPostRequestInformation(SendDtmfTonesPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) { | ||
#nullable restore | ||
#else | ||
public RequestInformation ToPostRequestInformation(SendDtmfTonesPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) { | ||
#endif | ||
_ = body ?? throw new ArgumentNullException(nameof(body)); | ||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); | ||
requestInfo.Configure(requestConfiguration); | ||
requestInfo.Headers.TryAdd("Accept", "application/json"); | ||
return requestInfo; | ||
} | ||
} | ||
} |
Oops, something went wrong.