mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2026-02-04 18:59:06 +00:00
Generate client with open-api-generator (#1)
* Generate project with open-api-generator * Add example project * Create wrapper class
This commit is contained in:
128
src/Tribufu.Generated/Model/TokenResponse.cs
Normal file
128
src/Tribufu.Generated/Model/TokenResponse.cs
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.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.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TokenResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "TokenResponse")]
|
||||
public partial class TokenResponse : IValidatableObject
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets TokenType
|
||||
/// </summary>
|
||||
[DataMember(Name = "token_type", EmitDefaultValue = false)]
|
||||
public TokenType? TokenType { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TokenResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="tokenType">tokenType.</param>
|
||||
/// <param name="accessToken">accessToken.</param>
|
||||
/// <param name="refreshToken">refreshToken.</param>
|
||||
/// <param name="scope">scope.</param>
|
||||
/// <param name="state">state.</param>
|
||||
/// <param name="expiresIn">expiresIn.</param>
|
||||
public TokenResponse(TokenType? tokenType = default(TokenType?), string accessToken = default(string), string refreshToken = default(string), string scope = default(string), string state = default(string), long expiresIn = default(long))
|
||||
{
|
||||
this.TokenType = tokenType;
|
||||
this.AccessToken = accessToken;
|
||||
this.RefreshToken = refreshToken;
|
||||
this.Scope = scope;
|
||||
this.State = state;
|
||||
this.ExpiresIn = expiresIn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets AccessToken
|
||||
/// </summary>
|
||||
[DataMember(Name = "access_token", EmitDefaultValue = true)]
|
||||
public string AccessToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets RefreshToken
|
||||
/// </summary>
|
||||
[DataMember(Name = "refresh_token", EmitDefaultValue = true)]
|
||||
public string RefreshToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Scope
|
||||
/// </summary>
|
||||
[DataMember(Name = "scope", EmitDefaultValue = true)]
|
||||
public string Scope { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets State
|
||||
/// </summary>
|
||||
[DataMember(Name = "state", EmitDefaultValue = true)]
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ExpiresIn
|
||||
/// </summary>
|
||||
[DataMember(Name = "expires_in", EmitDefaultValue = false)]
|
||||
public long ExpiresIn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TokenResponse {\n");
|
||||
sb.Append(" TokenType: ").Append(TokenType).Append("\n");
|
||||
sb.Append(" AccessToken: ").Append(AccessToken).Append("\n");
|
||||
sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n");
|
||||
sb.Append(" Scope: ").Append(Scope).Append("\n");
|
||||
sb.Append(" State: ").Append(State).Append("\n");
|
||||
sb.Append(" ExpiresIn: ").Append(ExpiresIn).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user