Skip to content

Commit

Permalink
Update generated files with build 131601 (#418)
Browse files Browse the repository at this point in the history
Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com>
  • Loading branch information
andrueastman and Microsoft Graph DevX Tooling authored Jan 18, 2024
1 parent a31673a commit e440763
Show file tree
Hide file tree
Showing 326 changed files with 5,312 additions and 1,184 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public Command BuildDeleteCommand() {
return command;
}
/// <summary>
/// Retrieve a conversationMember from a chat or channel.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0" />
/// Retrieve a conversationMember from a chat.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0" />
/// </summary>
public Command BuildGetCommand() {
var command = new Command("get");
command.Description = "Retrieve a conversationMember from a chat or channel.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0";
command.Description = "Retrieve a conversationMember from a chat.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0";
var chatIdOption = new Option<string>("--chat-id", description: "The unique identifier of chat") {
};
chatIdOption.IsRequired = true;
Expand Down Expand Up @@ -200,7 +200,7 @@ public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
return requestInfo;
}
/// <summary>
/// Retrieve a conversationMember from a chat or channel.
/// Retrieve a conversationMember from a chat.
/// </summary>
/// <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
Expand Down Expand Up @@ -234,7 +234,7 @@ public RequestInformation ToPatchRequestInformation(ConversationMember body, Act
return requestInfo;
}
/// <summary>
/// Retrieve a conversationMember from a chat or channel.
/// Retrieve a conversationMember from a chat.
/// </summary>
public class ConversationMemberItemRequestBuilderGetQueryParameters {
/// <summary>Expand related entities</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ public Command BuildCreateCommand() {
return command;
}
/// <summary>
/// List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has.
/// List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding resource-specific access that each app has.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/chat-list-permissiongrants?view=graph-rest-1.0" />
/// </summary>
public Command BuildListCommand() {
var command = new Command("list");
command.Description = "List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/chat-list-permissiongrants?view=graph-rest-1.0";
command.Description = "List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding resource-specific access that each app has.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/chat-list-permissiongrants?view=graph-rest-1.0";
var chatIdOption = new Option<string>("--chat-id", description: "The unique identifier of chat") {
};
chatIdOption.IsRequired = true;
Expand Down Expand Up @@ -208,7 +208,7 @@ public PermissionGrantsRequestBuilder(Dictionary<string, object> pathParameters)
public PermissionGrantsRequestBuilder(string rawUrl) : base("{+baseurl}/chats/{chat%2Did}/permissionGrants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) {
}
/// <summary>
/// List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has.
/// List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding resource-specific access that each app has.
/// </summary>
/// <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
Expand Down Expand Up @@ -242,7 +242,7 @@ public RequestInformation ToPostRequestInformation(ResourceSpecificPermissionGra
return requestInfo;
}
/// <summary>
/// List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has.
/// List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding resource-specific access that each app has.
/// </summary>
public class PermissionGrantsRequestBuilderGetQueryParameters {
/// <summary>Include count of items</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ public class SendActivityNotificationPostRequestBody : IAdditionalDataHolder, IP
#nullable restore
#else
public TeamworkNotificationRecipient Recipient { get; set; }
#endif
/// <summary>The teamsAppId property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? TeamsAppId { get; set; }
#nullable restore
#else
public string TeamsAppId { get; set; }
#endif
/// <summary>The templateParameters property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -74,6 +82,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
{"chainId", n => { ChainId = n.GetLongValue(); } },
{"previewText", n => { PreviewText = n.GetObjectValue<ItemBody>(ItemBody.CreateFromDiscriminatorValue); } },
{"recipient", n => { Recipient = n.GetObjectValue<TeamworkNotificationRecipient>(TeamworkNotificationRecipient.CreateFromDiscriminatorValue); } },
{"teamsAppId", n => { TeamsAppId = n.GetStringValue(); } },
{"templateParameters", n => { TemplateParameters = n.GetCollectionOfObjectValues<ApiSdk.Models.KeyValuePair>(ApiSdk.Models.KeyValuePair.CreateFromDiscriminatorValue)?.ToList(); } },
{"topic", n => { Topic = n.GetObjectValue<TeamworkActivityTopic>(TeamworkActivityTopic.CreateFromDiscriminatorValue); } },
};
Expand All @@ -88,6 +97,7 @@ public virtual void Serialize(ISerializationWriter writer) {
writer.WriteLongValue("chainId", ChainId);
writer.WriteObjectValue<ItemBody>("previewText", PreviewText);
writer.WriteObjectValue<TeamworkNotificationRecipient>("recipient", Recipient);
writer.WriteStringValue("teamsAppId", TeamsAppId);
writer.WriteCollectionOfObjectValues<ApiSdk.Models.KeyValuePair>("templateParameters", TemplateParameters);
writer.WriteObjectValue<TeamworkActivityTopic>("topic", Topic);
writer.WriteAdditionalData(AdditionalData);
Expand Down
1 change: 1 addition & 0 deletions src/generated/Communications/Calls/CallsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Tuple<List<Command>, List<Command>> BuildCommand() {
commands.Add(builder.BuildRecordResponseNavCommand());
commands.Add(builder.BuildRedirectNavCommand());
commands.Add(builder.BuildRejectNavCommand());
commands.Add(builder.BuildSendDtmfTonesNavCommand());
commands.Add(builder.BuildSubscribeToToneNavCommand());
commands.Add(builder.BuildTransferNavCommand());
commands.Add(builder.BuildUnmuteNavCommand());
Expand Down
16 changes: 16 additions & 0 deletions src/generated/Communications/Calls/Item/CallItemRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using ApiSdk.Communications.Calls.Item.RecordResponse;
using ApiSdk.Communications.Calls.Item.Redirect;
using ApiSdk.Communications.Calls.Item.Reject;
using ApiSdk.Communications.Calls.Item.SendDtmfTones;
using ApiSdk.Communications.Calls.Item.SubscribeToTone;
using ApiSdk.Communications.Calls.Item.Transfer;
using ApiSdk.Communications.Calls.Item.Unmute;
Expand Down Expand Up @@ -423,6 +424,21 @@ public Command BuildRejectNavCommand() {
return command;
}
/// <summary>
/// Provides operations to call the sendDtmfTones method.
/// </summary>
public Command BuildSendDtmfTonesNavCommand() {
var command = new Command("send-dtmf-tones");
command.Description = "Provides operations to call the sendDtmfTones method.";
var builder = new SendDtmfTonesRequestBuilder(PathParameters);
var execCommands = new List<Command>();
execCommands.Add(builder.BuildPostCommand());
foreach (var cmd in execCommands)
{
command.AddCommand(cmd);
}
return command;
}
/// <summary>
/// Provides operations to call the subscribeToTone method.
/// </summary>
public Command BuildSubscribeToToneNavCommand() {
Expand Down
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);
}
}
}
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;
}
}
}
Loading

0 comments on commit e440763

Please sign in to comment.