-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathTesInput.cs
214 lines (188 loc) · 7.38 KB
/
TesInput.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/*
* Task Execution Service
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.3.0
*
* Generated by: https://openapi-generator.tech
*/
using System;
using System.Runtime.Serialization;
using System.Text;
using Newtonsoft.Json;
using Tes.Utilities;
namespace Tes.Models
{
/// <summary>
/// Input describes Task input files.
/// </summary>
[DataContract]
public partial class TesInput : IEquatable<TesInput>
{
public TesInput()
=> NewtonsoftJsonSafeInit.SetDefaultSettings();
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or Sets Description
/// </summary>
[DataMember(Name = "description")]
public string Description { get; set; }
/// <summary>
/// REQUIRED, unless \"content\" is set. URL in long term storage, for example: s3://my-object-store/file1 gs://my-bucket/file2 file:///path/to/my/file /path/to/my/file etc...
/// </summary>
/// <value>REQUIRED, unless \"content\" is set. URL in long term storage, for example: s3://my-object-store/file1 gs://my-bucket/file2 file:///path/to/my/file /path/to/my/file etc...</value>
[DataMember(Name = "url")]
public string Url { get; set; }
/// <summary>
/// Path of the file inside the container. Must be an absolute path.
/// </summary>
/// <value>Path of the file inside the container. Must be an absolute path.</value>
[DataMember(Name = "path")]
public string Path { get; set; }
/// <summary>
/// Gets or Sets Type
/// </summary>
[DataMember(Name = "type")]
public TesFileType Type { get; set; }
/// <summary>
/// File content literal. Implementations should support a minimum of 128 KiB in this field and may define its own maximum. UTF-8 encoded If content is not empty, \"url\" must be ignored.
/// </summary>
/// <value>File content literal. Implementations should support a minimum of 128 KiB in this field and may define its own maximum. UTF-8 encoded If content is not empty, \"url\" must be ignored.</value>
[DataMember(Name = "content")]
public string Content { get; set; }
/// <summary>
/// Indicates that the file should not be downloaded
/// https://github.com/ga4gh/task-execution-schemas/blob/1df37d34242f74d3f03475c6b9de3324b8094054/openapi/task_execution_service.openapi.yaml#L481
/// </summary>
[DataMember(Name = "streamable")]
public bool Streamable { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
=> new StringBuilder()
.Append("class TesInput {\n")
.Append(" Name: ").Append(Name).Append('\n')
.Append(" Description: ").Append(Description).Append('\n')
.Append(" Url: ").Append(Url).Append('\n')
.Append(" Path: ").Append(Path).Append('\n')
.Append(" Type: ").Append(Type).Append('\n')
.Append(" Content: ").Append(Content).Append('\n')
.Append(" Streamable: ").Append(Streamable).Append('\n')
.Append("}\n")
.ToString();
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
=> JsonConvert.SerializeObject(this, Formatting.Indented);
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
=> obj switch
{
var x when x is null => false,
var x when ReferenceEquals(this, x) => true,
_ => obj.GetType() == GetType() && Equals((TesInput)obj),
};
/// <summary>
/// Returns true if TesInput instances are equal
/// </summary>
/// <param name="other">Instance of TesInput to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(TesInput other)
=> other switch
{
var x when x is null => false,
var x when ReferenceEquals(this, x) => true,
_ =>
(
Name == other.Name ||
Name is not null &&
Name.Equals(other.Name)
) &&
(
Description == other.Description ||
Description is not null &&
Description.Equals(other.Description)
) &&
(
Url == other.Url ||
Url is not null &&
Url.Equals(other.Url)
) &&
(
Path == other.Path ||
Path is not null &&
Path.Equals(other.Path)
) &&
(
Type == other.Type ||
Type.Equals(other.Type)
) &&
(
Content == other.Content ||
Content is not null &&
Content.Equals(other.Content)
) &&
(
Streamable.Equals(other.Streamable)
),
};
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (Name is not null)
{
hashCode = hashCode * 59 + Name.GetHashCode();
}
if (Description is not null)
{
hashCode = hashCode * 59 + Description.GetHashCode();
}
if (Url is not null)
{
hashCode = hashCode * 59 + Url.GetHashCode();
}
if (Path is not null)
{
hashCode = hashCode * 59 + Path.GetHashCode();
}
hashCode = hashCode * 59 + Type.GetHashCode();
if (Content is not null)
{
hashCode = hashCode * 59 + Content.GetHashCode();
}
hashCode = hashCode * 59 + Streamable.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
public static bool operator ==(TesInput left, TesInput right)
=> Equals(left, right);
public static bool operator !=(TesInput left, TesInput right)
=> !Equals(left, right);
#pragma warning restore 1591
#endregion Operators
}
}