/*
* Tribufu API
*
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.3.0
* Contact: contact@tribufu.com
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
namespace Tribufu.Model
{
///
/// AuthorizeRequest
///
[DataContract(Name = "AuthorizeRequest")]
public partial class AuthorizeRequest : IValidatableObject
{
///
/// Gets or Sets ResponseType
///
[DataMember(Name = "response_type", EmitDefaultValue = false)]
public ResponseType? ResponseType { get; set; }
///
/// Gets or Sets CodeChallengeMethod
///
[DataMember(Name = "code_challenge_method", EmitDefaultValue = false)]
public CodeChallengeMethod? CodeChallengeMethod { get; set; }
///
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
protected AuthorizeRequest() { }
///
/// Initializes a new instance of the class.
///
/// responseType.
/// clientId (required).
/// codeChallenge.
/// codeChallengeMethod.
/// redirectUri (required).
/// scope.
/// state.
public AuthorizeRequest(ResponseType? responseType = default(ResponseType?), string clientId = default(string), string codeChallenge = default(string), CodeChallengeMethod? codeChallengeMethod = default(CodeChallengeMethod?), string redirectUri = default(string), string scope = default(string), string state = default(string))
{
// to ensure "clientId" is required (not null)
if (clientId == null)
{
throw new ArgumentNullException("clientId is a required property for AuthorizeRequest and cannot be null");
}
this.ClientId = clientId;
// to ensure "redirectUri" is required (not null)
if (redirectUri == null)
{
throw new ArgumentNullException("redirectUri is a required property for AuthorizeRequest and cannot be null");
}
this.RedirectUri = redirectUri;
this.ResponseType = responseType;
this.CodeChallenge = codeChallenge;
this.CodeChallengeMethod = codeChallengeMethod;
this.Scope = scope;
this.State = state;
}
///
/// Gets or Sets ClientId
///
[DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)]
public string ClientId { get; set; }
///
/// Gets or Sets CodeChallenge
///
[DataMember(Name = "code_challenge", EmitDefaultValue = true)]
public string CodeChallenge { get; set; }
///
/// Gets or Sets RedirectUri
///
[DataMember(Name = "redirect_uri", IsRequired = true, EmitDefaultValue = true)]
public string RedirectUri { get; set; }
///
/// Gets or Sets Scope
///
[DataMember(Name = "scope", EmitDefaultValue = true)]
public string Scope { get; set; }
///
/// Gets or Sets State
///
[DataMember(Name = "state", EmitDefaultValue = true)]
public string State { get; set; }
///
/// Returns the string presentation of the object
///
/// String presentation of the object
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AuthorizeRequest {\n");
sb.Append(" ResponseType: ").Append(ResponseType).Append("\n");
sb.Append(" ClientId: ").Append(ClientId).Append("\n");
sb.Append(" CodeChallenge: ").Append(CodeChallenge).Append("\n");
sb.Append(" CodeChallengeMethod: ").Append(CodeChallengeMethod).Append("\n");
sb.Append(" RedirectUri: ").Append(RedirectUri).Append("\n");
sb.Append(" Scope: ").Append(Scope).Append("\n");
sb.Append(" State: ").Append(State).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
///
/// Returns the JSON string presentation of the object
///
/// JSON string presentation of the object
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}