Skip to content

Commit

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

Generated  models and request builders
  • Loading branch information
andrueastman authored Sep 6, 2023
2 parents b0cba58 + 9ff3386 commit e83fc4a
Show file tree
Hide file tree
Showing 245 changed files with 6,031 additions and 648 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v

## [Unreleased]


## [5.26.0] - 2023-09-06

- Fixes serialization and deserialization of bitwise enums.
- Latest metadata updates from 6th September 2023.

## [5.25.0] - 2023-08-30

- Add `WithUrl` request builders to allow for easier making of requests with arbitrary Urls(https://github.com/microsoft/kiota/pull/3212)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.Graph.Communications.Presences.Item.ClearPresence;
using Microsoft.Graph.Communications.Presences.Item.ClearUserPreferredPresence;
using Microsoft.Graph.Communications.Presences.Item.SetPresence;
using Microsoft.Graph.Communications.Presences.Item.SetStatusMessage;
using Microsoft.Graph.Communications.Presences.Item.SetUserPreferredPresence;
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Graph.Models;
Expand Down Expand Up @@ -30,6 +31,10 @@ public class PresenceItemRequestBuilder : BaseRequestBuilder {
public SetPresenceRequestBuilder SetPresence { get =>
new SetPresenceRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the setStatusMessage method.</summary>
public SetStatusMessageRequestBuilder SetStatusMessage { get =>
new SetStatusMessageRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the setUserPreferredPresence method.</summary>
public SetUserPreferredPresenceRequestBuilder SetUserPreferredPresence { get =>
new SetUserPreferredPresenceRequestBuilder(PathParameters, RequestAdapter);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// <auto-generated/>
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions.Store;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace Microsoft.Graph.Communications.Presences.Item.SetStatusMessage {
public class SetStatusMessagePostRequestBody : 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"); }
set { BackingStore?.Set("additionalData", value); }
}
/// <summary>Stores model information.</summary>
public IBackingStore BackingStore { get; private set; }
/// <summary>The statusMessage property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public PresenceStatusMessage? StatusMessage {
get { return BackingStore?.Get<PresenceStatusMessage?>("statusMessage"); }
set { BackingStore?.Set("statusMessage", value); }
}
#nullable restore
#else
public PresenceStatusMessage StatusMessage {
get { return BackingStore?.Get<PresenceStatusMessage>("statusMessage"); }
set { BackingStore?.Set("statusMessage", value); }
}
#endif
/// <summary>
/// Instantiates a new setStatusMessagePostRequestBody and sets the default values.
/// </summary>
public SetStatusMessagePostRequestBody() {
BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore();
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static SetStatusMessagePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new SetStatusMessagePostRequestBody();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"statusMessage", n => { StatusMessage = n.GetObjectValue<PresenceStatusMessage>(PresenceStatusMessage.CreateFromDiscriminatorValue); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public void Serialize(ISerializationWriter writer) {
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteObjectValue<PresenceStatusMessage>("statusMessage", StatusMessage);
writer.WriteAdditionalData(AdditionalData);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// <auto-generated/>
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace Microsoft.Graph.Communications.Presences.Item.SetStatusMessage {
/// <summary>
/// Provides operations to call the setStatusMessage method.
/// </summary>
public class SetStatusMessageRequestBuilder : BaseRequestBuilder {
/// <summary>
/// Instantiates a new SetStatusMessageRequestBuilder and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public SetStatusMessageRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/presences/{presence%2Did}/setStatusMessage", pathParameters) {
}
/// <summary>
/// Instantiates a new SetStatusMessageRequestBuilder and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public SetStatusMessageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/presences/{presence%2Did}/setStatusMessage", rawUrl) {
}
/// <summary>
/// Invoke action setStatusMessage
/// </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 PostAsync(SetStatusMessagePostRequestBody body, Action<SetStatusMessageRequestBuilderPostRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#nullable restore
#else
public async Task PostAsync(SetStatusMessagePostRequestBody body, Action<SetStatusMessageRequestBuilderPostRequestConfiguration> 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},
};
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken);
}
/// <summary>
/// Invoke action setStatusMessage
/// </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(SetStatusMessagePostRequestBody body, Action<SetStatusMessageRequestBuilderPostRequestConfiguration>? requestConfiguration = default) {
#nullable restore
#else
public RequestInformation ToPostRequestInformation(SetStatusMessagePostRequestBody body, Action<SetStatusMessageRequestBuilderPostRequestConfiguration> requestConfiguration = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation {
HttpMethod = Method.POST,
UrlTemplate = UrlTemplate,
PathParameters = PathParameters,
};
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
if (requestConfiguration != null) {
var requestConfig = new SetStatusMessageRequestBuilderPostRequestConfiguration();
requestConfiguration.Invoke(requestConfig);
requestInfo.AddRequestOptions(requestConfig.Options);
requestInfo.AddHeaders(requestConfig.Headers);
}
return requestInfo;
}
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public SetStatusMessageRequestBuilder WithUrl(string rawUrl) {
return new SetStatusMessageRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
public class SetStatusMessageRequestBuilderPostRequestConfiguration {
/// <summary>Request headers</summary>
public RequestHeaders Headers { get; set; }
/// <summary>Request options</summary>
public IList<IRequestOption> Options { get; set; }
/// <summary>
/// Instantiates a new setStatusMessageRequestBuilderPostRequestConfiguration and sets the default values.
/// </summary>
public SetStatusMessageRequestBuilderPostRequestConfiguration() {
Options = new List<IRequestOption>();
Headers = new RequestHeaders();
}
}
}
}
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-policyset-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-books-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<ManagedAppPolicyItemRequestBuilderDeleteReq
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken);
}
/// <summary>
/// Read properties and relationships of the targetedManagedAppProtection object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-targetedmanagedappprotection-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 @@ -118,7 +118,7 @@ public RequestInformation ToDeleteRequestInformation(Action<ManagedAppPolicyItem
return requestInfo;
}
/// <summary>
/// Read properties and relationships of the targetedManagedAppProtection 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 @@ -195,7 +195,7 @@ public ManagedAppPolicyItemRequestBuilderDeleteRequestConfiguration() {
}
}
/// <summary>
/// Read properties and relationships of the targetedManagedAppProtection 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 managedAppPolicy objects.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-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<Mana
return await RequestAdapter.SendAsync<ManagedAppPolicy>(requestInfo, ManagedAppPolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// List properties and relationships of the managedAppPolicy 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 @@ -144,7 +144,7 @@ public ManagedAppPoliciesRequestBuilder WithUrl(string rawUrl) {
return new ManagedAppPoliciesRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// List properties and relationships of the managedAppPolicy 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 e83fc4a

Please sign in to comment.