|
| 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; |
| 6 | +using RoxyApi.Models; |
| 7 | +using System.Collections.Generic; |
| 8 | +using System.IO; |
| 9 | +using System.Threading.Tasks; |
| 10 | +using System.Threading; |
| 11 | +using System; |
| 12 | +namespace RoxyApi.Astrology.Asteroids |
| 13 | +{ |
| 14 | + /// <summary> |
| 15 | + /// Builds and executes requests for operations under \astrology\asteroids |
| 16 | + /// </summary> |
| 17 | + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] |
| 18 | + public partial class AsteroidsRequestBuilder : BaseRequestBuilder |
| 19 | + { |
| 20 | + /// <summary> |
| 21 | + /// Instantiates a new <see cref="global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder"/> and sets the default values. |
| 22 | + /// </summary> |
| 23 | + /// <param name="pathParameters">Path parameters for the request</param> |
| 24 | + /// <param name="requestAdapter">The request adapter to use to execute the requests.</param> |
| 25 | + public AsteroidsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/astrology/asteroids{?lang*}", pathParameters) |
| 26 | + { |
| 27 | + } |
| 28 | + /// <summary> |
| 29 | + /// Instantiates a new <see cref="global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder"/> and sets the default values. |
| 30 | + /// </summary> |
| 31 | + /// <param name="rawUrl">The raw URL to use for the request builder.</param> |
| 32 | + /// <param name="requestAdapter">The request adapter to use to execute the requests.</param> |
| 33 | + public AsteroidsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/astrology/asteroids{?lang*}", rawUrl) |
| 34 | + { |
| 35 | + } |
| 36 | + /// <summary> |
| 37 | + /// Calculate the natal positions of the four classical asteroid goddesses, Ceres, Pallas, Juno, and Vesta, for any birth moment. Each asteroid returns its tropical zodiac sign, degree, house placement, daily speed, retrograde status, and a plain language interpretation of its meaning in the chart. Chiron is available through the natal chart endpoint, so this endpoint stays focused on the four asteroid goddesses for natal reports and relationship astrology. |
| 38 | + /// </summary> |
| 39 | + /// <returns>A <see cref="global::RoxyApi.Models.AsteroidsResponse"/></returns> |
| 40 | + /// <param name="body">The request body</param> |
| 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::RoxyApi.Models.RoxyError">When receiving a 400 status code</exception> |
| 44 | + /// <exception cref="global::RoxyApi.Models.RoxyError">When receiving a 401 status code</exception> |
| 45 | + /// <exception cref="global::RoxyApi.Models.RoxyError">When receiving a 405 status code</exception> |
| 46 | + /// <exception cref="global::RoxyApi.Models.RoxyError">When receiving a 429 status code</exception> |
| 47 | + /// <exception cref="global::RoxyApi.Models.RoxyError">When receiving a 500 status code</exception> |
| 48 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 49 | +#nullable enable |
| 50 | + public async Task<global::RoxyApi.Models.AsteroidsResponse?> PostAsync(global::RoxyApi.Models.AsteroidsRequest body, Action<RequestConfiguration<global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder.AsteroidsRequestBuilderPostQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) |
| 51 | + { |
| 52 | +#nullable restore |
| 53 | +#else |
| 54 | + public async Task<global::RoxyApi.Models.AsteroidsResponse> PostAsync(global::RoxyApi.Models.AsteroidsRequest body, Action<RequestConfiguration<global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder.AsteroidsRequestBuilderPostQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) |
| 55 | + { |
| 56 | +#endif |
| 57 | + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); |
| 58 | + var requestInfo = ToPostRequestInformation(body, requestConfiguration); |
| 59 | + var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> |
| 60 | + { |
| 61 | + { "400", global::RoxyApi.Models.RoxyError.CreateFromDiscriminatorValue }, |
| 62 | + { "401", global::RoxyApi.Models.RoxyError.CreateFromDiscriminatorValue }, |
| 63 | + { "405", global::RoxyApi.Models.RoxyError.CreateFromDiscriminatorValue }, |
| 64 | + { "429", global::RoxyApi.Models.RoxyError.CreateFromDiscriminatorValue }, |
| 65 | + { "500", global::RoxyApi.Models.RoxyError.CreateFromDiscriminatorValue }, |
| 66 | + }; |
| 67 | + return await RequestAdapter.SendAsync<global::RoxyApi.Models.AsteroidsResponse>(requestInfo, global::RoxyApi.Models.AsteroidsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); |
| 68 | + } |
| 69 | + /// <summary> |
| 70 | + /// Calculate the natal positions of the four classical asteroid goddesses, Ceres, Pallas, Juno, and Vesta, for any birth moment. Each asteroid returns its tropical zodiac sign, degree, house placement, daily speed, retrograde status, and a plain language interpretation of its meaning in the chart. Chiron is available through the natal chart endpoint, so this endpoint stays focused on the four asteroid goddesses for natal reports and relationship astrology. |
| 71 | + /// </summary> |
| 72 | + /// <returns>A <see cref="RequestInformation"/></returns> |
| 73 | + /// <param name="body">The request body</param> |
| 74 | + /// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> |
| 75 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 76 | +#nullable enable |
| 77 | + public RequestInformation ToPostRequestInformation(global::RoxyApi.Models.AsteroidsRequest body, Action<RequestConfiguration<global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder.AsteroidsRequestBuilderPostQueryParameters>>? requestConfiguration = default) |
| 78 | + { |
| 79 | +#nullable restore |
| 80 | +#else |
| 81 | + public RequestInformation ToPostRequestInformation(global::RoxyApi.Models.AsteroidsRequest body, Action<RequestConfiguration<global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder.AsteroidsRequestBuilderPostQueryParameters>> requestConfiguration = default) |
| 82 | + { |
| 83 | +#endif |
| 84 | + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); |
| 85 | + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); |
| 86 | + requestInfo.Configure(requestConfiguration); |
| 87 | + requestInfo.Headers.TryAdd("Accept", "application/json"); |
| 88 | + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); |
| 89 | + return requestInfo; |
| 90 | + } |
| 91 | + /// <summary> |
| 92 | + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. |
| 93 | + /// </summary> |
| 94 | + /// <returns>A <see cref="global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder"/></returns> |
| 95 | + /// <param name="rawUrl">The raw URL to use for the request builder.</param> |
| 96 | + public global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder WithUrl(string rawUrl) |
| 97 | + { |
| 98 | + return new global::RoxyApi.Astrology.Asteroids.AsteroidsRequestBuilder(rawUrl, RequestAdapter); |
| 99 | + } |
| 100 | + /// <summary> |
| 101 | + /// Calculate the natal positions of the four classical asteroid goddesses, Ceres, Pallas, Juno, and Vesta, for any birth moment. Each asteroid returns its tropical zodiac sign, degree, house placement, daily speed, retrograde status, and a plain language interpretation of its meaning in the chart. Chiron is available through the natal chart endpoint, so this endpoint stays focused on the four asteroid goddesses for natal reports and relationship astrology. |
| 102 | + /// </summary> |
| 103 | + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] |
| 104 | + public partial class AsteroidsRequestBuilderPostQueryParameters |
| 105 | + { |
| 106 | + /// <summary>Response language (ISO 639-1). Supported: en, tr, de, es, hi, pt, fr, ru. Defaults to en. Languages without translations yet return English.</summary> |
| 107 | + [QueryParameter("lang")] |
| 108 | + public global::RoxyApi.Astrology.Asteroids.PostLangQueryParameterType? Lang { get; set; } |
| 109 | + } |
| 110 | + } |
| 111 | +} |
| 112 | +#pragma warning restore CS0618 |
0 commit comments