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 beta models and request builders #682

Merged
merged 2 commits into from
Jun 27, 2023
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe

## [Unreleased]

## [5.37.0-preview] - 2023-06-27

- Fixes missing `Model` query parameter for Channels.GetAllMessages (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1979)
- Fixes missing `StartDateTime` and `EndDateTime` query parameters for Event delta functions (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1860)
- Fixes missing `PostAsync()` method for AdministrativeUnits[""].Members (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1828)
- Fixes stream buffering for Stream response (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1954)

## [5.36.0-preview] - 2023-06-21

- Fixes incorrect naming for the InnerError property in MainError (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1916)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public ResourceConnectionItemRequestBuilder(Dictionary<string, object> pathParam
public ResourceConnectionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/windows/updates/resourceConnections/{resourceConnection%2Did}{?%24select,%24expand}", rawUrl) {
}
/// <summary>
/// Delete an operationalInsightsConnection object.
/// Find more info here <see href="https://docs.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-delete?view=graph-rest-1.0" />
/// Delete a resourceConnection object.
/// Find more info here <see href="https://docs.microsoft.com/graph/api/windowsupdates-resourceconnection-delete?view=graph-rest-1.0" />
/// </summary>
/// <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>
Expand Down Expand Up @@ -89,7 +89,7 @@ public async Task<ResourceConnection> PatchAsync(ResourceConnection body, Action
return await RequestAdapter.SendAsync<ResourceConnection>(requestInfo, ResourceConnection.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// Delete an operationalInsightsConnection object.
/// Delete a resourceConnection object.
/// </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
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,28 @@ public async Task<DirectoryObjectCollectionResponse> GetAsync(Action<MembersRequ
return await RequestAdapter.SendAsync<DirectoryObjectCollectionResponse>(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// Create new navigation property to members for administrativeUnits
/// Find more info here <see href="https://docs.microsoft.com/graph/api/administrativeunit-post-members?view=graph-rest-1.0" />
/// </summary>
/// <param name="body">The request body</param>
/// <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>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<DirectoryObject?> PostAsync(DirectoryObject body, Action<MembersRequestBuilderPostRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#nullable restore
#else
public async Task<DirectoryObject> PostAsync(DirectoryObject body, Action<MembersRequestBuilderPostRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendAsync<DirectoryObject>(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// Users and groups that are members of this administrative unit. Supports $expand.
/// </summary>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand All @@ -120,6 +142,34 @@ public RequestInformation ToGetRequestInformation(Action<MembersRequestBuilderGe
return requestInfo;
}
/// <summary>
/// Create new navigation property to members for administrativeUnits
/// </summary>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToPostRequestInformation(DirectoryObject body, Action<MembersRequestBuilderPostRequestConfiguration>? requestConfiguration = default) {
#nullable restore
#else
public RequestInformation ToPostRequestInformation(DirectoryObject body, Action<MembersRequestBuilderPostRequestConfiguration> requestConfiguration = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation {
HttpMethod = Method.POST,
UrlTemplate = UrlTemplate,
PathParameters = PathParameters,
};
requestInfo.Headers.Add("Accept", "application/json");
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
if (requestConfiguration != null) {
var requestConfig = new MembersRequestBuilderPostRequestConfiguration();
requestConfiguration.Invoke(requestConfig);
requestInfo.AddRequestOptions(requestConfig.Options);
requestInfo.AddHeaders(requestConfig.Headers);
}
return requestInfo;
}
/// <summary>
/// Users and groups that are members of this administrative unit. Supports $expand.
/// </summary>
public class MembersRequestBuilderGetQueryParameters {
Expand Down Expand Up @@ -201,5 +251,21 @@ public MembersRequestBuilderGetRequestConfiguration() {
Headers = new RequestHeaders();
}
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
public class MembersRequestBuilderPostRequestConfiguration {
/// <summary>Request headers</summary>
public RequestHeaders Headers { get; set; }
/// <summary>Request options</summary>
public IList<IRequestOption> Options { get; set; }
/// <summary>
/// Instantiates a new membersRequestBuilderPostRequestConfiguration and sets the default values.
/// </summary>
public MembersRequestBuilderPostRequestConfiguration() {
Options = new List<IRequestOption>();
Headers = new RequestHeaders();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task<StringCollectionResponse> GetAsync(Action<RefRequestBuilderGet
return await RequestAdapter.SendAsync<StringCollectionResponse>(requestInfo, StringCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// Use this API to add a member (user, group, or device) to an administrative unit or to create a new group within an administrative unit. All group types can be created within an administrative unit. **Note:** Currently, it&apos;s only possible to add one member at a time to an administrative unit.`
/// Create new navigation property ref to members for administrativeUnits
/// Find more info here <see href="https://docs.microsoft.com/graph/api/administrativeunit-post-members?view=graph-rest-1.0" />
/// </summary>
/// <param name="body">The request body</param>
Expand Down Expand Up @@ -95,7 +95,7 @@ public RequestInformation ToGetRequestInformation(Action<RefRequestBuilderGetReq
return requestInfo;
}
/// <summary>
/// Use this API to add a member (user, group, or device) to an administrative unit or to create a new group within an administrative unit. All group types can be created within an administrative unit. **Note:** Currently, it&apos;s only possible to add one member at a time to an administrative unit.`
/// Create new navigation property ref to members for administrativeUnits
/// </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 @@ -28,8 +28,8 @@ public InviteRequestBuilder(Dictionary<string, object> pathParameters, IRequestA
public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/calls/{call%2Did}/participants/invite", rawUrl) {
}
/// <summary>
/// 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://docs.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0" />
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// Find more info here <see href="https://docs.microsoft.com/graph/api/participant-invite?view=graph-rest-1.0" />
/// </summary>
/// <param name="body">The request body</param>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
Expand All @@ -50,7 +50,7 @@ public async Task<InviteParticipantsOperation> PostAsync(InvitePostRequestBody b
return await RequestAdapter.SendAsync<InviteParticipantsOperation>(requestInfo, InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// 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.
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// </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 @@ -38,8 +38,8 @@ public RegistrationRequestBuilder(Dictionary<string, object> pathParameters, IRe
public RegistrationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/onlineMeetings/{onlineMeeting%2Did}/registration{?%24select,%24expand}", rawUrl) {
}
/// <summary>
/// Disable and delete the externalMeetingRegistration of an onlineMeeting.
/// Find more info here <see href="https://docs.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0" />
/// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer.
/// Find more info here <see href="https://docs.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0" />
/// </summary>
/// <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>
Expand All @@ -58,8 +58,8 @@ public async Task DeleteAsync(Action<RegistrationRequestBuilderDeleteRequestConf
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken);
}
/// <summary>
/// Get the externalMeetingRegistration details associated with an onlineMeeting.
/// Find more info here <see href="https://docs.microsoft.com/graph/api/externalmeetingregistration-get?view=graph-rest-1.0" />
/// Get the meetingRegistration details associated with an onlineMeeting on behalf of the organizer.
/// Find more info here <see href="https://docs.microsoft.com/graph/api/meetingregistration-get?view=graph-rest-1.0" />
/// </summary>
/// <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>
Expand Down Expand Up @@ -100,7 +100,7 @@ public async Task<MeetingRegistration> PatchAsync(MeetingRegistration body, Acti
return await RequestAdapter.SendAsync<MeetingRegistration>(requestInfo, MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// Disable and delete the externalMeetingRegistration of an onlineMeeting.
/// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer.
/// </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 All @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action<RegistrationRequestB
return requestInfo;
}
/// <summary>
/// Get the externalMeetingRegistration details associated with an onlineMeeting.
/// Get the meetingRegistration details associated with an onlineMeeting on behalf of the organizer.
/// </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 @@ -194,7 +194,7 @@ public RegistrationRequestBuilderDeleteRequestConfiguration() {
}
}
/// <summary>
/// Get the externalMeetingRegistration details associated with an onlineMeeting.
/// Get the meetingRegistration details associated with an onlineMeeting on behalf of the organizer.
/// </summary>
public class RegistrationRequestBuilderGetQueryParameters {
/// <summary>Expand related entities</summary>
Expand Down
Loading