mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2026-02-04 10:46:34 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9678659892 | |||
| 87334bb28c | |||
| d26c3bd11a | |||
| e3c42a9911 |
@@ -26,7 +26,6 @@ src/Tribufu/Model/CodeChallengeMethod.cs
|
||||
src/Tribufu/Model/CodeResponse.cs
|
||||
src/Tribufu/Model/CreateUser.cs
|
||||
src/Tribufu/Model/CryptoViewModel.cs
|
||||
src/Tribufu/Model/File.cs
|
||||
src/Tribufu/Model/Game.cs
|
||||
src/Tribufu/Model/GameServer.cs
|
||||
src/Tribufu/Model/GameServerCluster.cs
|
||||
@@ -34,7 +33,7 @@ src/Tribufu/Model/GameServerQuery.cs
|
||||
src/Tribufu/Model/GameServerStatus.cs
|
||||
src/Tribufu/Model/GrantType.cs
|
||||
src/Tribufu/Model/Group.cs
|
||||
src/Tribufu/Model/GroupGame.cs
|
||||
src/Tribufu/Model/GroupApplication.cs
|
||||
src/Tribufu/Model/GroupMember.cs
|
||||
src/Tribufu/Model/GroupRank.cs
|
||||
src/Tribufu/Model/HashViewModel.cs
|
||||
@@ -47,6 +46,9 @@ src/Tribufu/Model/LoginProvider.cs
|
||||
src/Tribufu/Model/ModelClient.cs
|
||||
src/Tribufu/Model/Package.cs
|
||||
src/Tribufu/Model/PackageRelease.cs
|
||||
src/Tribufu/Model/Product.cs
|
||||
src/Tribufu/Model/ProductPrice.cs
|
||||
src/Tribufu/Model/ProductType.cs
|
||||
src/Tribufu/Model/Profile.cs
|
||||
src/Tribufu/Model/ProfileGame.cs
|
||||
src/Tribufu/Model/ProfileGroup.cs
|
||||
@@ -55,8 +57,7 @@ src/Tribufu/Model/RevokeRequest.cs
|
||||
src/Tribufu/Model/Search.cs
|
||||
src/Tribufu/Model/SearchType.cs
|
||||
src/Tribufu/Model/ServerMetrics.cs
|
||||
src/Tribufu/Model/Subscription.cs
|
||||
src/Tribufu/Model/SubscriptionPrice.cs
|
||||
src/Tribufu/Model/StorageFile.cs
|
||||
src/Tribufu/Model/TokenHintType.cs
|
||||
src/Tribufu/Model/TokenRequest.cs
|
||||
src/Tribufu/Model/TokenResponse.cs
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://github.com/tribufu/tribufu-dotnet</RepositoryUrl>
|
||||
<Version>1.2.0</Version>
|
||||
<Version>1.3.0</Version>
|
||||
<AssemblyVersion>$(Version).0</AssemblyVersion>
|
||||
<NoWarn>$(NoWarn);0618;1591;1998;2002;8767</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[![MIT License][mit-badge]][mit-url]
|
||||
[![Discord Chat][discord-badge]][discord-url]
|
||||
|
||||
[nuget-badge]: https://img.shields.io/nuget/v/tribufu.svg
|
||||
[nuget-badge]: https://img.shields.io/nuget/v/Tribufu.svg
|
||||
[nuget-url]: https://www.nuget.org/packages/Tribufu
|
||||
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
|
||||
[mit-url]: https://github.com/tribufu/tribufu-dotnet/blob/main/LICENSE.txt
|
||||
|
||||
@@ -7,6 +7,6 @@ java -jar ./vendor/openapi-generator/openapi-generator-cli.jar generate `
|
||||
-g csharp `
|
||||
-o . `
|
||||
--global-property apis,models,supportingFiles,apiDocs=false,modelDocs=false,apiTests=false,modelTests=false `
|
||||
--additional-properties=packageName=Tribufu,library=restsharp,zeroBasedEnums=true,nullableReferenceTypes=true `
|
||||
--additional-properties=packageName=Tribufu,library=restsharp,targetFramework=net47,zeroBasedEnums=true `
|
||||
--openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=TribufuGenerated `
|
||||
--skip-validate-spec
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -23,6 +23,7 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using RestSharp;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -101,12 +101,6 @@ namespace Tribufu.Client
|
||||
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
|
||||
// For example: 2009-06-15T13:45:30.0000000
|
||||
return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
|
||||
if (obj is DateOnly dateOnly)
|
||||
// Return a formatted date string - Can be customized with Configuration.DateTimeFormat
|
||||
// Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
|
||||
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
|
||||
// For example: 2009-06-15
|
||||
return dateOnly.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
|
||||
if (obj is bool boolean)
|
||||
return boolean ? "true" : "false";
|
||||
if (obj is ICollection collection) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -540,7 +540,7 @@ namespace Tribufu.Client
|
||||
string report = "C# SDK (Tribufu) Debug Report:\n";
|
||||
report += " OS: " + System.Environment.OSVersion + "\n";
|
||||
report += " .NET Framework Version: " + System.Environment.Version + "\n";
|
||||
report += " Version of the API: 1.2.6\n";
|
||||
report += " Version of the API: 1.3.0\n";
|
||||
report += " SDK Package Version: 1.0.0\n";
|
||||
|
||||
return report;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -221,6 +221,12 @@ namespace Tribufu.Model
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Name (string) maxLength
|
||||
if (this.Name != null && this.Name.Length > 75)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -27,18 +27,18 @@ using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// GroupGame
|
||||
/// GroupApplication
|
||||
/// </summary>
|
||||
[DataContract(Name = "GroupGame")]
|
||||
public partial class GroupGame : IValidatableObject
|
||||
[DataContract(Name = "GroupApplication")]
|
||||
public partial class GroupApplication : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupGame" /> class.
|
||||
/// Initializes a new instance of the <see cref="GroupApplication" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected GroupGame() { }
|
||||
protected GroupApplication() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupGame" /> class.
|
||||
/// Initializes a new instance of the <see cref="GroupApplication" /> class.
|
||||
/// </summary>
|
||||
/// <param name="groupId">groupId (required).</param>
|
||||
/// <param name="group">group.</param>
|
||||
@@ -47,12 +47,12 @@ namespace Tribufu.Model
|
||||
/// <param name="stats">stats.</param>
|
||||
/// <param name="acquired">acquired.</param>
|
||||
/// <param name="lastUsed">lastUsed.</param>
|
||||
public GroupGame(string groupId = default(string), Group group = default(Group), string applicationId = default(string), Application application = default(Application), Object stats = default(Object), DateTime acquired = default(DateTime), DateTime? lastUsed = default(DateTime?))
|
||||
public GroupApplication(string groupId = default(string), Group group = default(Group), string applicationId = default(string), Application application = default(Application), Object stats = default(Object), DateTime acquired = default(DateTime), DateTime? lastUsed = default(DateTime?))
|
||||
{
|
||||
// to ensure "groupId" is required (not null)
|
||||
if (groupId == null)
|
||||
{
|
||||
throw new ArgumentNullException("groupId is a required property for GroupGame and cannot be null");
|
||||
throw new ArgumentNullException("groupId is a required property for GroupApplication and cannot be null");
|
||||
}
|
||||
this.GroupId = groupId;
|
||||
this.Group = group;
|
||||
@@ -112,7 +112,7 @@ namespace Tribufu.Model
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class GroupGame {\n");
|
||||
sb.Append("class GroupApplication {\n");
|
||||
sb.Append(" GroupId: ").Append(GroupId).Append("\n");
|
||||
sb.Append(" Group: ").Append(Group).Append("\n");
|
||||
sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n");
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -39,11 +39,12 @@ namespace Tribufu.Model
|
||||
/// <param name="varVersion">varVersion.</param>
|
||||
/// <param name="network">network.</param>
|
||||
/// <param name="reserved">reserved.</param>
|
||||
/// <param name="banned">banned.</param>
|
||||
/// <param name="asn">asn.</param>
|
||||
/// <param name="isp">isp.</param>
|
||||
/// <param name="continent">continent.</param>
|
||||
/// <param name="country">country.</param>
|
||||
/// <param name="region">region.</param>
|
||||
/// <param name="province">province.</param>
|
||||
/// <param name="city">city.</param>
|
||||
/// <param name="postalCode">postalCode.</param>
|
||||
/// <param name="callingCode">callingCode.</param>
|
||||
@@ -53,17 +54,18 @@ namespace Tribufu.Model
|
||||
/// <param name="currency">currency.</param>
|
||||
/// <param name="latitude">latitude.</param>
|
||||
/// <param name="longitude">longitude.</param>
|
||||
public IpAddress(string address = default(string), int varVersion = default(int), string network = default(string), bool reserved = default(bool), string asn = default(string), string isp = default(string), string continent = default(string), string country = default(string), string region = default(string), string city = default(string), string postalCode = default(string), string callingCode = default(string), string tld = default(string), string language = default(string), string timezone = default(string), string currency = default(string), float? latitude = default(float?), float? longitude = default(float?))
|
||||
public IpAddress(string address = default(string), int varVersion = default(int), string network = default(string), bool reserved = default(bool), bool banned = default(bool), string asn = default(string), string isp = default(string), string continent = default(string), string country = default(string), string province = default(string), string city = default(string), string postalCode = default(string), string callingCode = default(string), string tld = default(string), string language = default(string), string timezone = default(string), string currency = default(string), float? latitude = default(float?), float? longitude = default(float?))
|
||||
{
|
||||
this.Address = address;
|
||||
this.VarVersion = varVersion;
|
||||
this.Network = network;
|
||||
this.Reserved = reserved;
|
||||
this.Banned = banned;
|
||||
this.Asn = asn;
|
||||
this.Isp = isp;
|
||||
this.Continent = continent;
|
||||
this.Country = country;
|
||||
this.Region = region;
|
||||
this.Province = province;
|
||||
this.City = city;
|
||||
this.PostalCode = postalCode;
|
||||
this.CallingCode = callingCode;
|
||||
@@ -99,6 +101,12 @@ namespace Tribufu.Model
|
||||
[DataMember(Name = "reserved", EmitDefaultValue = true)]
|
||||
public bool Reserved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Banned
|
||||
/// </summary>
|
||||
[DataMember(Name = "banned", EmitDefaultValue = true)]
|
||||
public bool Banned { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Asn
|
||||
/// </summary>
|
||||
@@ -124,10 +132,10 @@ namespace Tribufu.Model
|
||||
public string Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Region
|
||||
/// Gets or Sets Province
|
||||
/// </summary>
|
||||
[DataMember(Name = "region", EmitDefaultValue = true)]
|
||||
public string Region { get; set; }
|
||||
[DataMember(Name = "province", EmitDefaultValue = true)]
|
||||
public string Province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets City
|
||||
@@ -195,11 +203,12 @@ namespace Tribufu.Model
|
||||
sb.Append(" VarVersion: ").Append(VarVersion).Append("\n");
|
||||
sb.Append(" Network: ").Append(Network).Append("\n");
|
||||
sb.Append(" Reserved: ").Append(Reserved).Append("\n");
|
||||
sb.Append(" Banned: ").Append(Banned).Append("\n");
|
||||
sb.Append(" Asn: ").Append(Asn).Append("\n");
|
||||
sb.Append(" Isp: ").Append(Isp).Append("\n");
|
||||
sb.Append(" Continent: ").Append(Continent).Append("\n");
|
||||
sb.Append(" Country: ").Append(Country).Append("\n");
|
||||
sb.Append(" Region: ").Append(Region).Append("\n");
|
||||
sb.Append(" Province: ").Append(Province).Append("\n");
|
||||
sb.Append(" City: ").Append(City).Append("\n");
|
||||
sb.Append(" PostalCode: ").Append(PostalCode).Append("\n");
|
||||
sb.Append(" CallingCode: ").Append(CallingCode).Append("\n");
|
||||
@@ -265,10 +274,10 @@ namespace Tribufu.Model
|
||||
yield return new ValidationResult("Invalid value for Country, length must be less than 2.", new [] { "Country" });
|
||||
}
|
||||
|
||||
// Region (string) maxLength
|
||||
if (this.Region != null && this.Region.Length > 255)
|
||||
// Province (string) maxLength
|
||||
if (this.Province != null && this.Province.Length > 255)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Region, length must be less than 255.", new [] { "Region" });
|
||||
yield return new ValidationResult("Invalid value for Province, length must be less than 255.", new [] { "Province" });
|
||||
}
|
||||
|
||||
// City (string) maxLength
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -89,7 +89,7 @@ namespace Tribufu.Model
|
||||
/// Gets or Sets Files
|
||||
/// </summary>
|
||||
[DataMember(Name = "files", EmitDefaultValue = true)]
|
||||
public List<File> Files { get; private set; }
|
||||
public List<StorageFile> Files { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as Files should not be serialized given that it's read-only.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -27,37 +27,49 @@ using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Subscription
|
||||
/// Product
|
||||
/// </summary>
|
||||
[DataContract(Name = "Subscription")]
|
||||
public partial class Subscription : IValidatableObject
|
||||
[DataContract(Name = "Product")]
|
||||
public partial class Product : IValidatableObject
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Subscription" /> class.
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name = "type", EmitDefaultValue = false)]
|
||||
public ProductType? Type { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Product" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Subscription() { }
|
||||
protected Product() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Subscription" /> class.
|
||||
/// Initializes a new instance of the <see cref="Product" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="description">description.</param>
|
||||
/// <param name="type">type.</param>
|
||||
/// <param name="slug">slug.</param>
|
||||
/// <param name="imageUrl">imageUrl.</param>
|
||||
/// <param name="isPhysical">isPhysical.</param>
|
||||
/// <param name="prices">prices.</param>
|
||||
/// <param name="created">created.</param>
|
||||
/// <param name="updated">updated.</param>
|
||||
public Subscription(string id = default(string), string name = default(string), string description = default(string), string imageUrl = default(string), List<SubscriptionPrice> prices = default(List<SubscriptionPrice>), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
public Product(string id = default(string), string name = default(string), string description = default(string), ProductType? type = default(ProductType?), string slug = default(string), string imageUrl = default(string), bool isPhysical = default(bool), List<ProductPrice> prices = default(List<ProductPrice>), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name is a required property for Subscription and cannot be null");
|
||||
throw new ArgumentNullException("name is a required property for Product and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
this.Id = id;
|
||||
this.Description = description;
|
||||
this.Type = type;
|
||||
this.Slug = slug;
|
||||
this.ImageUrl = imageUrl;
|
||||
this.IsPhysical = isPhysical;
|
||||
this.Prices = prices;
|
||||
this.Created = created;
|
||||
this.Updated = updated;
|
||||
@@ -81,17 +93,29 @@ namespace Tribufu.Model
|
||||
[DataMember(Name = "description", EmitDefaultValue = true)]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Slug
|
||||
/// </summary>
|
||||
[DataMember(Name = "slug", EmitDefaultValue = true)]
|
||||
public string Slug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ImageUrl
|
||||
/// </summary>
|
||||
[DataMember(Name = "image_url", EmitDefaultValue = true)]
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets IsPhysical
|
||||
/// </summary>
|
||||
[DataMember(Name = "is_physical", EmitDefaultValue = true)]
|
||||
public bool IsPhysical { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Prices
|
||||
/// </summary>
|
||||
[DataMember(Name = "prices", EmitDefaultValue = true)]
|
||||
public List<SubscriptionPrice> Prices { get; set; }
|
||||
public List<ProductPrice> Prices { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Created
|
||||
@@ -112,11 +136,14 @@ namespace Tribufu.Model
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class Subscription {\n");
|
||||
sb.Append("class Product {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Description: ").Append(Description).Append("\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" Slug: ").Append(Slug).Append("\n");
|
||||
sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n");
|
||||
sb.Append(" IsPhysical: ").Append(IsPhysical).Append("\n");
|
||||
sb.Append(" Prices: ").Append(Prices).Append("\n");
|
||||
sb.Append(" Created: ").Append(Created).Append("\n");
|
||||
sb.Append(" Updated: ").Append(Updated).Append("\n");
|
||||
@@ -146,6 +173,12 @@ namespace Tribufu.Model
|
||||
yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" });
|
||||
}
|
||||
|
||||
// Slug (string) maxLength
|
||||
if (this.Slug != null && this.Slug.Length > 75)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Slug, length must be less than 75.", new [] { "Slug" });
|
||||
}
|
||||
|
||||
// ImageUrl (string) maxLength
|
||||
if (this.ImageUrl != null && this.ImageUrl.Length > 255)
|
||||
{
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -27,28 +27,28 @@ using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// SubscriptionPrice
|
||||
/// ProductPrice
|
||||
/// </summary>
|
||||
[DataContract(Name = "SubscriptionPrice")]
|
||||
public partial class SubscriptionPrice : IValidatableObject
|
||||
[DataContract(Name = "ProductPrice")]
|
||||
public partial class ProductPrice : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SubscriptionPrice" /> class.
|
||||
/// Initializes a new instance of the <see cref="ProductPrice" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected SubscriptionPrice() { }
|
||||
protected ProductPrice() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SubscriptionPrice" /> class.
|
||||
/// Initializes a new instance of the <see cref="ProductPrice" /> class.
|
||||
/// </summary>
|
||||
/// <param name="currency">currency (required).</param>
|
||||
/// <param name="amount">amount (required).</param>
|
||||
/// <param name="amount">amount.</param>
|
||||
/// <param name="renewal">renewal.</param>
|
||||
public SubscriptionPrice(string currency = default(string), double amount = default(double), double? renewal = default(double?))
|
||||
public ProductPrice(string currency = default(string), double amount = default(double), double? renewal = default(double?))
|
||||
{
|
||||
// to ensure "currency" is required (not null)
|
||||
if (currency == null)
|
||||
{
|
||||
throw new ArgumentNullException("currency is a required property for SubscriptionPrice and cannot be null");
|
||||
throw new ArgumentNullException("currency is a required property for ProductPrice and cannot be null");
|
||||
}
|
||||
this.Currency = currency;
|
||||
this.Amount = amount;
|
||||
@@ -64,7 +64,7 @@ namespace Tribufu.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Amount
|
||||
/// </summary>
|
||||
[DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)]
|
||||
[DataMember(Name = "amount", EmitDefaultValue = false)]
|
||||
public double Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -80,7 +80,7 @@ namespace Tribufu.Model
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class SubscriptionPrice {\n");
|
||||
sb.Append("class ProductPrice {\n");
|
||||
sb.Append(" Currency: ").Append(Currency).Append("\n");
|
||||
sb.Append(" Amount: ").Append(Amount).Append("\n");
|
||||
sb.Append(" Renewal: ").Append(Renewal).Append("\n");
|
||||
48
src/Tribufu/Model/ProductType.cs
Normal file
48
src/Tribufu/Model/ProductType.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines ProductType
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum ProductType
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum Product for value: product
|
||||
/// </summary>
|
||||
[EnumMember(Value = "product")]
|
||||
Product,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Subscription for value: subscription
|
||||
/// </summary>
|
||||
[EnumMember(Value = "subscription")]
|
||||
Subscription
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ namespace Tribufu.Model
|
||||
/// <param name="viewCount">viewCount.</param>
|
||||
/// <param name="created">created.</param>
|
||||
/// <param name="updated">updated.</param>
|
||||
public Profile(string id = default(string), Guid uuid = default(Guid), string name = default(string), string displayName = default(string), bool verified = default(bool), int level = default(int), double experience = default(double), bool publicBirthday = default(bool), DateOnly? birthday = default(DateOnly?), double points = default(double), string location = default(string), string photoUrl = default(string), string bannerUrl = default(string), DateTime? lastOnline = default(DateTime?), string biography = default(string), int viewCount = default(int), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
public Profile(string id = default(string), Guid uuid = default(Guid), string name = default(string), string displayName = default(string), bool verified = default(bool), int level = default(int), double experience = default(double), bool publicBirthday = default(bool), DateTime? birthday = default(DateTime?), double points = default(double), string location = default(string), string photoUrl = default(string), string bannerUrl = default(string), DateTime? lastOnline = default(DateTime?), string biography = default(string), int viewCount = default(int), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
{
|
||||
this.Id = id;
|
||||
this.Uuid = uuid;
|
||||
@@ -127,7 +127,8 @@ namespace Tribufu.Model
|
||||
/// Gets or Sets Birthday
|
||||
/// </summary>
|
||||
[DataMember(Name = "birthday", EmitDefaultValue = true)]
|
||||
public DateOnly? Birthday { get; set; }
|
||||
[JsonConverter(typeof(OpenAPIDateConverter))]
|
||||
public DateTime? Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Points
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
@@ -27,52 +27,52 @@ using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// File
|
||||
/// StorageFile
|
||||
/// </summary>
|
||||
[DataContract(Name = "File")]
|
||||
public partial class File : IValidatableObject
|
||||
[DataContract(Name = "StorageFile")]
|
||||
public partial class StorageFile : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="File" /> class.
|
||||
/// Initializes a new instance of the <see cref="StorageFile" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected File() { }
|
||||
protected StorageFile() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="File" /> class.
|
||||
/// Initializes a new instance of the <see cref="StorageFile" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="contentType">contentType (required).</param>
|
||||
/// <param name="url">url (required).</param>
|
||||
/// <param name="size">size.</param>
|
||||
/// <param name="hash">hash.</param>
|
||||
/// <param name="etag">etag.</param>
|
||||
/// <param name="size">size.</param>
|
||||
/// <param name="created">created.</param>
|
||||
/// <param name="updated">updated.</param>
|
||||
public File(string id = default(string), string name = default(string), string contentType = default(string), string url = default(string), string hash = default(string), string etag = default(string), long size = default(long), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
public StorageFile(string id = default(string), string name = default(string), string contentType = default(string), string url = default(string), long size = default(long), string hash = default(string), string etag = default(string), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name is a required property for File and cannot be null");
|
||||
throw new ArgumentNullException("name is a required property for StorageFile and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
// to ensure "contentType" is required (not null)
|
||||
if (contentType == null)
|
||||
{
|
||||
throw new ArgumentNullException("contentType is a required property for File and cannot be null");
|
||||
throw new ArgumentNullException("contentType is a required property for StorageFile and cannot be null");
|
||||
}
|
||||
this.ContentType = contentType;
|
||||
// to ensure "url" is required (not null)
|
||||
if (url == null)
|
||||
{
|
||||
throw new ArgumentNullException("url is a required property for File and cannot be null");
|
||||
throw new ArgumentNullException("url is a required property for StorageFile and cannot be null");
|
||||
}
|
||||
this.Url = url;
|
||||
this.Id = id;
|
||||
this.Size = size;
|
||||
this.Hash = hash;
|
||||
this.Etag = etag;
|
||||
this.Size = size;
|
||||
this.Created = created;
|
||||
this.Updated = updated;
|
||||
}
|
||||
@@ -101,6 +101,12 @@ namespace Tribufu.Model
|
||||
[DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Size
|
||||
/// </summary>
|
||||
[DataMember(Name = "size", EmitDefaultValue = false)]
|
||||
public long Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Hash
|
||||
/// </summary>
|
||||
@@ -113,12 +119,6 @@ namespace Tribufu.Model
|
||||
[DataMember(Name = "etag", EmitDefaultValue = true)]
|
||||
public string Etag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Size
|
||||
/// </summary>
|
||||
[DataMember(Name = "size", EmitDefaultValue = false)]
|
||||
public long Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Created
|
||||
/// </summary>
|
||||
@@ -138,14 +138,14 @@ namespace Tribufu.Model
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class File {\n");
|
||||
sb.Append("class StorageFile {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" ContentType: ").Append(ContentType).Append("\n");
|
||||
sb.Append(" Url: ").Append(Url).Append("\n");
|
||||
sb.Append(" Size: ").Append(Size).Append("\n");
|
||||
sb.Append(" Hash: ").Append(Hash).Append("\n");
|
||||
sb.Append(" Etag: ").Append(Etag).Append("\n");
|
||||
sb.Append(" Size: ").Append(Size).Append("\n");
|
||||
sb.Append(" Created: ").Append(Created).Append("\n");
|
||||
sb.Append(" Updated: ").Append(Updated).Append("\n");
|
||||
sb.Append("}\n");
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.2.6
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# Tribufu
|
||||
@@ -9,12 +9,11 @@
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IsPublishable>false</IsPublishable>
|
||||
<Nullable>annotations</Nullable>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworks>net6.0</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;net472;net5.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JsonSubTypes" />
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Tribufu
|
||||
/// <summary>
|
||||
/// Create a <see cref="TribufuApi"/> instance.
|
||||
/// </summary>
|
||||
public TribufuApi(string? apiKey = null) : base(CreateConfiguration(apiKey))
|
||||
public TribufuApi(string apiKey = null) : base(CreateConfiguration(apiKey))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -63,9 +63,12 @@ namespace Tribufu
|
||||
/// // Environment variable TRIBUFU_API_KEY must be set
|
||||
/// var api = TribufuApi.FromEnv();
|
||||
/// </example>
|
||||
public static TribufuApi? FromEnv(string? prefix = null)
|
||||
public static TribufuApi FromEnv(string prefix = null)
|
||||
{
|
||||
prefix ??= "TRIBUFU";
|
||||
if (prefix == null)
|
||||
{
|
||||
prefix = "TRIBUFU";
|
||||
}
|
||||
|
||||
var apiKey = Environment.GetEnvironmentVariable($"{prefix}_API_KEY");
|
||||
|
||||
@@ -110,8 +113,8 @@ namespace Tribufu
|
||||
{
|
||||
var version = GetVersion();
|
||||
var frameworkDescription = RuntimeInformation.FrameworkDescription.Trim();
|
||||
var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier.Trim();
|
||||
return $"Tribufu/{version} ({frameworkDescription}; {runtimeIdentifier})";
|
||||
//var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier.Trim();
|
||||
return $"Tribufu/{version} ({frameworkDescription})"; //; {runtimeIdentifier})";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -151,7 +154,7 @@ namespace Tribufu
|
||||
/// <summary>
|
||||
/// Creates a configuration for the Tribufu API client.
|
||||
/// </summary>
|
||||
private static Configuration CreateConfiguration(string? apiKey)
|
||||
private static Configuration CreateConfiguration(string apiKey)
|
||||
{
|
||||
var config = new Configuration
|
||||
{
|
||||
|
||||
@@ -11,14 +11,18 @@ namespace Tribufu
|
||||
/// </remarks>
|
||||
public static class TribufuApiSingleton
|
||||
{
|
||||
private static TribufuApi? _instance = null;
|
||||
private static TribufuApi _instance = null;
|
||||
|
||||
/// <summary>
|
||||
/// Get the singleton instance of <see cref="TribufuApi"/>.
|
||||
/// </summary>
|
||||
public static TribufuApi GetInstance()
|
||||
{
|
||||
_instance ??= TribufuApi.FromEnvOrDefault();
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = TribufuApi.FromEnvOrDefault();
|
||||
}
|
||||
|
||||
return _instance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user