-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2115 from microsoftgraph/kiota/v1.0/pipelinebuild…
…/124351 Generated models and request builders
- Loading branch information
Showing
245 changed files
with
6,031 additions
and
648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...nerated/Communications/Presences/Item/SetStatusMessage/SetStatusMessagePostRequestBody.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
102 changes: 102 additions & 0 deletions
102
...enerated/Communications/Presences/Item/SetStatusMessage/SetStatusMessageRequestBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.