mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2026-02-04 02:36:55 +00:00
* Generate project with open-api-generator * Add example project * Create wrapper class
111 lines
3.7 KiB
C#
111 lines
3.7 KiB
C#
/*
|
|
* 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>
|
|
/// LoginResponse
|
|
/// </summary>
|
|
[DataContract(Name = "LoginResponse")]
|
|
public partial class LoginResponse : IValidatableObject
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="LoginResponse" /> class.
|
|
/// </summary>
|
|
/// <param name="user">user.</param>
|
|
/// <param name="accessToken">accessToken.</param>
|
|
/// <param name="refreshToken">refreshToken.</param>
|
|
/// <param name="expiresIn">expiresIn.</param>
|
|
public LoginResponse(UserInfo user = default(UserInfo), string accessToken = default(string), string refreshToken = default(string), long expiresIn = default(long))
|
|
{
|
|
this.User = user;
|
|
this.AccessToken = accessToken;
|
|
this.RefreshToken = refreshToken;
|
|
this.ExpiresIn = expiresIn;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or Sets User
|
|
/// </summary>
|
|
[DataMember(Name = "user", EmitDefaultValue = false)]
|
|
public UserInfo User { get; set; }
|
|
|
|
/// <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 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 LoginResponse {\n");
|
|
sb.Append(" User: ").Append(User).Append("\n");
|
|
sb.Append(" AccessToken: ").Append(AccessToken).Append("\n");
|
|
sb.Append(" RefreshToken: ").Append(RefreshToken).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;
|
|
}
|
|
}
|
|
|
|
}
|