Skip to content

Commit 968484b

Browse files
feat(generation): update request builders and models (#3205)
Update generated files with build 251993. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 380ba4d9-c690-4da5-a384-5263d2f0cdf1
1 parent 00904d0 commit 968484b

92 files changed

Lines changed: 5305 additions & 53 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/Microsoft.Graph/Generated/Devices/DevicesRequestBuilder.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Microsoft.Graph.Devices.GetAvailableExtensionProperties;
66
using Microsoft.Graph.Devices.GetByIds;
77
using Microsoft.Graph.Devices.Item;
8+
using Microsoft.Graph.Devices.Provision;
89
using Microsoft.Graph.Devices.ValidateProperties;
910
using Microsoft.Graph.Models.ODataErrors;
1011
using Microsoft.Graph.Models;
@@ -44,6 +45,11 @@ public partial class DevicesRequestBuilder : BaseRequestBuilder
4445
{
4546
get => new global::Microsoft.Graph.Devices.GetByIds.GetByIdsRequestBuilder(PathParameters, RequestAdapter);
4647
}
48+
/// <summary>Provides operations to call the provision method.</summary>
49+
public global::Microsoft.Graph.Devices.Provision.ProvisionRequestBuilder Provision
50+
{
51+
get => new global::Microsoft.Graph.Devices.Provision.ProvisionRequestBuilder(PathParameters, RequestAdapter);
52+
}
4753
/// <summary>Provides operations to call the validateProperties method.</summary>
4854
public global::Microsoft.Graph.Devices.ValidateProperties.ValidatePropertiesRequestBuilder ValidateProperties
4955
{
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Kiota.Abstractions.Extensions;
4+
using Microsoft.Kiota.Abstractions.Serialization;
5+
using Microsoft.Kiota.Abstractions.Store;
6+
using System.Collections.Generic;
7+
using System.IO;
8+
using System;
9+
namespace Microsoft.Graph.Devices.Provision
10+
{
11+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
12+
#pragma warning disable CS1591
13+
public partial class ProvisionPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable
14+
#pragma warning restore CS1591
15+
{
16+
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
17+
public IDictionary<string, object> AdditionalData
18+
{
19+
get { return BackingStore.Get<IDictionary<string, object>>("AdditionalData") ?? new Dictionary<string, object>(); }
20+
set { BackingStore.Set("AdditionalData", value); }
21+
}
22+
/// <summary>Stores model information.</summary>
23+
public IBackingStore BackingStore { get; private set; }
24+
/// <summary>The provisioningBlob property</summary>
25+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
26+
#nullable enable
27+
public string? ProvisioningBlob
28+
{
29+
get { return BackingStore?.Get<string?>("provisioningBlob"); }
30+
set { BackingStore?.Set("provisioningBlob", value); }
31+
}
32+
#nullable restore
33+
#else
34+
public string ProvisioningBlob
35+
{
36+
get { return BackingStore?.Get<string>("provisioningBlob"); }
37+
set { BackingStore?.Set("provisioningBlob", value); }
38+
}
39+
#endif
40+
/// <summary>
41+
/// Instantiates a new <see cref="global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody"/> and sets the default values.
42+
/// </summary>
43+
public ProvisionPostRequestBody()
44+
{
45+
BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore();
46+
AdditionalData = new Dictionary<string, object>();
47+
}
48+
/// <summary>
49+
/// Creates a new instance of the appropriate class based on discriminator value
50+
/// </summary>
51+
/// <returns>A <see cref="global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody"/></returns>
52+
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
53+
public static global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode)
54+
{
55+
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
56+
return new global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody();
57+
}
58+
/// <summary>
59+
/// The deserialization information for the current model
60+
/// </summary>
61+
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
62+
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
63+
{
64+
return new Dictionary<string, Action<IParseNode>>
65+
{
66+
{ "provisioningBlob", n => { ProvisioningBlob = n.GetStringValue(); } },
67+
};
68+
}
69+
/// <summary>
70+
/// Serializes information the current object
71+
/// </summary>
72+
/// <param name="writer">Serialization writer to use to serialize this model</param>
73+
public virtual void Serialize(ISerializationWriter writer)
74+
{
75+
if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer));
76+
writer.WriteStringValue("provisioningBlob", ProvisioningBlob);
77+
writer.WriteAdditionalData(AdditionalData);
78+
}
79+
}
80+
}
81+
#pragma warning restore CS0618
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Graph.Models.ODataErrors;
4+
using Microsoft.Graph.Models;
5+
using Microsoft.Kiota.Abstractions.Extensions;
6+
using Microsoft.Kiota.Abstractions.Serialization;
7+
using Microsoft.Kiota.Abstractions;
8+
using System.Collections.Generic;
9+
using System.IO;
10+
using System.Threading.Tasks;
11+
using System.Threading;
12+
using System;
13+
namespace Microsoft.Graph.Devices.Provision
14+
{
15+
/// <summary>
16+
/// Provides operations to call the provision method.
17+
/// </summary>
18+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
19+
public partial class ProvisionRequestBuilder : BaseRequestBuilder
20+
{
21+
/// <summary>
22+
/// Instantiates a new <see cref="global::Microsoft.Graph.Devices.Provision.ProvisionRequestBuilder"/> and sets the default values.
23+
/// </summary>
24+
/// <param name="pathParameters">Path parameters for the request</param>
25+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
26+
public ProvisionRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/devices/provision", pathParameters)
27+
{
28+
}
29+
/// <summary>
30+
/// Instantiates a new <see cref="global::Microsoft.Graph.Devices.Provision.ProvisionRequestBuilder"/> and sets the default values.
31+
/// </summary>
32+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
33+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
34+
public ProvisionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/devices/provision", rawUrl)
35+
{
36+
}
37+
/// <summary>
38+
/// Provision a device on behalf of an approved Virtual Desktop Infrastructure (VDI) provider. This action wraps the Zero Touch Deployment (ZTD) protocol to create a device in a pending state in the customer&apos;s directory. The device can&apos;t be used for authentication until it completes its registration. The created device is stamped with a system label that identifies the approved VDI provider. Only VDI applications on Microsoft&apos;s approved list of VDI providers can successfully call this action. Calls from other applications are blocked even when the application is granted the required permission.
39+
/// Find more info here <see href="https://learn.microsoft.com/graph/api/device-provision?view=graph-rest-1.0" />
40+
/// </summary>
41+
/// <returns>A <see cref="global::Microsoft.Graph.Models.ProvisionResponse"/></returns>
42+
/// <param name="body">The request body</param>
43+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
44+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
45+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
46+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
47+
#nullable enable
48+
public async Task<global::Microsoft.Graph.Models.ProvisionResponse?> PostAsync(global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
49+
{
50+
#nullable restore
51+
#else
52+
public async Task<global::Microsoft.Graph.Models.ProvisionResponse> PostAsync(global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
53+
{
54+
#endif
55+
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
56+
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
57+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
58+
{
59+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
60+
};
61+
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.ProvisionResponse>(requestInfo, global::Microsoft.Graph.Models.ProvisionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
62+
}
63+
/// <summary>
64+
/// Provision a device on behalf of an approved Virtual Desktop Infrastructure (VDI) provider. This action wraps the Zero Touch Deployment (ZTD) protocol to create a device in a pending state in the customer&apos;s directory. The device can&apos;t be used for authentication until it completes its registration. The created device is stamped with a system label that identifies the approved VDI provider. Only VDI applications on Microsoft&apos;s approved list of VDI providers can successfully call this action. Calls from other applications are blocked even when the application is granted the required permission.
65+
/// </summary>
66+
/// <returns>A <see cref="RequestInformation"/></returns>
67+
/// <param name="body">The request body</param>
68+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
69+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
70+
#nullable enable
71+
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
72+
{
73+
#nullable restore
74+
#else
75+
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Devices.Provision.ProvisionPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
76+
{
77+
#endif
78+
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
79+
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
80+
requestInfo.Configure(requestConfiguration);
81+
requestInfo.Headers.TryAdd("Accept", "application/json");
82+
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
83+
return requestInfo;
84+
}
85+
/// <summary>
86+
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
87+
/// </summary>
88+
/// <returns>A <see cref="global::Microsoft.Graph.Devices.Provision.ProvisionRequestBuilder"/></returns>
89+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
90+
public global::Microsoft.Graph.Devices.Provision.ProvisionRequestBuilder WithUrl(string rawUrl)
91+
{
92+
return new global::Microsoft.Graph.Devices.Provision.ProvisionRequestBuilder(rawUrl, RequestAdapter);
93+
}
94+
/// <summary>
95+
/// Configuration for the request such as headers, query parameters, and middleware options.
96+
/// </summary>
97+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
98+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
99+
public partial class ProvisionRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
100+
{
101+
}
102+
}
103+
}
104+
#pragma warning restore CS0618
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Graph.Models.ODataErrors;
4+
using Microsoft.Graph.Models;
5+
using Microsoft.Kiota.Abstractions.Extensions;
6+
using Microsoft.Kiota.Abstractions.Serialization;
7+
using Microsoft.Kiota.Abstractions;
8+
using System.Collections.Generic;
9+
using System.IO;
10+
using System.Threading.Tasks;
11+
using System.Threading;
12+
using System;
13+
namespace Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus
14+
{
15+
/// <summary>
16+
/// Provides operations to call the refreshStatus method.
17+
/// </summary>
18+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
19+
public partial class RefreshStatusRequestBuilder : BaseRequestBuilder
20+
{
21+
/// <summary>
22+
/// Instantiates a new <see cref="global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus.RefreshStatusRequestBuilder"/> and sets the default values.
23+
/// </summary>
24+
/// <param name="pathParameters">Path parameters for the request</param>
25+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
26+
public RefreshStatusRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/tenantGovernance/relatedTenants/refreshStatus()", pathParameters)
27+
{
28+
}
29+
/// <summary>
30+
/// Instantiates a new <see cref="global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus.RefreshStatusRequestBuilder"/> and sets the default values.
31+
/// </summary>
32+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
33+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
34+
public RefreshStatusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/tenantGovernance/relatedTenants/refreshStatus()", rawUrl)
35+
{
36+
}
37+
/// <summary>
38+
/// Invoke function refreshStatus
39+
/// </summary>
40+
/// <returns>A <see cref="global::Microsoft.Graph.Models.RelatedTenantsRefreshStatus"/></returns>
41+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
42+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
43+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
44+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
45+
#nullable enable
46+
public async Task<global::Microsoft.Graph.Models.RelatedTenantsRefreshStatus?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
47+
{
48+
#nullable restore
49+
#else
50+
public async Task<global::Microsoft.Graph.Models.RelatedTenantsRefreshStatus> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
51+
{
52+
#endif
53+
var requestInfo = ToGetRequestInformation(requestConfiguration);
54+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
55+
{
56+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
57+
};
58+
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.RelatedTenantsRefreshStatus>(requestInfo, global::Microsoft.Graph.Models.RelatedTenantsRefreshStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
59+
}
60+
/// <summary>
61+
/// Invoke function refreshStatus
62+
/// </summary>
63+
/// <returns>A <see cref="RequestInformation"/></returns>
64+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
65+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
66+
#nullable enable
67+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
68+
{
69+
#nullable restore
70+
#else
71+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
72+
{
73+
#endif
74+
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
75+
requestInfo.Configure(requestConfiguration);
76+
requestInfo.Headers.TryAdd("Accept", "application/json");
77+
return requestInfo;
78+
}
79+
/// <summary>
80+
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
81+
/// </summary>
82+
/// <returns>A <see cref="global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus.RefreshStatusRequestBuilder"/></returns>
83+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
84+
public global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus.RefreshStatusRequestBuilder WithUrl(string rawUrl)
85+
{
86+
return new global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus.RefreshStatusRequestBuilder(rawUrl, RequestAdapter);
87+
}
88+
/// <summary>
89+
/// Configuration for the request such as headers, query parameters, and middleware options.
90+
/// </summary>
91+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
92+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
93+
public partial class RefreshStatusRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
94+
{
95+
}
96+
}
97+
}
98+
#pragma warning restore CS0618

‎src/Microsoft.Graph/Generated/DirectoryNamespace/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilder.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.Count;
44
using Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.Item;
55
using Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.Refresh;
6+
using Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus;
67
using Microsoft.Graph.Models.ODataErrors;
78
using Microsoft.Graph.Models;
89
using Microsoft.Kiota.Abstractions.Extensions;
@@ -31,6 +32,11 @@ public partial class RelatedTenantsRequestBuilder : BaseRequestBuilder
3132
{
3233
get => new global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.Refresh.RefreshRequestBuilder(PathParameters, RequestAdapter);
3334
}
35+
/// <summary>Provides operations to call the refreshStatus method.</summary>
36+
public global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus.RefreshStatusRequestBuilder RefreshStatus
37+
{
38+
get => new global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.RefreshStatus.RefreshStatusRequestBuilder(PathParameters, RequestAdapter);
39+
}
3440
/// <summary>Provides operations to manage the relatedTenants property of the microsoft.graph.tenantGovernance entity.</summary>
3541
/// <param name="position">The unique identifier of relatedTenant</param>
3642
/// <returns>A <see cref="global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.RelatedTenants.Item.RelatedTenantItemRequestBuilder"/></returns>

0 commit comments

Comments
 (0)