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 #790

Merged
merged 4 commits into from
Jan 17, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe

## [Unreleased]

## [5.62.0-preview] - 2024-01-09

- Latest metadata updates from 9th January 2024.
- Fixes missing methods for change notifications.

## [5.61.0-preview] - 2024-01-09

- Latest metadata updates from 9th January 2024.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Graph/Extensions/ChangeNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;
using System;
namespace Microsoft.Graph.Beta.Models {
public class ChangeNotification : IAdditionalDataHolder, IBackedModel, IParsable {
public class ChangeNotification : IEncryptedContentBearer<ChangeNotificationEncryptedContent>,IAdditionalDataHolder, IBackedModel, IParsable {
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData {
get { return BackingStore?.Get<IDictionary<string, object>>("additionalData"); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Kiota.Abstractions.Store;

namespace Microsoft.Graph.Beta.Models {
public class ChangeNotificationCollection : IAdditionalDataHolder,IBackedModel, IParsable {
public class ChangeNotificationCollection : ITokenValidable<ChangeNotification, ChangeNotificationEncryptedContent>,IAdditionalDataHolder, IBackedModel, IParsable {
/// <summary>Stores model information.</summary>
public IBackingStore BackingStore { get; private set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;
using System;
namespace Microsoft.Graph.Beta.Models {
public class ChangeNotificationEncryptedContent : IAdditionalDataHolder, IBackedModel, IParsable {
public class ChangeNotificationEncryptedContent : IDecryptableContent, IAdditionalDataHolder, IBackedModel, IParsable {
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData {
get { return BackingStore?.Get<IDictionary<string, object>>("additionalData"); }
Expand Down
35 changes: 35 additions & 0 deletions src/Microsoft.Graph/Extensions/SubscriptionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Security.Cryptography.X509Certificates;

namespace Microsoft.Graph.Beta.Models
{
public static class SubscriptionExtensions
{
/// <summary>
/// Adds the public encryption certificate information for change notifications with resource data to the subscription creation information.
/// </summary>
/// <param name="subscription">The subscription instance of type <see cref="Subscription"/></param>
/// <param name="certificate">Certificate to use for encryption</param>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="certificate"/> is null</exception>
public static void AddPublicEncryptionCertificate(this Subscription subscription, X509Certificate2 certificate)
{
if (certificate == null)
throw new ArgumentNullException(nameof(certificate));

var tempSubscription = new EncryptableSubscription();
tempSubscription.AddPublicEncryptionCertificate(certificate);
subscription.EncryptionCertificate = tempSubscription.EncryptionCertificate;
}
}

internal class EncryptableSubscription : IEncryptableSubscription
{
/// <summary>
/// The encryption certificate
/// </summary>
public string EncryptionCertificate
{
get; set;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public UpdatableAssetItemRequestBuilder(Dictionary<string, object> pathParameter
public UpdatableAssetItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/windows/updates/updatableAssets/{updatableAsset%2Did}{?%24select,%24expand}", rawUrl) {
}
/// <summary>
/// Delete an updatableAsset object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-delete?view=graph-rest-1.0" />
/// Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-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 @@ -69,8 +69,8 @@ public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Read the properties of an azureADDevice object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-get?view=graph-rest-1.0" />
/// Read the properties and relationships of an updatableAssetGroup object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-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 @@ -110,7 +110,7 @@ public async Task<UpdatableAsset> PatchAsync(UpdatableAsset body, Action<Request
return await RequestAdapter.SendAsync<UpdatableAsset>(requestInfo, UpdatableAsset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Delete an updatableAsset object.
/// Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
/// </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 @@ -126,7 +126,7 @@ public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
return requestInfo;
}
/// <summary>
/// Read the properties of an azureADDevice object.
/// Read the properties and relationships of an updatableAssetGroup 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 Expand Up @@ -174,7 +174,7 @@ public UpdatableAssetItemRequestBuilder WithUrl(string rawUrl) {
public class UpdatableAssetItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
}
/// <summary>
/// Read the properties of an azureADDevice object.
/// Read the properties and relationships of an updatableAssetGroup object.
/// </summary>
public class UpdatableAssetItemRequestBuilderGetQueryParameters {
/// <summary>Expand related entities</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public async Task<ComplianceChange> GetAsync(Action<RequestConfiguration<Complia
return await RequestAdapter.SendAsync<ComplianceChange>(requestInfo, ComplianceChange.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Update the properties of a contentApproval object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-update?view=graph-rest-1.0" />
/// Update the properties of a complianceChange object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-update?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 Down Expand Up @@ -128,7 +128,7 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Co
return requestInfo;
}
/// <summary>
/// Update the properties of a contentApproval object.
/// Update the properties of a complianceChange object.
/// </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 @@ -29,8 +29,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>
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/participant-invite?view=graph-rest-1.0" />
/// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0" />
/// </summary>
/// <param name="body">The request body</param>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
Expand All @@ -51,7 +51,7 @@ public async Task<InviteParticipantsOperation> PostAsync(InvitePostRequestBody b
return await RequestAdapter.SendAsync<InviteParticipantsOperation>(requestInfo, InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
/// </summary>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,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 meetingRegistration of an onlineMeeting on behalf of the organizer.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0" />
/// Disable and delete the externalMeetingRegistration of an onlineMeeting.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/externalmeetingregistration-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 @@ -101,7 +101,7 @@ public async Task<MeetingRegistration> PatchAsync(MeetingRegistration body, Acti
return await RequestAdapter.SendAsync<MeetingRegistration>(requestInfo, MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer.
/// Disable and delete the externalMeetingRegistration of an onlineMeeting.
/// </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 @@ -29,8 +29,8 @@ public InviteRequestBuilder(Dictionary<string, object> pathParameters, IRequestA
public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/calls/{call%2Did}/participants/invite", rawUrl) {
}
/// <summary>
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/participant-invite?view=graph-rest-1.0" />
/// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0" />
/// </summary>
/// <param name="body">The request body</param>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
Expand All @@ -51,7 +51,7 @@ public async Task<InviteParticipantsOperation> PostAsync(InvitePostRequestBody b
return await RequestAdapter.SendAsync<InviteParticipantsOperation>(requestInfo, InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Invite participants to the active call. For more information about how to handle operations, see commsOperation.
/// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
/// </summary>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public RegistrationRequestBuilder(Dictionary<string, object> pathParameters, IRe
public RegistrationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/registration{?%24select,%24expand}", rawUrl) {
}
/// <summary>
/// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0" />
/// Disable and delete the externalMeetingRegistration of an onlineMeeting.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/externalmeetingregistration-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 @@ -101,7 +101,7 @@ public async Task<MeetingRegistration> PatchAsync(MeetingRegistration body, Acti
return await RequestAdapter.SendAsync<MeetingRegistration>(requestInfo, MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer.
/// Disable and delete the externalMeetingRegistration of an onlineMeeting.
/// </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 @@ -49,8 +49,8 @@ public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
return await RequestAdapter.SendAsync<Microsoft.Graph.Beta.Models.ExternalConnectors.Schema>(requestInfo, Microsoft.Graph.Beta.Models.ExternalConnectors.Schema.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Create the schema for a Microsoft Search connection.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/externalconnectors-externalconnection-patch-schema?view=graph-rest-1.0" />
/// Update the properties of a schema for an externalConnection.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/externalconnectors-schema-update?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 Down Expand Up @@ -87,7 +87,7 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Sc
return requestInfo;
}
/// <summary>
/// Create the schema for a Microsoft Search connection.
/// Update the properties of a schema for an externalConnection.
/// </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
Loading
Loading