-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
622 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
/* | ||
* Influx OSS API Service | ||
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* OpenAPI spec version: 2.0.0 | ||
* | ||
* Generated by: https://github.com/openapitools/openapi-generator.git | ||
*/ | ||
|
||
using System; | ||
using System.Linq; | ||
using System.IO; | ||
using System.Text; | ||
using System.Text.RegularExpressions; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using OpenAPIDateConverter = InfluxDB.Client.Api.Client.OpenAPIDateConverter; | ||
|
||
namespace InfluxDB.Client.Api.Domain | ||
{ | ||
/// <summary> | ||
/// DBRPCreate | ||
/// </summary> | ||
[DataContract] | ||
public partial class DBRPCreate : IEquatable<DBRPCreate> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DBRPCreate" /> class. | ||
/// </summary> | ||
[JsonConstructorAttribute] | ||
protected DBRPCreate() { } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DBRPCreate" /> class. | ||
/// </summary> | ||
/// <param name="orgID">the organization ID that owns this mapping..</param> | ||
/// <param name="org">the organization that owns this mapping..</param> | ||
/// <param name="bucketID">the bucket ID used as target for the translation. (required).</param> | ||
/// <param name="database">InfluxDB v1 database (required).</param> | ||
/// <param name="retentionPolicy">InfluxDB v1 retention policy (required).</param> | ||
/// <param name="_default">Specify if this mapping represents the default retention policy for the database specificed..</param> | ||
public DBRPCreate(string orgID = default(string), string org = default(string), string bucketID = default(string), string database = default(string), string retentionPolicy = default(string), bool? _default = default(bool?)) | ||
{ | ||
// to ensure "bucketID" is required (not null) | ||
if (bucketID == null) | ||
{ | ||
throw new InvalidDataException("bucketID is a required property for DBRPCreate and cannot be null"); | ||
} | ||
else | ||
{ | ||
this.BucketID = bucketID; | ||
} | ||
// to ensure "database" is required (not null) | ||
if (database == null) | ||
{ | ||
throw new InvalidDataException("database is a required property for DBRPCreate and cannot be null"); | ||
} | ||
else | ||
{ | ||
this.Database = database; | ||
} | ||
// to ensure "retentionPolicy" is required (not null) | ||
if (retentionPolicy == null) | ||
{ | ||
throw new InvalidDataException("retentionPolicy is a required property for DBRPCreate and cannot be null"); | ||
} | ||
else | ||
{ | ||
this.RetentionPolicy = retentionPolicy; | ||
} | ||
this.OrgID = orgID; | ||
this.Org = org; | ||
this.Default = _default; | ||
} | ||
|
||
/// <summary> | ||
/// the organization ID that owns this mapping. | ||
/// </summary> | ||
/// <value>the organization ID that owns this mapping.</value> | ||
[DataMember(Name="orgID", EmitDefaultValue=false)] | ||
public string OrgID { get; set; } | ||
|
||
/// <summary> | ||
/// the organization that owns this mapping. | ||
/// </summary> | ||
/// <value>the organization that owns this mapping.</value> | ||
[DataMember(Name="org", EmitDefaultValue=false)] | ||
public string Org { get; set; } | ||
|
||
/// <summary> | ||
/// the bucket ID used as target for the translation. | ||
/// </summary> | ||
/// <value>the bucket ID used as target for the translation.</value> | ||
[DataMember(Name="bucketID", EmitDefaultValue=false)] | ||
public string BucketID { get; set; } | ||
|
||
/// <summary> | ||
/// InfluxDB v1 database | ||
/// </summary> | ||
/// <value>InfluxDB v1 database</value> | ||
[DataMember(Name="database", EmitDefaultValue=false)] | ||
public string Database { get; set; } | ||
|
||
/// <summary> | ||
/// InfluxDB v1 retention policy | ||
/// </summary> | ||
/// <value>InfluxDB v1 retention policy</value> | ||
[DataMember(Name="retention_policy", EmitDefaultValue=false)] | ||
public string RetentionPolicy { get; set; } | ||
|
||
/// <summary> | ||
/// Specify if this mapping represents the default retention policy for the database specificed. | ||
/// </summary> | ||
/// <value>Specify if this mapping represents the default retention policy for the database specificed.</value> | ||
[DataMember(Name="default", EmitDefaultValue=false)] | ||
public bool? Default { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class DBRPCreate {\n"); | ||
sb.Append(" OrgID: ").Append(OrgID).Append("\n"); | ||
sb.Append(" Org: ").Append(Org).Append("\n"); | ||
sb.Append(" BucketID: ").Append(BucketID).Append("\n"); | ||
sb.Append(" Database: ").Append(Database).Append("\n"); | ||
sb.Append(" RetentionPolicy: ").Append(RetentionPolicy).Append("\n"); | ||
sb.Append(" Default: ").Append(Default).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 JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="input">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object input) | ||
{ | ||
return this.Equals(input as DBRPCreate); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if DBRPCreate instances are equal | ||
/// </summary> | ||
/// <param name="input">Instance of DBRPCreate to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public bool Equals(DBRPCreate input) | ||
{ | ||
if (input == null) | ||
return false; | ||
|
||
return | ||
( | ||
this.OrgID == input.OrgID || | ||
(this.OrgID != null && | ||
this.OrgID.Equals(input.OrgID)) | ||
) && | ||
( | ||
this.Org == input.Org || | ||
(this.Org != null && | ||
this.Org.Equals(input.Org)) | ||
) && | ||
( | ||
this.BucketID == input.BucketID || | ||
(this.BucketID != null && | ||
this.BucketID.Equals(input.BucketID)) | ||
) && | ||
( | ||
this.Database == input.Database || | ||
(this.Database != null && | ||
this.Database.Equals(input.Database)) | ||
) && | ||
( | ||
this.RetentionPolicy == input.RetentionPolicy || | ||
(this.RetentionPolicy != null && | ||
this.RetentionPolicy.Equals(input.RetentionPolicy)) | ||
) && | ||
( | ||
this.Default == input.Default || | ||
(this.Default != null && | ||
this.Default.Equals(input.Default)) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (this.OrgID != null) | ||
hashCode = hashCode * 59 + this.OrgID.GetHashCode(); | ||
if (this.Org != null) | ||
hashCode = hashCode * 59 + this.Org.GetHashCode(); | ||
if (this.BucketID != null) | ||
hashCode = hashCode * 59 + this.BucketID.GetHashCode(); | ||
if (this.Database != null) | ||
hashCode = hashCode * 59 + this.Database.GetHashCode(); | ||
if (this.RetentionPolicy != null) | ||
hashCode = hashCode * 59 + this.RetentionPolicy.GetHashCode(); | ||
if (this.Default != null) | ||
hashCode = hashCode * 59 + this.Default.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.