/// <summary> /// Creates the specified ApplicationSignInDetailedSummary using POST. /// </summary> /// <param name="applicationSignInDetailedSummaryToCreate">The ApplicationSignInDetailedSummary to create.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The created ApplicationSignInDetailedSummary.</returns> public async System.Threading.Tasks.Task <ApplicationSignInDetailedSummary> CreateAsync(ApplicationSignInDetailedSummary applicationSignInDetailedSummaryToCreate, CancellationToken cancellationToken) { this.ContentType = "application/json"; this.Method = "POST"; var newEntity = await this.SendAsync <ApplicationSignInDetailedSummary>(applicationSignInDetailedSummaryToCreate, cancellationToken).ConfigureAwait(false); this.InitializeCollectionProperties(newEntity); return(newEntity); }
/// <summary> /// Creates the specified ApplicationSignInDetailedSummary using POST. /// </summary> /// <param name="applicationSignInDetailedSummaryToCreate">The ApplicationSignInDetailedSummary to create.</param> /// <returns>The created ApplicationSignInDetailedSummary.</returns> public System.Threading.Tasks.Task <ApplicationSignInDetailedSummary> CreateAsync(ApplicationSignInDetailedSummary applicationSignInDetailedSummaryToCreate) { return(this.CreateAsync(applicationSignInDetailedSummaryToCreate, CancellationToken.None)); }
/// <summary> /// Initializes any collection properties after deserialization, like next requests for paging. /// </summary> /// <param name="applicationSignInDetailedSummaryToInitialize">The <see cref="ApplicationSignInDetailedSummary"/> with the collection properties to initialize.</param> private void InitializeCollectionProperties(ApplicationSignInDetailedSummary applicationSignInDetailedSummaryToInitialize) { }
/// <summary> /// Updates the specified ApplicationSignInDetailedSummary using PATCH. /// </summary> /// <param name="applicationSignInDetailedSummaryToUpdate">The ApplicationSignInDetailedSummary to update.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <exception cref="ClientException">Thrown when an object returned in a response is used for updating an object in Microsoft Graph.</exception> /// <returns>The updated ApplicationSignInDetailedSummary.</returns> public async System.Threading.Tasks.Task <ApplicationSignInDetailedSummary> UpdateAsync(ApplicationSignInDetailedSummary applicationSignInDetailedSummaryToUpdate, CancellationToken cancellationToken) { if (applicationSignInDetailedSummaryToUpdate.AdditionalData != null) { if (applicationSignInDetailedSummaryToUpdate.AdditionalData.ContainsKey(Constants.HttpPropertyNames.ResponseHeaders) || applicationSignInDetailedSummaryToUpdate.AdditionalData.ContainsKey(Constants.HttpPropertyNames.StatusCode)) { throw new ClientException( new Error { Code = GeneratedErrorConstants.Codes.NotAllowed, Message = String.Format(GeneratedErrorConstants.Messages.ResponseObjectUsedForUpdate, applicationSignInDetailedSummaryToUpdate.GetType().Name) }); } } if (applicationSignInDetailedSummaryToUpdate.AdditionalData != null) { if (applicationSignInDetailedSummaryToUpdate.AdditionalData.ContainsKey(Constants.HttpPropertyNames.ResponseHeaders) || applicationSignInDetailedSummaryToUpdate.AdditionalData.ContainsKey(Constants.HttpPropertyNames.StatusCode)) { throw new ClientException( new Error { Code = GeneratedErrorConstants.Codes.NotAllowed, Message = String.Format(GeneratedErrorConstants.Messages.ResponseObjectUsedForUpdate, applicationSignInDetailedSummaryToUpdate.GetType().Name) }); } } this.ContentType = "application/json"; this.Method = "PATCH"; var updatedEntity = await this.SendAsync <ApplicationSignInDetailedSummary>(applicationSignInDetailedSummaryToUpdate, cancellationToken).ConfigureAwait(false); this.InitializeCollectionProperties(updatedEntity); return(updatedEntity); }
/// <summary> /// Adds the specified ApplicationSignInDetailedSummary to the collection via POST. /// </summary> /// <param name="applicationSignInDetailedSummary">The ApplicationSignInDetailedSummary to add.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The created ApplicationSignInDetailedSummary.</returns> public System.Threading.Tasks.Task <ApplicationSignInDetailedSummary> AddAsync(ApplicationSignInDetailedSummary applicationSignInDetailedSummary, CancellationToken cancellationToken) { this.ContentType = "application/json"; this.Method = "POST"; return(this.SendAsync <ApplicationSignInDetailedSummary>(applicationSignInDetailedSummary, cancellationToken)); }
/// <summary> /// Adds the specified ApplicationSignInDetailedSummary to the collection via POST. /// </summary> /// <param name="applicationSignInDetailedSummary">The ApplicationSignInDetailedSummary to add.</param> /// <returns>The created ApplicationSignInDetailedSummary.</returns> public System.Threading.Tasks.Task <ApplicationSignInDetailedSummary> AddAsync(ApplicationSignInDetailedSummary applicationSignInDetailedSummary) { return(this.AddAsync(applicationSignInDetailedSummary, CancellationToken.None)); }