/// <summary>
        /// Invoke action cancel
        /// </summary>
        public Command BuildPostCommand()
        {
            var command = new Command("post");

            command.Description = "Invoke action cancel";
            // Create options for all the parameters
            var userIdOption = new Option <string>("--user-id", description: "key: id of user")
            {
            };

            userIdOption.IsRequired = true;
            command.AddOption(userIdOption);
            var calendarGroupIdOption = new Option <string>("--calendar-group-id", description: "key: id of calendarGroup")
            {
            };

            calendarGroupIdOption.IsRequired = true;
            command.AddOption(calendarGroupIdOption);
            var calendarIdOption = new Option <string>("--calendar-id", description: "key: id of calendar")
            {
            };

            calendarIdOption.IsRequired = true;
            command.AddOption(calendarIdOption);
            var eventIdOption = new Option <string>("--event-id", description: "key: id of event")
            {
            };

            eventIdOption.IsRequired = true;
            command.AddOption(eventIdOption);
            var eventId1Option = new Option <string>("--event-id1", description: "key: id of event")
            {
            };

            eventId1Option.IsRequired = true;
            command.AddOption(eventId1Option);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var userId            = (string)parameters[0];
                var calendarGroupId   = (string)parameters[1];
                var calendarId        = (string)parameters[2];
                var eventId           = (string)parameters[3];
                var eventId1          = (string)parameters[4];
                var body              = (string)parameters[5];
                var cancellationToken = (CancellationToken)parameters[6];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <CancelRequestBody>(CancelRequestBody.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePostRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("user%2Did", userId);
                requestInfo.PathParameters.Add("calendarGroup%2Did", calendarGroupId);
                requestInfo.PathParameters.Add("calendar%2Did", calendarId);
                requestInfo.PathParameters.Add("event%2Did", eventId);
                requestInfo.PathParameters.Add("event%2Did1", eventId1);
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: default, cancellationToken: cancellationToken);
        /// <summary>
        /// Update the navigation property submittedResources in education
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property submittedResources in education";
            // Create options for all the parameters
            var educationUserIdOption = new Option <string>("--education-user-id", description: "key: id of educationUser")
            {
            };

            educationUserIdOption.IsRequired = true;
            command.AddOption(educationUserIdOption);
            var educationAssignmentIdOption = new Option <string>("--education-assignment-id", description: "key: id of educationAssignment")
            {
            };

            educationAssignmentIdOption.IsRequired = true;
            command.AddOption(educationAssignmentIdOption);
            var educationSubmissionIdOption = new Option <string>("--education-submission-id", description: "key: id of educationSubmission")
            {
            };

            educationSubmissionIdOption.IsRequired = true;
            command.AddOption(educationSubmissionIdOption);
            var educationSubmissionResourceIdOption = new Option <string>("--education-submission-resource-id", description: "key: id of educationSubmissionResource")
            {
            };

            educationSubmissionResourceIdOption.IsRequired = true;
            command.AddOption(educationSubmissionResourceIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var educationUserId               = (string)parameters[0];
                var educationAssignmentId         = (string)parameters[1];
                var educationSubmissionId         = (string)parameters[2];
                var educationSubmissionResourceId = (string)parameters[3];
                var body = (string)parameters[4];
                var cancellationToken = (CancellationToken)parameters[5];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <EducationSubmissionResource>(EducationSubmissionResource.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("educationUser%2Did", educationUserId);
                requestInfo.PathParameters.Add("educationAssignment%2Did", educationAssignmentId);
                requestInfo.PathParameters.Add("educationSubmission%2Did", educationSubmissionId);
                requestInfo.PathParameters.Add("educationSubmissionResource%2Did", educationSubmissionResourceId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(educationUserIdOption, educationAssignmentIdOption, educationSubmissionIdOption, educationSubmissionResourceIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
示例#3
0
        /// <summary>
        /// Update the navigation property multiValueExtendedProperties in users
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property multiValueExtendedProperties in users";
            // Create options for all the parameters
            var userIdOption = new Option <string>("--user-id", description: "key: id of user")
            {
            };

            userIdOption.IsRequired = true;
            command.AddOption(userIdOption);
            var eventIdOption = new Option <string>("--event-id", description: "key: id of event")
            {
            };

            eventIdOption.IsRequired = true;
            command.AddOption(eventIdOption);
            var eventId1Option = new Option <string>("--event-id1", description: "key: id of event")
            {
            };

            eventId1Option.IsRequired = true;
            command.AddOption(eventId1Option);
            var multiValueLegacyExtendedPropertyIdOption = new Option <string>("--multi-value-legacy-extended-property-id", description: "key: id of multiValueLegacyExtendedProperty")
            {
            };

            multiValueLegacyExtendedPropertyIdOption.IsRequired = true;
            command.AddOption(multiValueLegacyExtendedPropertyIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var userId   = (string)parameters[0];
                var eventId  = (string)parameters[1];
                var eventId1 = (string)parameters[2];
                var multiValueLegacyExtendedPropertyId = (string)parameters[3];
                var body = (string)parameters[4];
                var cancellationToken = (CancellationToken)parameters[5];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <MultiValueLegacyExtendedProperty>(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("user%2Did", userId);
                requestInfo.PathParameters.Add("event%2Did", eventId);
                requestInfo.PathParameters.Add("event%2Did1", eventId1);
                requestInfo.PathParameters.Add("multiValueLegacyExtendedProperty%2Did", multiValueLegacyExtendedPropertyId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(userIdOption, eventIdOption, eventId1Option, multiValueLegacyExtendedPropertyIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
        /// <summary>
        /// Update the navigation property pages in me
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property pages in me";
            // Create options for all the parameters
            var notebookIdOption = new Option <string>("--notebook-id", description: "key: id of notebook")
            {
            };

            notebookIdOption.IsRequired = true;
            command.AddOption(notebookIdOption);
            var sectionGroupIdOption = new Option <string>("--section-group-id", description: "key: id of sectionGroup")
            {
            };

            sectionGroupIdOption.IsRequired = true;
            command.AddOption(sectionGroupIdOption);
            var onenoteSectionIdOption = new Option <string>("--onenote-section-id", description: "key: id of onenoteSection")
            {
            };

            onenoteSectionIdOption.IsRequired = true;
            command.AddOption(onenoteSectionIdOption);
            var onenotePageIdOption = new Option <string>("--onenote-page-id", description: "key: id of onenotePage")
            {
            };

            onenotePageIdOption.IsRequired = true;
            command.AddOption(onenotePageIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var notebookId        = (string)parameters[0];
                var sectionGroupId    = (string)parameters[1];
                var onenoteSectionId  = (string)parameters[2];
                var onenotePageId     = (string)parameters[3];
                var body              = (string)parameters[4];
                var cancellationToken = (CancellationToken)parameters[5];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <OnenotePage>(OnenotePage.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("notebook%2Did", notebookId);
                requestInfo.PathParameters.Add("sectionGroup%2Did", sectionGroupId);
                requestInfo.PathParameters.Add("onenoteSection%2Did", onenoteSectionId);
                requestInfo.PathParameters.Add("onenotePage%2Did", onenotePageId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(notebookIdOption, sectionGroupIdOption, onenoteSectionIdOption, onenotePageIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
示例#5
0
 /// <summary>
 /// Delete navigation property messageRules for users
 /// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
 /// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
 /// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
 /// </summary>
 public async Task DeleteAsync(Action <MessageRuleItemRequestBuilderDeleteRequestConfiguration> requestConfiguration = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default)
 {
     var requestInfo = CreateDeleteRequestInformation(requestConfiguration);
     await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
        /// <summary>
        /// Delete navigation property attachments for users
        /// </summary>
        public Command BuildDeleteCommand()
        {
            var command = new Command("delete");

            command.Description = "Delete navigation property attachments for users";
            // Create options for all the parameters
            var userIdOption = new Option <string>("--user-id", description: "key: id of user")
            {
            };

            userIdOption.IsRequired = true;
            command.AddOption(userIdOption);
            var calendarGroupIdOption = new Option <string>("--calendar-group-id", description: "key: id of calendarGroup")
            {
            };

            calendarGroupIdOption.IsRequired = true;
            command.AddOption(calendarGroupIdOption);
            var calendarIdOption = new Option <string>("--calendar-id", description: "key: id of calendar")
            {
            };

            calendarIdOption.IsRequired = true;
            command.AddOption(calendarIdOption);
            var eventIdOption = new Option <string>("--event-id", description: "key: id of event")
            {
            };

            eventIdOption.IsRequired = true;
            command.AddOption(eventIdOption);
            var eventId1Option = new Option <string>("--event-id1", description: "key: id of event")
            {
            };

            eventId1Option.IsRequired = true;
            command.AddOption(eventId1Option);
            var attachmentIdOption = new Option <string>("--attachment-id", description: "key: id of attachment")
            {
            };

            attachmentIdOption.IsRequired = true;
            command.AddOption(attachmentIdOption);
            var ifMatchOption = new Option <string>("--if-match", description: "ETag")
            {
            };

            ifMatchOption.IsRequired = false;
            command.AddOption(ifMatchOption);
            command.SetHandler(async(object[] parameters) => {
                var userId            = (string)parameters[0];
                var calendarGroupId   = (string)parameters[1];
                var calendarId        = (string)parameters[2];
                var eventId           = (string)parameters[3];
                var eventId1          = (string)parameters[4];
                var attachmentId      = (string)parameters[5];
                var ifMatch           = (string)parameters[6];
                var cancellationToken = (CancellationToken)parameters[7];
                var requestInfo       = CreateDeleteRequestInformation(q => {
                });
                requestInfo.PathParameters.Add("user%2Did", userId);
                requestInfo.PathParameters.Add("calendarGroup%2Did", calendarGroupId);
                requestInfo.PathParameters.Add("calendar%2Did", calendarId);
                requestInfo.PathParameters.Add("event%2Did", eventId);
                requestInfo.PathParameters.Add("event%2Did1", eventId1);
                requestInfo.PathParameters.Add("attachment%2Did", attachmentId);
                requestInfo.Headers["If-Match"] = ifMatch;
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(userIdOption, calendarGroupIdOption, calendarIdOption, eventIdOption, eventId1Option, attachmentIdOption, ifMatchOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
示例#7
0
        /// <summary>
        /// Invoke action onenotePatchContent
        /// </summary>
        public Command BuildPostCommand()
        {
            var command = new Command("post");

            command.Description = "Invoke action onenotePatchContent";
            // Create options for all the parameters
            var groupIdOption = new Option <string>("--group-id", description: "key: id of group")
            {
            };

            groupIdOption.IsRequired = true;
            command.AddOption(groupIdOption);
            var notebookIdOption = new Option <string>("--notebook-id", description: "key: id of notebook")
            {
            };

            notebookIdOption.IsRequired = true;
            command.AddOption(notebookIdOption);
            var sectionGroupIdOption = new Option <string>("--section-group-id", description: "key: id of sectionGroup")
            {
            };

            sectionGroupIdOption.IsRequired = true;
            command.AddOption(sectionGroupIdOption);
            var onenoteSectionIdOption = new Option <string>("--onenote-section-id", description: "key: id of onenoteSection")
            {
            };

            onenoteSectionIdOption.IsRequired = true;
            command.AddOption(onenoteSectionIdOption);
            var onenotePageIdOption = new Option <string>("--onenote-page-id", description: "key: id of onenotePage")
            {
            };

            onenotePageIdOption.IsRequired = true;
            command.AddOption(onenotePageIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var groupId           = (string)parameters[0];
                var notebookId        = (string)parameters[1];
                var sectionGroupId    = (string)parameters[2];
                var onenoteSectionId  = (string)parameters[3];
                var onenotePageId     = (string)parameters[4];
                var body              = (string)parameters[5];
                var cancellationToken = (CancellationToken)parameters[6];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <OnenotePatchContentRequestBody>(OnenotePatchContentRequestBody.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePostRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("group%2Did", groupId);
                requestInfo.PathParameters.Add("notebook%2Did", notebookId);
                requestInfo.PathParameters.Add("sectionGroup%2Did", sectionGroupId);
                requestInfo.PathParameters.Add("onenoteSection%2Did", onenoteSectionId);
                requestInfo.PathParameters.Add("onenotePage%2Did", onenotePageId);
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: default, cancellationToken: cancellationToken);
        /// <summary>
        /// Delete navigation property children for sites
        /// </summary>
        public Command BuildDeleteCommand()
        {
            var command = new Command("delete");

            command.Description = "Delete navigation property children for sites";
            // Create options for all the parameters
            var siteIdOption = new Option <string>("--site-id", description: "key: id of site")
            {
            };

            siteIdOption.IsRequired = true;
            command.AddOption(siteIdOption);
            var storeIdOption = new Option <string>("--store-id", description: "key: id of store")
            {
            };

            storeIdOption.IsRequired = true;
            command.AddOption(storeIdOption);
            var groupIdOption = new Option <string>("--group-id", description: "key: id of group")
            {
            };

            groupIdOption.IsRequired = true;
            command.AddOption(groupIdOption);
            var setIdOption = new Option <string>("--set-id", description: "key: id of set")
            {
            };

            setIdOption.IsRequired = true;
            command.AddOption(setIdOption);
            var termIdOption = new Option <string>("--term-id", description: "key: id of term")
            {
            };

            termIdOption.IsRequired = true;
            command.AddOption(termIdOption);
            var termId1Option = new Option <string>("--term-id1", description: "key: id of term")
            {
            };

            termId1Option.IsRequired = true;
            command.AddOption(termId1Option);
            var ifMatchOption = new Option <string>("--if-match", description: "ETag")
            {
            };

            ifMatchOption.IsRequired = false;
            command.AddOption(ifMatchOption);
            command.SetHandler(async(object[] parameters) => {
                var siteId            = (string)parameters[0];
                var storeId           = (string)parameters[1];
                var groupId           = (string)parameters[2];
                var setId             = (string)parameters[3];
                var termId            = (string)parameters[4];
                var termId1           = (string)parameters[5];
                var ifMatch           = (string)parameters[6];
                var cancellationToken = (CancellationToken)parameters[7];
                var requestInfo       = CreateDeleteRequestInformation(q => {
                });
                requestInfo.PathParameters.Add("site%2Did", siteId);
                requestInfo.PathParameters.Add("store%2Did", storeId);
                requestInfo.PathParameters.Add("group%2Did", groupId);
                requestInfo.PathParameters.Add("set%2Did", setId);
                requestInfo.PathParameters.Add("term%2Did", termId);
                requestInfo.PathParameters.Add("term%2Did1", termId1);
                requestInfo.Headers["If-Match"] = ifMatch;
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(siteIdOption, storeIdOption, groupIdOption, setIdOption, termIdOption, termId1Option, ifMatchOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
示例#9
0
        /// <summary>
        /// Update the navigation property messages in users
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property messages in users";
            // Create options for all the parameters
            var userIdOption = new Option <string>("--user-id", description: "key: id of user")
            {
            };

            userIdOption.IsRequired = true;
            command.AddOption(userIdOption);
            var teamIdOption = new Option <string>("--team-id", description: "key: id of team")
            {
            };

            teamIdOption.IsRequired = true;
            command.AddOption(teamIdOption);
            var channelIdOption = new Option <string>("--channel-id", description: "key: id of channel")
            {
            };

            channelIdOption.IsRequired = true;
            command.AddOption(channelIdOption);
            var chatMessageIdOption = new Option <string>("--chat-message-id", description: "key: id of chatMessage")
            {
            };

            chatMessageIdOption.IsRequired = true;
            command.AddOption(chatMessageIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var userId            = (string)parameters[0];
                var teamId            = (string)parameters[1];
                var channelId         = (string)parameters[2];
                var chatMessageId     = (string)parameters[3];
                var body              = (string)parameters[4];
                var cancellationToken = (CancellationToken)parameters[5];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <ChatMessage>(ChatMessage.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("user%2Did", userId);
                requestInfo.PathParameters.Add("team%2Did", teamId);
                requestInfo.PathParameters.Add("channel%2Did", channelId);
                requestInfo.PathParameters.Add("chatMessage%2Did", chatMessageId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(userIdOption, teamIdOption, channelIdOption, chatMessageIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
示例#10
0
        /// <summary>
        /// Delete navigation property pages for groups
        /// </summary>
        public Command BuildDeleteCommand()
        {
            var command = new Command("delete");

            command.Description = "Delete navigation property pages for groups";
            // Create options for all the parameters
            var groupIdOption = new Option <string>("--group-id", description: "key: id of group")
            {
            };

            groupIdOption.IsRequired = true;
            command.AddOption(groupIdOption);
            var siteIdOption = new Option <string>("--site-id", description: "key: id of site")
            {
            };

            siteIdOption.IsRequired = true;
            command.AddOption(siteIdOption);
            var notebookIdOption = new Option <string>("--notebook-id", description: "key: id of notebook")
            {
            };

            notebookIdOption.IsRequired = true;
            command.AddOption(notebookIdOption);
            var onenoteSectionIdOption = new Option <string>("--onenote-section-id", description: "key: id of onenoteSection")
            {
            };

            onenoteSectionIdOption.IsRequired = true;
            command.AddOption(onenoteSectionIdOption);
            var onenotePageIdOption = new Option <string>("--onenote-page-id", description: "key: id of onenotePage")
            {
            };

            onenotePageIdOption.IsRequired = true;
            command.AddOption(onenotePageIdOption);
            var ifMatchOption = new Option <string>("--if-match", description: "ETag")
            {
            };

            ifMatchOption.IsRequired = false;
            command.AddOption(ifMatchOption);
            command.SetHandler(async(object[] parameters) => {
                var groupId           = (string)parameters[0];
                var siteId            = (string)parameters[1];
                var notebookId        = (string)parameters[2];
                var onenoteSectionId  = (string)parameters[3];
                var onenotePageId     = (string)parameters[4];
                var ifMatch           = (string)parameters[5];
                var cancellationToken = (CancellationToken)parameters[6];
                var requestInfo       = CreateDeleteRequestInformation(q => {
                });
                requestInfo.PathParameters.Add("group%2Did", groupId);
                requestInfo.PathParameters.Add("site%2Did", siteId);
                requestInfo.PathParameters.Add("notebook%2Did", notebookId);
                requestInfo.PathParameters.Add("onenoteSection%2Did", onenoteSectionId);
                requestInfo.PathParameters.Add("onenotePage%2Did", onenotePageId);
                requestInfo.Headers["If-Match"] = ifMatch;
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(groupIdOption, siteIdOption, notebookIdOption, onenoteSectionIdOption, onenotePageIdOption, ifMatchOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
        /// <summary>
        /// Update the navigation property attachments in me
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property attachments in me";
            // Create options for all the parameters
            var calendarGroupIdOption = new Option <string>("--calendar-group-id", description: "key: id of calendarGroup")
            {
            };

            calendarGroupIdOption.IsRequired = true;
            command.AddOption(calendarGroupIdOption);
            var calendarIdOption = new Option <string>("--calendar-id", description: "key: id of calendar")
            {
            };

            calendarIdOption.IsRequired = true;
            command.AddOption(calendarIdOption);
            var eventIdOption = new Option <string>("--event-id", description: "key: id of event")
            {
            };

            eventIdOption.IsRequired = true;
            command.AddOption(eventIdOption);
            var attachmentIdOption = new Option <string>("--attachment-id", description: "key: id of attachment")
            {
            };

            attachmentIdOption.IsRequired = true;
            command.AddOption(attachmentIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var calendarGroupId   = (string)parameters[0];
                var calendarId        = (string)parameters[1];
                var eventId           = (string)parameters[2];
                var attachmentId      = (string)parameters[3];
                var body              = (string)parameters[4];
                var cancellationToken = (CancellationToken)parameters[5];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <Attachment>(Attachment.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("calendarGroup%2Did", calendarGroupId);
                requestInfo.PathParameters.Add("calendar%2Did", calendarId);
                requestInfo.PathParameters.Add("event%2Did", eventId);
                requestInfo.PathParameters.Add("attachment%2Did", attachmentId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(calendarGroupIdOption, calendarIdOption, eventIdOption, attachmentIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
        /// <summary>
        /// Update the navigation property fields in groups
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property fields in groups";
            // Create options for all the parameters
            var groupIdOption = new Option <string>("--group-id", description: "key: id of group")
            {
            };

            groupIdOption.IsRequired = true;
            command.AddOption(groupIdOption);
            var driveIdOption = new Option <string>("--drive-id", description: "key: id of drive")
            {
            };

            driveIdOption.IsRequired = true;
            command.AddOption(driveIdOption);
            var driveItemIdOption = new Option <string>("--drive-item-id", description: "key: id of driveItem")
            {
            };

            driveItemIdOption.IsRequired = true;
            command.AddOption(driveItemIdOption);
            var listItemVersionIdOption = new Option <string>("--list-item-version-id", description: "key: id of listItemVersion")
            {
            };

            listItemVersionIdOption.IsRequired = true;
            command.AddOption(listItemVersionIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var groupId           = (string)parameters[0];
                var driveId           = (string)parameters[1];
                var driveItemId       = (string)parameters[2];
                var listItemVersionId = (string)parameters[3];
                var body = (string)parameters[4];
                var cancellationToken = (CancellationToken)parameters[5];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <FieldValueSet>(FieldValueSet.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("group%2Did", groupId);
                requestInfo.PathParameters.Add("drive%2Did", driveId);
                requestInfo.PathParameters.Add("driveItem%2Did", driveItemId);
                requestInfo.PathParameters.Add("listItemVersion%2Did", listItemVersionId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(groupIdOption, driveIdOption, driveItemIdOption, listItemVersionIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
示例#13
0
        /// <summary>
        /// Delete navigation property singleValueExtendedProperties for users
        /// </summary>
        public Command BuildDeleteCommand()
        {
            var command = new Command("delete");

            command.Description = "Delete navigation property singleValueExtendedProperties for users";
            // Create options for all the parameters
            var userIdOption = new Option <string>("--user-id", description: "key: id of user")
            {
            };

            userIdOption.IsRequired = true;
            command.AddOption(userIdOption);
            var mailFolderIdOption = new Option <string>("--mail-folder-id", description: "key: id of mailFolder")
            {
            };

            mailFolderIdOption.IsRequired = true;
            command.AddOption(mailFolderIdOption);
            var mailFolderId1Option = new Option <string>("--mail-folder-id1", description: "key: id of mailFolder")
            {
            };

            mailFolderId1Option.IsRequired = true;
            command.AddOption(mailFolderId1Option);
            var messageIdOption = new Option <string>("--message-id", description: "key: id of message")
            {
            };

            messageIdOption.IsRequired = true;
            command.AddOption(messageIdOption);
            var singleValueLegacyExtendedPropertyIdOption = new Option <string>("--single-value-legacy-extended-property-id", description: "key: id of singleValueLegacyExtendedProperty")
            {
            };

            singleValueLegacyExtendedPropertyIdOption.IsRequired = true;
            command.AddOption(singleValueLegacyExtendedPropertyIdOption);
            var ifMatchOption = new Option <string>("--if-match", description: "ETag")
            {
            };

            ifMatchOption.IsRequired = false;
            command.AddOption(ifMatchOption);
            command.SetHandler(async(object[] parameters) => {
                var userId        = (string)parameters[0];
                var mailFolderId  = (string)parameters[1];
                var mailFolderId1 = (string)parameters[2];
                var messageId     = (string)parameters[3];
                var singleValueLegacyExtendedPropertyId = (string)parameters[4];
                var ifMatch           = (string)parameters[5];
                var cancellationToken = (CancellationToken)parameters[6];
                var requestInfo       = CreateDeleteRequestInformation(q => {
                });
                requestInfo.PathParameters.Add("user%2Did", userId);
                requestInfo.PathParameters.Add("mailFolder%2Did", mailFolderId);
                requestInfo.PathParameters.Add("mailFolder%2Did1", mailFolderId1);
                requestInfo.PathParameters.Add("message%2Did", messageId);
                requestInfo.PathParameters.Add("singleValueLegacyExtendedProperty%2Did", singleValueLegacyExtendedPropertyId);
                requestInfo.Headers["If-Match"] = ifMatch;
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(userIdOption, mailFolderIdOption, mailFolderId1Option, messageIdOption, singleValueLegacyExtendedPropertyIdOption, ifMatchOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
 /// <summary>
 /// Delete navigation property singleValueExtendedProperties for users
 /// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
 /// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
 /// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
 /// </summary>
 public async Task DeleteAsync(Action <SingleValueLegacyExtendedPropertyItemRequestBuilderDeleteRequestConfiguration> requestConfiguration = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default)
 {
     var requestInfo = CreateDeleteRequestInformation(requestConfiguration);
     await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
        /// <summary>
        /// The page&apos;s HTML content.
        /// </summary>
        public Command BuildPutCommand()
        {
            var command = new Command("put");

            command.Description = "The page's HTML content.";
            // Create options for all the parameters
            var siteIdOption = new Option <string>("--site-id", description: "key: id of site")
            {
            };

            siteIdOption.IsRequired = true;
            command.AddOption(siteIdOption);
            var notebookIdOption = new Option <string>("--notebook-id", description: "key: id of notebook")
            {
            };

            notebookIdOption.IsRequired = true;
            command.AddOption(notebookIdOption);
            var sectionGroupIdOption = new Option <string>("--section-group-id", description: "key: id of sectionGroup")
            {
            };

            sectionGroupIdOption.IsRequired = true;
            command.AddOption(sectionGroupIdOption);
            var onenoteSectionIdOption = new Option <string>("--onenote-section-id", description: "key: id of onenoteSection")
            {
            };

            onenoteSectionIdOption.IsRequired = true;
            command.AddOption(onenoteSectionIdOption);
            var onenotePageIdOption = new Option <string>("--onenote-page-id", description: "key: id of onenotePage")
            {
            };

            onenotePageIdOption.IsRequired = true;
            command.AddOption(onenotePageIdOption);
            var bodyOption = new Option <Stream>("--file", description: "Binary request body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var siteId            = (string)parameters[0];
                var notebookId        = (string)parameters[1];
                var sectionGroupId    = (string)parameters[2];
                var onenoteSectionId  = (string)parameters[3];
                var onenotePageId     = (string)parameters[4];
                var file              = (FileInfo)parameters[5];
                var cancellationToken = (CancellationToken)parameters[6];
                using var stream      = file.OpenRead();
                var requestInfo       = CreatePutRequestInformation(stream, q => {
                });
                requestInfo.PathParameters.Add("site%2Did", siteId);
                requestInfo.PathParameters.Add("notebook%2Did", notebookId);
                requestInfo.PathParameters.Add("sectionGroup%2Did", sectionGroupId);
                requestInfo.PathParameters.Add("onenoteSection%2Did", onenoteSectionId);
                requestInfo.PathParameters.Add("onenotePage%2Did", onenotePageId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(siteIdOption, notebookIdOption, sectionGroupIdOption, onenoteSectionIdOption, onenotePageIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
        /// <summary>
        /// Update the navigation property children in sites
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property children in sites";
            // Create options for all the parameters
            var siteIdOption = new Option <string>("--site-id", description: "key: id of site")
            {
            };

            siteIdOption.IsRequired = true;
            command.AddOption(siteIdOption);
            var storeIdOption = new Option <string>("--store-id", description: "key: id of store")
            {
            };

            storeIdOption.IsRequired = true;
            command.AddOption(storeIdOption);
            var groupIdOption = new Option <string>("--group-id", description: "key: id of group")
            {
            };

            groupIdOption.IsRequired = true;
            command.AddOption(groupIdOption);
            var setIdOption = new Option <string>("--set-id", description: "key: id of set")
            {
            };

            setIdOption.IsRequired = true;
            command.AddOption(setIdOption);
            var termIdOption = new Option <string>("--term-id", description: "key: id of term")
            {
            };

            termIdOption.IsRequired = true;
            command.AddOption(termIdOption);
            var termId1Option = new Option <string>("--term-id1", description: "key: id of term")
            {
            };

            termId1Option.IsRequired = true;
            command.AddOption(termId1Option);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var siteId            = (string)parameters[0];
                var storeId           = (string)parameters[1];
                var groupId           = (string)parameters[2];
                var setId             = (string)parameters[3];
                var termId            = (string)parameters[4];
                var termId1           = (string)parameters[5];
                var body              = (string)parameters[6];
                var cancellationToken = (CancellationToken)parameters[7];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <Term>(Term.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("site%2Did", siteId);
                requestInfo.PathParameters.Add("store%2Did", storeId);
                requestInfo.PathParameters.Add("group%2Did", groupId);
                requestInfo.PathParameters.Add("set%2Did", setId);
                requestInfo.PathParameters.Add("term%2Did", termId);
                requestInfo.PathParameters.Add("term%2Did1", termId1);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(siteIdOption, storeIdOption, groupIdOption, setIdOption, termIdOption, termId1Option, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
        /// <summary>
        /// Delete navigation property multiValueExtendedProperties for groups
        /// </summary>
        public Command BuildDeleteCommand()
        {
            var command = new Command("delete");

            command.Description = "Delete navigation property multiValueExtendedProperties for groups";
            // Create options for all the parameters
            var groupIdOption = new Option <string>("--group-id", description: "key: id of group")
            {
            };

            groupIdOption.IsRequired = true;
            command.AddOption(groupIdOption);
            var conversationIdOption = new Option <string>("--conversation-id", description: "key: id of conversation")
            {
            };

            conversationIdOption.IsRequired = true;
            command.AddOption(conversationIdOption);
            var conversationThreadIdOption = new Option <string>("--conversation-thread-id", description: "key: id of conversationThread")
            {
            };

            conversationThreadIdOption.IsRequired = true;
            command.AddOption(conversationThreadIdOption);
            var postIdOption = new Option <string>("--post-id", description: "key: id of post")
            {
            };

            postIdOption.IsRequired = true;
            command.AddOption(postIdOption);
            var multiValueLegacyExtendedPropertyIdOption = new Option <string>("--multi-value-legacy-extended-property-id", description: "key: id of multiValueLegacyExtendedProperty")
            {
            };

            multiValueLegacyExtendedPropertyIdOption.IsRequired = true;
            command.AddOption(multiValueLegacyExtendedPropertyIdOption);
            var ifMatchOption = new Option <string>("--if-match", description: "ETag")
            {
            };

            ifMatchOption.IsRequired = false;
            command.AddOption(ifMatchOption);
            command.SetHandler(async(object[] parameters) => {
                var groupId              = (string)parameters[0];
                var conversationId       = (string)parameters[1];
                var conversationThreadId = (string)parameters[2];
                var postId = (string)parameters[3];
                var multiValueLegacyExtendedPropertyId = (string)parameters[4];
                var ifMatch           = (string)parameters[5];
                var cancellationToken = (CancellationToken)parameters[6];
                var requestInfo       = CreateDeleteRequestInformation(q => {
                });
                requestInfo.PathParameters.Add("group%2Did", groupId);
                requestInfo.PathParameters.Add("conversation%2Did", conversationId);
                requestInfo.PathParameters.Add("conversationThread%2Did", conversationThreadId);
                requestInfo.PathParameters.Add("post%2Did", postId);
                requestInfo.PathParameters.Add("multiValueLegacyExtendedProperty%2Did", multiValueLegacyExtendedPropertyId);
                requestInfo.Headers["If-Match"] = ifMatch;
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(groupIdOption, conversationIdOption, conversationThreadIdOption, postIdOption, multiValueLegacyExtendedPropertyIdOption, ifMatchOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
        /// <summary>
        /// Update the navigation property singleValueExtendedProperties in groups
        /// </summary>
        public Command BuildPatchCommand()
        {
            var command = new Command("patch");

            command.Description = "Update the navigation property singleValueExtendedProperties in groups";
            // Create options for all the parameters
            var groupIdOption = new Option <string>("--group-id", description: "key: id of group")
            {
            };

            groupIdOption.IsRequired = true;
            command.AddOption(groupIdOption);
            var conversationThreadIdOption = new Option <string>("--conversation-thread-id", description: "key: id of conversationThread")
            {
            };

            conversationThreadIdOption.IsRequired = true;
            command.AddOption(conversationThreadIdOption);
            var postIdOption = new Option <string>("--post-id", description: "key: id of post")
            {
            };

            postIdOption.IsRequired = true;
            command.AddOption(postIdOption);
            var singleValueLegacyExtendedPropertyIdOption = new Option <string>("--single-value-legacy-extended-property-id", description: "key: id of singleValueLegacyExtendedProperty")
            {
            };

            singleValueLegacyExtendedPropertyIdOption.IsRequired = true;
            command.AddOption(singleValueLegacyExtendedPropertyIdOption);
            var bodyOption = new Option <string>("--body")
            {
            };

            bodyOption.IsRequired = true;
            command.AddOption(bodyOption);
            command.SetHandler(async(object[] parameters) => {
                var groupId = (string)parameters[0];
                var conversationThreadId = (string)parameters[1];
                var postId = (string)parameters[2];
                var singleValueLegacyExtendedPropertyId = (string)parameters[3];
                var body = (string)parameters[4];
                var cancellationToken = (CancellationToken)parameters[5];
                using var stream      = new MemoryStream(Encoding.UTF8.GetBytes(body));
                var parseNode         = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
                var model             = parseNode.GetObjectValue <SingleValueLegacyExtendedProperty>(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue);
                var requestInfo       = CreatePatchRequestInformation(model, q => {
                });
                requestInfo.PathParameters.Add("group%2Did", groupId);
                requestInfo.PathParameters.Add("conversationThread%2Did", conversationThreadId);
                requestInfo.PathParameters.Add("post%2Did", postId);
                requestInfo.PathParameters.Add("singleValueLegacyExtendedProperty%2Did", singleValueLegacyExtendedPropertyId);
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(groupIdOption, conversationThreadIdOption, postIdOption, singleValueLegacyExtendedPropertyIdOption, bodyOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }
示例#19
0
        /// <summary>
        /// Delete navigation property hostedContents for me
        /// </summary>
        public Command BuildDeleteCommand()
        {
            var command = new Command("delete");

            command.Description = "Delete navigation property hostedContents for me";
            // Create options for all the parameters
            var teamIdOption = new Option <string>("--team-id", description: "key: id of team")
            {
            };

            teamIdOption.IsRequired = true;
            command.AddOption(teamIdOption);
            var channelIdOption = new Option <string>("--channel-id", description: "key: id of channel")
            {
            };

            channelIdOption.IsRequired = true;
            command.AddOption(channelIdOption);
            var chatMessageIdOption = new Option <string>("--chat-message-id", description: "key: id of chatMessage")
            {
            };

            chatMessageIdOption.IsRequired = true;
            command.AddOption(chatMessageIdOption);
            var chatMessageId1Option = new Option <string>("--chat-message-id1", description: "key: id of chatMessage")
            {
            };

            chatMessageId1Option.IsRequired = true;
            command.AddOption(chatMessageId1Option);
            var chatMessageHostedContentIdOption = new Option <string>("--chat-message-hosted-content-id", description: "key: id of chatMessageHostedContent")
            {
            };

            chatMessageHostedContentIdOption.IsRequired = true;
            command.AddOption(chatMessageHostedContentIdOption);
            var ifMatchOption = new Option <string>("--if-match", description: "ETag")
            {
            };

            ifMatchOption.IsRequired = false;
            command.AddOption(ifMatchOption);
            command.SetHandler(async(object[] parameters) => {
                var teamId                     = (string)parameters[0];
                var channelId                  = (string)parameters[1];
                var chatMessageId              = (string)parameters[2];
                var chatMessageId1             = (string)parameters[3];
                var chatMessageHostedContentId = (string)parameters[4];
                var ifMatch                    = (string)parameters[5];
                var cancellationToken          = (CancellationToken)parameters[6];
                var requestInfo                = CreateDeleteRequestInformation(q => {
                });
                requestInfo.PathParameters.Add("team%2Did", teamId);
                requestInfo.PathParameters.Add("channel%2Did", channelId);
                requestInfo.PathParameters.Add("chatMessage%2Did", chatMessageId);
                requestInfo.PathParameters.Add("chatMessage%2Did1", chatMessageId1);
                requestInfo.PathParameters.Add("chatMessageHostedContent%2Did", chatMessageHostedContentId);
                requestInfo.Headers["If-Match"] = ifMatch;
                var errorMapping = new Dictionary <string, ParsableFactory <IParsable> > {
                    { "4XX", ODataError.CreateFromDiscriminatorValue },
                    { "5XX", ODataError.CreateFromDiscriminatorValue },
                };
                await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken);
                Console.WriteLine("Success");
            }, new CollectionBinding(teamIdOption, channelIdOption, chatMessageIdOption, chatMessageId1Option, chatMessageHostedContentIdOption, ifMatchOption, new TypeBinding(typeof(CancellationToken))));
            return(command);
        }