Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated models and request builders #415

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 4 additions & 4 deletions src/generated/Chats/Item/Messages/MessagesRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ public Command BuildCountNavCommand() {
return command;
}
/// <summary>
/// Send a new chatMessage in the specified channel or a chat.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0" />
/// Send a new chatMessage in the specified chat. This API can&apos;t create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0" />
/// </summary>
public Command BuildCreateCommand() {
var command = new Command("create");
command.Description = "Send a new chatMessage in the specified channel or a chat.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0";
command.Description = "Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/chat-post-messages?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 @@ -248,7 +248,7 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Me
return requestInfo;
}
/// <summary>
/// Send a new chatMessage in the specified channel or a chat.
/// Send a new chatMessage in the specified chat. This API can&apos;t create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
/// </summary>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
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 @@ -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
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
Expand Up @@ -20,12 +20,12 @@ namespace ApiSdk.Communications.Calls.Item.Participants.Invite {
/// </summary>
public class InviteRequestBuilder : BaseCliRequestBuilder {
/// <summary>
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/participant-invite?view=graph-rest-1.0" />
/// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0" />
/// </summary>
public Command BuildPostCommand() {
var command = new Command("post");
command.Description = "Invite participants to the active call. For more information about how to handle operations, see commsOperation.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/participant-invite?view=graph-rest-1.0";
command.Description = "Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. \n\nFind more info here:\n https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0";
var callIdOption = new Option<string>("--call-id", description: "The unique identifier of call") {
};
callIdOption.IsRequired = true;
Expand Down Expand Up @@ -82,7 +82,7 @@ public InviteRequestBuilder(Dictionary<string, object> pathParameters) : base("{
public InviteRequestBuilder(string rawUrl) : base("{+baseurl}/communications/calls/{call%2Did}/participants/invite", rawUrl) {
}
/// <summary>
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
/// </summary>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
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);
}
}
}
Loading
Loading