Skip to content

Commit

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

Generated v1.0 models and request builders using Kiota
  • Loading branch information
andrueastman authored Mar 22, 2022
2 parents 557614f + 0757391 commit 38a6ecb
Show file tree
Hide file tree
Showing 3,320 changed files with 3,391 additions and 74,495 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,44 +69,10 @@ public RequestInformation CreatePostRequestInformation(InstantiateRequestBody bo
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<InstantiateResponse> PostAsync(InstantiateRequestBody body, Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<ApplicationServicePrincipal> PostAsync(InstantiateRequestBody body, Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePostRequestInformation(body, h, o);
return await RequestAdapter.SendAsync<InstantiateResponse>(requestInfo, InstantiateResponse.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
/// <summary>Union type wrapper for classes applicationServicePrincipal</summary>
public class InstantiateResponse : IAdditionalDataHolder, 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; set; }
/// <summary>Union type representation for type applicationServicePrincipal</summary>
public MicrosoftGraphSdk.Models.Microsoft.Graph.ApplicationServicePrincipal ApplicationServicePrincipal { get; set; }
/// <summary>
/// Instantiates a new instantiateResponse and sets the default values.
/// </summary>
public InstantiateResponse() {
AdditionalData = new Dictionary<string, object>();
}
public static InstantiateResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new InstantiateResponse();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public IDictionary<string, Action<T, IParseNode>> GetFieldDeserializers<T>() {
return new Dictionary<string, Action<T, IParseNode>> {
{"applicationServicePrincipal", (o,n) => { (o as InstantiateResponse).ApplicationServicePrincipal = n.GetObjectValue<MicrosoftGraphSdk.Models.Microsoft.Graph.ApplicationServicePrincipal>(MicrosoftGraphSdk.Models.Microsoft.Graph.ApplicationServicePrincipal.CreateFromDiscriminatorValue); } },
};
}
/// <summary>
/// Serializes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteObjectValue<MicrosoftGraphSdk.Models.Microsoft.Graph.ApplicationServicePrincipal>("applicationServicePrincipal", ApplicationServicePrincipal);
writer.WriteAdditionalData(AdditionalData);
}
return await RequestAdapter.SendAsync<ApplicationServicePrincipal>(requestInfo, ApplicationServicePrincipal.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public RequestInformation CreateGetRequestInformation(Action<IDictionary<string,
/// <param name="o">Request options</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<string> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
public async Task<int?> GetAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(h, o);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, responseHandler, errorMapping, cancellationToken);
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, responseHandler, errorMapping, cancellationToken);
}
}
}
Loading

0 comments on commit 38a6ecb

Please sign in to comment.