Skip to content

Commit

Permalink
Merge pull request #951 from microsoftgraph/kiota/beta/pipelinebuild/…
Browse files Browse the repository at this point in the history
…175190

Generated beta models and request builders
  • Loading branch information
Ndiritu authored Jan 2, 2025
2 parents 09b50b6 + b5a4eeb commit ccd6a23
Show file tree
Hide file tree
Showing 326 changed files with 7,822 additions and 2,855 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Read the properties and relationships of an operationalInsightsConnection object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-get?view=graph-rest-beta" />
/// Read the properties and relationships of a resourceConnection object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-get?view=graph-rest-beta" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnection"/></returns>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
Expand Down Expand Up @@ -126,7 +126,7 @@ public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
return requestInfo;
}
/// <summary>
/// Read the properties and relationships of an operationalInsightsConnection object.
/// Read the properties and relationships of a resourceConnection object.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down Expand Up @@ -184,7 +184,7 @@ public partial class ResourceConnectionItemRequestBuilderDeleteRequestConfigurat
{
}
/// <summary>
/// Read the properties and relationships of an operationalInsightsConnection object.
/// Read the properties and relationships of a resourceConnection object.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class ResourceConnectionItemRequestBuilderGetQueryParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public UpdatableAssetItemRequestBuilder(string rawUrl, IRequestAdapter requestAd
{
}
/// <summary>
/// Delete an updatableAsset object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-delete?view=graph-rest-beta" />
/// Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-delete?view=graph-rest-beta" />
/// </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 @@ -82,8 +82,8 @@ public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Read the properties and relationships of an updatableAsset object.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-get?view=graph-rest-beta" />
/// 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-beta" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset"/></returns>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
Expand Down Expand Up @@ -131,7 +131,7 @@ public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset>(requestInfo, global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Delete an updatableAsset object.
/// Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand All @@ -150,7 +150,7 @@ public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
return requestInfo;
}
/// <summary>
/// Read the properties and relationships of an updatableAsset object.
/// Read the properties and relationships of an updatableAssetGroup object.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down Expand Up @@ -208,7 +208,7 @@ public partial class UpdatableAssetItemRequestBuilderDeleteRequestConfiguration
{
}
/// <summary>
/// Read the properties and relationships of an updatableAsset object.
/// Read the properties and relationships of an updatableAssetGroup object.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class UpdatableAssetItemRequestBuilderGetQueryParameters
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions.Store;
using System.Collections.Generic;
using System.IO;
using System;
namespace Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class RestorePostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable
#pragma warning restore CS1591
{
/// <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") ?? new Dictionary<string, object>(); }
set { BackingStore.Set("AdditionalData", value); }
}
/// <summary>Stores model information.</summary>
public IBackingStore BackingStore { get; private set; }
/// <summary>The newUserPrincipalName property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? NewUserPrincipalName
{
get { return BackingStore?.Get<string?>("newUserPrincipalName"); }
set { BackingStore?.Set("newUserPrincipalName", value); }
}
#nullable restore
#else
public string NewUserPrincipalName
{
get { return BackingStore?.Get<string>("newUserPrincipalName"); }
set { BackingStore?.Set("newUserPrincipalName", value); }
}
#endif
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody"/> and sets the default values.
/// </summary>
public RestorePostRequestBody()
{
BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore();
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "newUserPrincipalName", n => { NewUserPrincipalName = n.GetStringValue(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("newUserPrincipalName", NewUserPrincipalName);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba
/// Find more info here <see href="https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-beta" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Beta.Models.DirectoryObject"/></returns>
/// <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>
/// <exception cref="global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<global::Microsoft.Graph.Beta.Models.DirectoryObject?> PostAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<global::Microsoft.Graph.Beta.Models.DirectoryObject?> PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<global::Microsoft.Graph.Beta.Models.DirectoryObject> PostAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<global::Microsoft.Graph.Beta.Models.DirectoryObject> PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToPostRequestInformation(requestConfiguration);
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
Expand All @@ -62,19 +64,22 @@ public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba
/// Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- [certificateAuthorityDetail](../resources/certificateauthoritydetail.md- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user If an item was accidentally deleted, you can fully restore the item. This isn&apos;t applicable to security groups, which are deleted permanently. Also, restoring an application doesn&apos;t restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <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(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.Restore.RestorePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
return requestInfo;
}
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
{
}
/// <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-beta" />
/// 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-beta" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Beta.Models.InviteParticipantsOperation"/></returns>
/// <param name="body">The request body</param>
Expand All @@ -61,7 +61,7 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Beta.Models.InviteParticipantsOperation>(requestInfo, global::Microsoft.Graph.Beta.Models.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>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</param>
Expand Down
Loading

0 comments on commit ccd6a23

Please sign in to comment.