Skip to content

Commit

Permalink
Merge pull request #2289 from microsoftgraph/kiota/v1.0/pipelinebuild…
Browse files Browse the repository at this point in the history
…/131601

Generated  models and request builders
  • Loading branch information
andrueastman authored Jan 17, 2024
2 parents 86117e9 + a02f2e4 commit 2821a5d
Show file tree
Hide file tree
Showing 162 changed files with 3,076 additions and 422 deletions.
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 adheres to [Semantic Versioning](https://semver.org/spec/v

## [Unreleased]

## [5.39.0] - 2024-01-16

- Latest metadata updates from 16th January 2024.
- Fixes missing interfaces for changenotification models(https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2237).

## [5.38.0] - 2024-01-03

- Latest metadata updates from 2nd 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.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
@@ -1,12 +1,12 @@
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
using Microsoft.Kiota.Abstractions.Store;

namespace Microsoft.Graph.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.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
33 changes: 33 additions & 0 deletions src/Microsoft.Graph/Extensions/SubscriptionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Graph;

namespace Microsoft.Graph.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 async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Retrieve a conversationMember from a chat or channel.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0" />
/// Retrieve a conversationMember from a chat.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/chat-get-members?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 @@ -106,7 +106,7 @@ public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
return requestInfo;
}
/// <summary>
/// Retrieve a conversationMember from a chat or channel.
/// Retrieve a conversationMember from a chat.
/// </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 @@ -154,7 +154,7 @@ public ConversationMemberItemRequestBuilder WithUrl(string rawUrl) {
public class ConversationMemberItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
}
/// <summary>
/// Retrieve a conversationMember from a chat or channel.
/// Retrieve a conversationMember from a chat.
/// </summary>
public class ConversationMemberItemRequestBuilderGetQueryParameters {
/// <summary>Expand related entities</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public async Task<ChatMessageCollectionResponse> GetAsync(Action<RequestConfigur
return await RequestAdapter.SendAsync<ChatMessageCollectionResponse>(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Send a new chatMessage in the specified chat. This API can&apos;t create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0" />
/// Send a new chatMessage in the specified channel or a chat.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/chatmessage-post?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 @@ -105,7 +105,7 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Me
return requestInfo;
}
/// <summary>
/// Send a new chatMessage in the specified chat. This API can&apos;t create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
/// Send a new chatMessage in the specified channel or a chat.
/// </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 @@ -61,6 +61,20 @@ public TeamworkNotificationRecipient Recipient {
get { return BackingStore?.Get<TeamworkNotificationRecipient>("recipient"); }
set { BackingStore?.Set("recipient", value); }
}
#endif
/// <summary>The teamsAppId property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? TeamsAppId {
get { return BackingStore?.Get<string?>("teamsAppId"); }
set { BackingStore?.Set("teamsAppId", value); }
}
#nullable restore
#else
public string TeamsAppId {
get { return BackingStore?.Get<string>("teamsAppId"); }
set { BackingStore?.Set("teamsAppId", value); }
}
#endif
/// <summary>The templateParameters property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -114,6 +128,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
{"chainId", n => { ChainId = n.GetLongValue(); } },
{"previewText", n => { PreviewText = n.GetObjectValue<ItemBody>(ItemBody.CreateFromDiscriminatorValue); } },
{"recipient", n => { Recipient = n.GetObjectValue<TeamworkNotificationRecipient>(TeamworkNotificationRecipient.CreateFromDiscriminatorValue); } },
{"teamsAppId", n => { TeamsAppId = n.GetStringValue(); } },
{"templateParameters", n => { TemplateParameters = n.GetCollectionOfObjectValues<Microsoft.Graph.Models.KeyValuePair>(Microsoft.Graph.Models.KeyValuePair.CreateFromDiscriminatorValue)?.ToList(); } },
{"topic", n => { Topic = n.GetObjectValue<TeamworkActivityTopic>(TeamworkActivityTopic.CreateFromDiscriminatorValue); } },
};
Expand All @@ -128,6 +143,7 @@ public virtual void Serialize(ISerializationWriter writer) {
writer.WriteLongValue("chainId", ChainId);
writer.WriteObjectValue<ItemBody>("previewText", PreviewText);
writer.WriteObjectValue<TeamworkNotificationRecipient>("recipient", Recipient);
writer.WriteStringValue("teamsAppId", TeamsAppId);
writer.WriteCollectionOfObjectValues<Microsoft.Graph.Models.KeyValuePair>("templateParameters", TemplateParameters);
writer.WriteObjectValue<TeamworkActivityTopic>("topic", Topic);
writer.WriteAdditionalData(AdditionalData);
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>
/// 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" />
/// 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" />
/// </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>
/// 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 @@ -105,7 +105,7 @@ public DeviceAppManagementRequestBuilder(string rawUrl, IRequestAdapter requestA
}
/// <summary>
/// Read properties and relationships of the deviceAppManagement object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-partnerintegration-deviceappmanagement-get?view=graph-rest-1.0" />
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-onboarding-deviceappmanagement-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 All @@ -125,7 +125,7 @@ public DeviceAppManagementRequestBuilder(string rawUrl, IRequestAdapter requestA
}
/// <summary>
/// Update the properties of a deviceAppManagement object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-onboarding-deviceappmanagement-update?view=graph-rest-1.0" />
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-policyset-deviceappmanagement-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
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Read properties and relationships of the managedAppProtection object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-get?view=graph-rest-1.0" />
/// Read properties and relationships of the managedAppConfiguration object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedappconfiguration-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 RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
return requestInfo;
}
/// <summary>
/// Read properties and relationships of the managedAppProtection object.
/// Read properties and relationships of the managedAppConfiguration 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 @@ -158,7 +158,7 @@ public ManagedAppPolicyItemRequestBuilder WithUrl(string rawUrl) {
public class ManagedAppPolicyItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
}
/// <summary>
/// Read properties and relationships of the managedAppProtection object.
/// Read properties and relationships of the managedAppConfiguration object.
/// </summary>
public class ManagedAppPolicyItemRequestBuilderGetQueryParameters {
/// <summary>Expand related entities</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public TargetAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) :
}
/// <summary>
/// Not yet documented
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0" />
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?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
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public ManagedAppPoliciesRequestBuilder(Dictionary<string, object> pathParameter
public ManagedAppPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/managedAppPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) {
}
/// <summary>
/// List properties and relationships of the targetedManagedAppProtection objects.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-targetedmanagedappprotection-list?view=graph-rest-1.0" />
/// List properties and relationships of the managedAppConfiguration objects.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedappconfiguration-list?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 @@ -83,7 +83,7 @@ public async Task<ManagedAppPolicy> PostAsync(ManagedAppPolicy body, Action<Requ
return await RequestAdapter.SendAsync<ManagedAppPolicy>(requestInfo, ManagedAppPolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// List properties and relationships of the targetedManagedAppProtection objects.
/// List properties and relationships of the managedAppConfiguration objects.
/// </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 @@ -125,7 +125,7 @@ public ManagedAppPoliciesRequestBuilder WithUrl(string rawUrl) {
return new ManagedAppPoliciesRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// List properties and relationships of the targetedManagedAppProtection objects.
/// List properties and relationships of the managedAppConfiguration objects.
/// </summary>
public class ManagedAppPoliciesRequestBuilderGetQueryParameters {
/// <summary>Include count of items</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public TargetAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) :
}
/// <summary>
/// Not yet documented
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0" />
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public TargetAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) :
}
/// <summary>
/// Not yet documented
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0" />
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?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
Loading

0 comments on commit 2821a5d

Please sign in to comment.