Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Graph.Models.TeamsAdministration;
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class GetPolicyIdWithTypeWithNameGetResponse : global::Microsoft.Graph.Models.BaseCollectionPaginationCountResponse, IParsable
#pragma warning restore CS1591
{
/// <summary>The value property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<global::Microsoft.Graph.Models.TeamsAdministration.PolicyIdentifierDetail>? Value
{
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.TeamsAdministration.PolicyIdentifierDetail>?>("value"); }
set { BackingStore?.Set("value", value); }
}
#nullable restore
#else
public List<global::Microsoft.Graph.Models.TeamsAdministration.PolicyIdentifierDetail> Value
{
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.TeamsAdministration.PolicyIdentifierDetail>>("value"); }
set { BackingStore?.Set("value", value); }
}
#endif
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
return new global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public override IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>(base.GetFieldDeserializers())
{
{ "value", n => { Value = n.GetCollectionOfObjectValues<global::Microsoft.Graph.Models.TeamsAdministration.PolicyIdentifierDetail>(global::Microsoft.Graph.Models.TeamsAdministration.PolicyIdentifierDetail.CreateFromDiscriminatorValue)?.AsList(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public override void Serialize(ISerializationWriter writer)
{
if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer));
base.Serialize(writer);
writer.WriteCollectionOfObjectValues<global::Microsoft.Graph.Models.TeamsAdministration.PolicyIdentifierDetail>("value", Value);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName
{
[Obsolete("This class is obsolete. Use GetPolicyIdWithTypeWithNameGetResponse instead.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class GetPolicyIdWithTypeWithNameResponse : global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse, IParsable
#pragma warning restore CS1591
{
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
return new global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse();
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName
{
/// <summary>
/// Provides operations to call the getPolicyId method.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="name">Usage: name=&apos;{name}&apos;</param>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
/// <param name="type">Usage: type=&apos;{type}&apos;</param>
public MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter, string name = "", string type = "") : base(requestAdapter, "{+baseurl}/admin/teams/policy/microsoft.graph.teamsAdministration.getPolicyId(type='{type}',name='{name}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters)
{
if (!string.IsNullOrWhiteSpace(name)) PathParameters.Add("name", name);
if (!string.IsNullOrWhiteSpace(type)) PathParameters.Add("type", type);
}
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder"/> 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 MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/teams/policy/microsoft.graph.teamsAdministration.getPolicyId(type='{type}',name='{name}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl)
{
}
/// <summary>
/// Get the policy ID for a given policy name and policy type within Teams administration.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/teamsadministration-teamspolicyassignment-getpolicyid?view=graph-rest-1.0" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse"/></returns>
/// <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.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.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse?> GetAsGetPolicyIdWithTypeWithNameGetResponseAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse> GetAsGetPolicyIdWithTypeWithNameGetResponseAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse>(requestInfo, global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get the policy ID for a given policy name and policy type within Teams administration.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/teamsadministration-teamspolicyassignment-getpolicyid?view=graph-rest-1.0" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse"/></returns>
/// <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.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
[Obsolete("This method is obsolete. Use GetAsGetPolicyIdWithTypeWithNameGetResponseAsync instead.")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse>(requestInfo, global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.GetPolicyIdWithTypeWithNameResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get the policy ID for a given policy name and policy type within Teams administration.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <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 ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
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>
/// <returns>A <see cref="global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder WithUrl(string rawUrl)
{
return new global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Get the policy ID for a given policy name and policy type within Teams administration.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters
{
/// <summary>Include count of items</summary>
[QueryParameter("%24count")]
public bool? Count { get; set; }
/// <summary>Expand related entities</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24expand")]
public string[]? Expand { get; set; }
#nullable restore
#else
[QueryParameter("%24expand")]
public string[] Expand { get; set; }
#endif
/// <summary>Filter items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24filter")]
public string? Filter { get; set; }
#nullable restore
#else
[QueryParameter("%24filter")]
public string Filter { get; set; }
#endif
/// <summary>Order items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24orderby")]
public string[]? Orderby { get; set; }
#nullable restore
#else
[QueryParameter("%24orderby")]
public string[] Orderby { get; set; }
#endif
/// <summary>Search items by search phrases</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24search")]
public string? Search { get; set; }
#nullable restore
#else
[QueryParameter("%24search")]
public string Search { get; set; }
#endif
/// <summary>Select properties to be returned</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24select")]
public string[]? Select { get; set; }
#nullable restore
#else
[QueryParameter("%24select")]
public string[] Select { get; set; }
#endif
/// <summary>Skip the first n items</summary>
[QueryParameter("%24skip")]
public int? Skip { get; set; }
/// <summary>Show only the first n items</summary>
[QueryParameter("%24top")]
public int? Top { get; set; }
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.Admin.Teams.Policy.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder.MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters>
{
}
}
}
#pragma warning restore CS0618
Loading
Loading