Skip to content

Commit

Permalink
Merge pull request #944 from microsoftgraph/andrueastman/putAsyncMethods
Browse files Browse the repository at this point in the history
Put methods for Entity classes.
  • Loading branch information
andrueastman authored Mar 31, 2021
2 parents 017b394 + e1ecdca commit d2421ac
Show file tree
Hide file tree
Showing 908 changed files with 27,174 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ public CallRecordRequest(
return this.SendAsyncWithGraphResponse<CallRecord>(callRecordToUpdate, cancellationToken);
}

/// <summary>
/// Updates the specified CallRecord using PUT.
/// </summary>
/// <param name="callRecordToUpdate">The CallRecord object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task<CallRecord> PutAsync(CallRecord callRecordToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
var updatedEntity = await this.SendAsync<CallRecord>(callRecordToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}

/// <summary>
/// Updates the specified CallRecord using PUT and returns a <see cref="GraphResponse{CallRecord}"/> object.
/// </summary>
/// <param name="callRecordToUpdate">The CallRecord object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await of <see cref="GraphResponse{CallRecord}"/>.</returns>
public System.Threading.Tasks.Task<GraphResponse<CallRecord>> PutResponseAsync(CallRecord callRecordToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
return this.SendAsyncWithGraphResponse<CallRecord>(callRecordToUpdate, cancellationToken);
}

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ public partial interface ICallRecordRequest : Microsoft.Graph.IBaseRequest
/// <returns>The <see cref="GraphResponse{CallRecord}"/> object of the request.</returns>
System.Threading.Tasks.Task<GraphResponse<CallRecord>> UpdateResponseAsync(CallRecord callRecordToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Updates the specified CallRecord using PUT.
/// </summary>
/// <param name="callRecordToUpdate">The CallRecord object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
System.Threading.Tasks.Task<CallRecord> PutAsync(CallRecord callRecordToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Updates the specified CallRecord using PUT and returns a <see cref="GraphResponse{CallRecord}"/> object.
/// </summary>
/// <param name="callRecordToUpdate">The CallRecord object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task of <see cref="GraphResponse{CallRecord}"/> to await.</returns>
System.Threading.Tasks.Task<GraphResponse<CallRecord>> PutResponseAsync(CallRecord callRecordToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ public partial interface ISegmentRequest : Microsoft.Graph.IBaseRequest
/// <returns>The <see cref="GraphResponse{Segment}"/> object of the request.</returns>
System.Threading.Tasks.Task<GraphResponse<Segment>> UpdateResponseAsync(Segment segmentToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Updates the specified Segment using PUT.
/// </summary>
/// <param name="segmentToUpdate">The Segment object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
System.Threading.Tasks.Task<Segment> PutAsync(Segment segmentToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Updates the specified Segment using PUT and returns a <see cref="GraphResponse{Segment}"/> object.
/// </summary>
/// <param name="segmentToUpdate">The Segment object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task of <see cref="GraphResponse{Segment}"/> to await.</returns>
System.Threading.Tasks.Task<GraphResponse<Segment>> PutResponseAsync(Segment segmentToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ public partial interface ISessionRequest : Microsoft.Graph.IBaseRequest
/// <returns>The <see cref="GraphResponse{Session}"/> object of the request.</returns>
System.Threading.Tasks.Task<GraphResponse<Session>> UpdateResponseAsync(Session sessionToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Updates the specified Session using PUT.
/// </summary>
/// <param name="sessionToUpdate">The Session object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
System.Threading.Tasks.Task<Session> PutAsync(Session sessionToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Updates the specified Session using PUT and returns a <see cref="GraphResponse{Session}"/> object.
/// </summary>
/// <param name="sessionToUpdate">The Session object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task of <see cref="GraphResponse{Session}"/> to await.</returns>
System.Threading.Tasks.Task<GraphResponse<Session>> PutResponseAsync(Session sessionToUpdate, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ public SegmentRequest(
return this.SendAsyncWithGraphResponse<Segment>(segmentToUpdate, cancellationToken);
}

/// <summary>
/// Updates the specified Segment using PUT.
/// </summary>
/// <param name="segmentToUpdate">The Segment object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task<Segment> PutAsync(Segment segmentToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
var updatedEntity = await this.SendAsync<Segment>(segmentToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}

/// <summary>
/// Updates the specified Segment using PUT and returns a <see cref="GraphResponse{Segment}"/> object.
/// </summary>
/// <param name="segmentToUpdate">The Segment object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await of <see cref="GraphResponse{Segment}"/>.</returns>
public System.Threading.Tasks.Task<GraphResponse<Segment>> PutResponseAsync(Segment segmentToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
return this.SendAsyncWithGraphResponse<Segment>(segmentToUpdate, cancellationToken);
}

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ public SessionRequest(
return this.SendAsyncWithGraphResponse<Session>(sessionToUpdate, cancellationToken);
}

/// <summary>
/// Updates the specified Session using PUT.
/// </summary>
/// <param name="sessionToUpdate">The Session object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task<Session> PutAsync(Session sessionToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
var updatedEntity = await this.SendAsync<Session>(sessionToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}

/// <summary>
/// Updates the specified Session using PUT and returns a <see cref="GraphResponse{Session}"/> object.
/// </summary>
/// <param name="sessionToUpdate">The Session object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await of <see cref="GraphResponse{Session}"/>.</returns>
public System.Threading.Tasks.Task<GraphResponse<Session>> PutResponseAsync(Session sessionToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
return this.SendAsyncWithGraphResponse<Session>(sessionToUpdate, cancellationToken);
}

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ public AadUserConversationMemberRequest(
return this.SendAsyncWithGraphResponse<AadUserConversationMember>(aadUserConversationMemberToUpdate, cancellationToken);
}

/// <summary>
/// Updates the specified AadUserConversationMember using PUT.
/// </summary>
/// <param name="aadUserConversationMemberToUpdate">The AadUserConversationMember object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task<AadUserConversationMember> PutAsync(AadUserConversationMember aadUserConversationMemberToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
var updatedEntity = await this.SendAsync<AadUserConversationMember>(aadUserConversationMemberToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}

/// <summary>
/// Updates the specified AadUserConversationMember using PUT and returns a <see cref="GraphResponse{AadUserConversationMember}"/> object.
/// </summary>
/// <param name="aadUserConversationMemberToUpdate">The AadUserConversationMember object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await of <see cref="GraphResponse{AadUserConversationMember}"/>.</returns>
public System.Threading.Tasks.Task<GraphResponse<AadUserConversationMember>> PutResponseAsync(AadUserConversationMember aadUserConversationMemberToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
return this.SendAsyncWithGraphResponse<AadUserConversationMember>(aadUserConversationMemberToUpdate, cancellationToken);
}

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ public ActivityBasedTimeoutPolicyRequest(
return this.SendAsyncWithGraphResponse<ActivityBasedTimeoutPolicy>(activityBasedTimeoutPolicyToUpdate, cancellationToken);
}

/// <summary>
/// Updates the specified ActivityBasedTimeoutPolicy using PUT.
/// </summary>
/// <param name="activityBasedTimeoutPolicyToUpdate">The ActivityBasedTimeoutPolicy object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task<ActivityBasedTimeoutPolicy> PutAsync(ActivityBasedTimeoutPolicy activityBasedTimeoutPolicyToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
var updatedEntity = await this.SendAsync<ActivityBasedTimeoutPolicy>(activityBasedTimeoutPolicyToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}

/// <summary>
/// Updates the specified ActivityBasedTimeoutPolicy using PUT and returns a <see cref="GraphResponse{ActivityBasedTimeoutPolicy}"/> object.
/// </summary>
/// <param name="activityBasedTimeoutPolicyToUpdate">The ActivityBasedTimeoutPolicy object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await of <see cref="GraphResponse{ActivityBasedTimeoutPolicy}"/>.</returns>
public System.Threading.Tasks.Task<GraphResponse<ActivityBasedTimeoutPolicy>> PutResponseAsync(ActivityBasedTimeoutPolicy activityBasedTimeoutPolicyToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
return this.SendAsyncWithGraphResponse<ActivityBasedTimeoutPolicy>(activityBasedTimeoutPolicyToUpdate, cancellationToken);
}

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ public ActivityHistoryItemRequest(
return this.SendAsyncWithGraphResponse<ActivityHistoryItem>(activityHistoryItemToUpdate, cancellationToken);
}

/// <summary>
/// Updates the specified ActivityHistoryItem using PUT.
/// </summary>
/// <param name="activityHistoryItemToUpdate">The ActivityHistoryItem object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task<ActivityHistoryItem> PutAsync(ActivityHistoryItem activityHistoryItemToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
var updatedEntity = await this.SendAsync<ActivityHistoryItem>(activityHistoryItemToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}

/// <summary>
/// Updates the specified ActivityHistoryItem using PUT and returns a <see cref="GraphResponse{ActivityHistoryItem}"/> object.
/// </summary>
/// <param name="activityHistoryItemToUpdate">The ActivityHistoryItem object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await of <see cref="GraphResponse{ActivityHistoryItem}"/>.</returns>
public System.Threading.Tasks.Task<GraphResponse<ActivityHistoryItem>> PutResponseAsync(ActivityHistoryItem activityHistoryItemToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
return this.SendAsyncWithGraphResponse<ActivityHistoryItem>(activityHistoryItemToUpdate, cancellationToken);
}

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ public AdministrativeUnitRequest(
return this.SendAsyncWithGraphResponse<AdministrativeUnit>(administrativeUnitToUpdate, cancellationToken);
}

/// <summary>
/// Updates the specified AdministrativeUnit using PUT.
/// </summary>
/// <param name="administrativeUnitToUpdate">The AdministrativeUnit object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task<AdministrativeUnit> PutAsync(AdministrativeUnit administrativeUnitToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
var updatedEntity = await this.SendAsync<AdministrativeUnit>(administrativeUnitToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}

/// <summary>
/// Updates the specified AdministrativeUnit using PUT and returns a <see cref="GraphResponse{AdministrativeUnit}"/> object.
/// </summary>
/// <param name="administrativeUnitToUpdate">The AdministrativeUnit object to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await of <see cref="GraphResponse{AdministrativeUnit}"/>.</returns>
public System.Threading.Tasks.Task<GraphResponse<AdministrativeUnit>> PutResponseAsync(AdministrativeUnit administrativeUnitToUpdate, CancellationToken cancellationToken = default(CancellationToken))
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.PUT;
return this.SendAsyncWithGraphResponse<AdministrativeUnit>(administrativeUnitToUpdate, cancellationToken);
}

/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
Expand Down
Loading

0 comments on commit d2421ac

Please sign in to comment.