daytona_api_client 0.191.0 → 0.192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +8 -0
- data/lib/daytona_api_client/api/admin_api.rb +34 -4
- data/lib/daytona_api_client/api/audit_api.rb +34 -4
- data/lib/daytona_api_client/api/sandbox_api.rb +64 -0
- data/lib/daytona_api_client/api/secret_api.rb +350 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +16 -4
- data/lib/daytona_api_client/models/create_secret.rb +214 -0
- data/lib/daytona_api_client/models/date_filter.rb +178 -0
- data/lib/daytona_api_client/models/int_filter.rb +222 -0
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +176 -0
- data/lib/daytona_api_client/models/secret.rb +312 -0
- data/lib/daytona_api_client/models/string_filter.rb +182 -0
- data/lib/daytona_api_client/models/update_secret.rb +170 -0
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +8 -0
- metadata +9 -1
|
@@ -78,6 +78,9 @@ module DaytonaApiClient
|
|
|
78
78
|
# ID or name of an existing sandbox to link the new sandbox to. The new sandbox will be scheduled on the same runner as the linked sandbox so a local network can be established between them. Linked sandboxes must be ephemeral (autoDeleteInterval=0) and cannot themselves be linked to another sandbox.
|
|
79
79
|
attr_accessor :linked_sandbox
|
|
80
80
|
|
|
81
|
+
# Secrets to mount in this sandbox. Each entry maps an env var name to a vault secret name.
|
|
82
|
+
attr_accessor :secrets
|
|
83
|
+
|
|
81
84
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
82
85
|
def self.attribute_map
|
|
83
86
|
{
|
|
@@ -101,7 +104,8 @@ module DaytonaApiClient
|
|
|
101
104
|
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
102
105
|
:'volumes' => :'volumes',
|
|
103
106
|
:'build_info' => :'buildInfo',
|
|
104
|
-
:'linked_sandbox' => :'linkedSandbox'
|
|
107
|
+
:'linked_sandbox' => :'linkedSandbox',
|
|
108
|
+
:'secrets' => :'secrets'
|
|
105
109
|
}
|
|
106
110
|
end
|
|
107
111
|
|
|
@@ -138,7 +142,8 @@ module DaytonaApiClient
|
|
|
138
142
|
:'auto_delete_interval' => :'Integer',
|
|
139
143
|
:'volumes' => :'Array<SandboxVolume>',
|
|
140
144
|
:'build_info' => :'CreateBuildInfo',
|
|
141
|
-
:'linked_sandbox' => :'String'
|
|
145
|
+
:'linked_sandbox' => :'String',
|
|
146
|
+
:'secrets' => :'Array<Hash<String, String>>'
|
|
142
147
|
}
|
|
143
148
|
end
|
|
144
149
|
|
|
@@ -255,6 +260,12 @@ module DaytonaApiClient
|
|
|
255
260
|
if attributes.key?(:'linked_sandbox')
|
|
256
261
|
self.linked_sandbox = attributes[:'linked_sandbox']
|
|
257
262
|
end
|
|
263
|
+
|
|
264
|
+
if attributes.key?(:'secrets')
|
|
265
|
+
if (value = attributes[:'secrets']).is_a?(Array)
|
|
266
|
+
self.secrets = value
|
|
267
|
+
end
|
|
268
|
+
end
|
|
258
269
|
end
|
|
259
270
|
|
|
260
271
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -297,7 +308,8 @@ module DaytonaApiClient
|
|
|
297
308
|
auto_delete_interval == o.auto_delete_interval &&
|
|
298
309
|
volumes == o.volumes &&
|
|
299
310
|
build_info == o.build_info &&
|
|
300
|
-
linked_sandbox == o.linked_sandbox
|
|
311
|
+
linked_sandbox == o.linked_sandbox &&
|
|
312
|
+
secrets == o.secrets
|
|
301
313
|
end
|
|
302
314
|
|
|
303
315
|
# @see the `==` method
|
|
@@ -309,7 +321,7 @@ module DaytonaApiClient
|
|
|
309
321
|
# Calculates hash code according to all attributes.
|
|
310
322
|
# @return [Integer] Hash code
|
|
311
323
|
def hash
|
|
312
|
-
[name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox].hash
|
|
324
|
+
[name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox, secrets].hash
|
|
313
325
|
end
|
|
314
326
|
|
|
315
327
|
# Builds the object from hash
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class CreateSecret < ApiModelBase
|
|
18
|
+
# Secret name (alphanumeric, hyphens, underscores)
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# Secret value
|
|
22
|
+
attr_accessor :value
|
|
23
|
+
|
|
24
|
+
# Optional description of the secret
|
|
25
|
+
attr_accessor :description
|
|
26
|
+
|
|
27
|
+
# Allowed hosts this secret may be sent to
|
|
28
|
+
attr_accessor :hosts
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'name' => :'name',
|
|
34
|
+
:'value' => :'value',
|
|
35
|
+
:'description' => :'description',
|
|
36
|
+
:'hosts' => :'hosts'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'name' => :'String',
|
|
54
|
+
:'value' => :'String',
|
|
55
|
+
:'description' => :'String',
|
|
56
|
+
:'hosts' => :'Array<String>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CreateSecret` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::CreateSecret`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'name')
|
|
83
|
+
self.name = attributes[:'name']
|
|
84
|
+
else
|
|
85
|
+
self.name = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'value')
|
|
89
|
+
self.value = attributes[:'value']
|
|
90
|
+
else
|
|
91
|
+
self.value = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'description')
|
|
95
|
+
self.description = attributes[:'description']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'hosts')
|
|
99
|
+
if (value = attributes[:'hosts']).is_a?(Array)
|
|
100
|
+
self.hosts = value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @name.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @value.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
invalid_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
|
+
return false if @name.nil?
|
|
126
|
+
return false if @value.nil?
|
|
127
|
+
true
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] name Value to be assigned
|
|
132
|
+
def name=(name)
|
|
133
|
+
if name.nil?
|
|
134
|
+
fail ArgumentError, 'name cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
@name = name
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method with validation
|
|
141
|
+
# @param [Object] value Value to be assigned
|
|
142
|
+
def value=(value)
|
|
143
|
+
if value.nil?
|
|
144
|
+
fail ArgumentError, 'value cannot be nil'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@value = value
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Checks equality by comparing each attribute.
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def ==(o)
|
|
153
|
+
return true if self.equal?(o)
|
|
154
|
+
self.class == o.class &&
|
|
155
|
+
name == o.name &&
|
|
156
|
+
value == o.value &&
|
|
157
|
+
description == o.description &&
|
|
158
|
+
hosts == o.hosts
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# @see the `==` method
|
|
162
|
+
# @param [Object] Object to be compared
|
|
163
|
+
def eql?(o)
|
|
164
|
+
self == o
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Calculates hash code according to all attributes.
|
|
168
|
+
# @return [Integer] Hash code
|
|
169
|
+
def hash
|
|
170
|
+
[name, value, description, hosts].hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Builds the object from hash
|
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
175
|
+
# @return [Object] Returns the model itself
|
|
176
|
+
def self.build_from_hash(attributes)
|
|
177
|
+
return nil unless attributes.is_a?(Hash)
|
|
178
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
179
|
+
transformed_hash = {}
|
|
180
|
+
openapi_types.each_pair do |key, type|
|
|
181
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
182
|
+
transformed_hash["#{key}"] = nil
|
|
183
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
184
|
+
# check to ensure the input is an array given that the attribute
|
|
185
|
+
# is documented as an array but the input is not
|
|
186
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
187
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
188
|
+
end
|
|
189
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
190
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
new(transformed_hash)
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Returns the object in the form of hash
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_hash
|
|
199
|
+
hash = {}
|
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
201
|
+
value = self.send(attr)
|
|
202
|
+
if value.nil?
|
|
203
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
204
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
end
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class DateFilter < ApiModelBase
|
|
18
|
+
# Match values greater than or equal to this timestamp (ISO 8601).
|
|
19
|
+
attr_accessor :gte
|
|
20
|
+
|
|
21
|
+
# Match values less than or equal to this timestamp (ISO 8601).
|
|
22
|
+
attr_accessor :lte
|
|
23
|
+
|
|
24
|
+
# Match values strictly greater than this timestamp (ISO 8601).
|
|
25
|
+
attr_accessor :gt
|
|
26
|
+
|
|
27
|
+
# Match values strictly less than this timestamp (ISO 8601).
|
|
28
|
+
attr_accessor :lt
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'gte' => :'gte',
|
|
34
|
+
:'lte' => :'lte',
|
|
35
|
+
:'gt' => :'gt',
|
|
36
|
+
:'lt' => :'lt'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'gte' => :'Time',
|
|
54
|
+
:'lte' => :'Time',
|
|
55
|
+
:'gt' => :'Time',
|
|
56
|
+
:'lt' => :'Time'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::DateFilter` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::DateFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'gte')
|
|
83
|
+
self.gte = attributes[:'gte']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'lte')
|
|
87
|
+
self.lte = attributes[:'lte']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'gt')
|
|
91
|
+
self.gt = attributes[:'gt']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'lt')
|
|
95
|
+
self.lt = attributes[:'lt']
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
|
+
# @return Array for valid properties with the reasons
|
|
101
|
+
def list_invalid_properties
|
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
103
|
+
invalid_properties = Array.new
|
|
104
|
+
invalid_properties
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Check to see if the all the properties in the model are valid
|
|
108
|
+
# @return true if the model is valid
|
|
109
|
+
def valid?
|
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
|
+
true
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Checks equality by comparing each attribute.
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def ==(o)
|
|
117
|
+
return true if self.equal?(o)
|
|
118
|
+
self.class == o.class &&
|
|
119
|
+
gte == o.gte &&
|
|
120
|
+
lte == o.lte &&
|
|
121
|
+
gt == o.gt &&
|
|
122
|
+
lt == o.lt
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# @see the `==` method
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def eql?(o)
|
|
128
|
+
self == o
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Calculates hash code according to all attributes.
|
|
132
|
+
# @return [Integer] Hash code
|
|
133
|
+
def hash
|
|
134
|
+
[gte, lte, gt, lt].hash
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Builds the object from hash
|
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
139
|
+
# @return [Object] Returns the model itself
|
|
140
|
+
def self.build_from_hash(attributes)
|
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
|
142
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
143
|
+
transformed_hash = {}
|
|
144
|
+
openapi_types.each_pair do |key, type|
|
|
145
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
146
|
+
transformed_hash["#{key}"] = nil
|
|
147
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
|
+
# check to ensure the input is an array given that the attribute
|
|
149
|
+
# is documented as an array but the input is not
|
|
150
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
151
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
152
|
+
end
|
|
153
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
154
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
new(transformed_hash)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the object in the form of hash
|
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = self.send(attr)
|
|
166
|
+
if value.nil?
|
|
167
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
168
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
hash[param] = _to_hash(value)
|
|
172
|
+
end
|
|
173
|
+
hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class IntFilter < ApiModelBase
|
|
18
|
+
# Match values equal to this value.
|
|
19
|
+
attr_accessor :eq
|
|
20
|
+
|
|
21
|
+
# Match values not equal to this value.
|
|
22
|
+
attr_accessor :_not
|
|
23
|
+
|
|
24
|
+
# Match values present in this list. Accepts comma-separated values or repeated query parameters. Maximum 100 entries.
|
|
25
|
+
attr_accessor :_in
|
|
26
|
+
|
|
27
|
+
# Match values not present in this list. Accepts comma-separated values or repeated query parameters. Maximum 100 entries.
|
|
28
|
+
attr_accessor :not_in
|
|
29
|
+
|
|
30
|
+
# Match values greater than or equal to this value.
|
|
31
|
+
attr_accessor :gte
|
|
32
|
+
|
|
33
|
+
# Match values less than or equal to this value.
|
|
34
|
+
attr_accessor :lte
|
|
35
|
+
|
|
36
|
+
# Match values strictly greater than this value.
|
|
37
|
+
attr_accessor :gt
|
|
38
|
+
|
|
39
|
+
# Match values strictly less than this value.
|
|
40
|
+
attr_accessor :lt
|
|
41
|
+
|
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
+
def self.attribute_map
|
|
44
|
+
{
|
|
45
|
+
:'eq' => :'eq',
|
|
46
|
+
:'_not' => :'not',
|
|
47
|
+
:'_in' => :'in',
|
|
48
|
+
:'not_in' => :'notIn',
|
|
49
|
+
:'gte' => :'gte',
|
|
50
|
+
:'lte' => :'lte',
|
|
51
|
+
:'gt' => :'gt',
|
|
52
|
+
:'lt' => :'lt'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
acceptable_attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'eq' => :'Float',
|
|
70
|
+
:'_not' => :'Float',
|
|
71
|
+
:'_in' => :'Array<Float>',
|
|
72
|
+
:'not_in' => :'Array<Float>',
|
|
73
|
+
:'gte' => :'Float',
|
|
74
|
+
:'lte' => :'Float',
|
|
75
|
+
:'gt' => :'Float',
|
|
76
|
+
:'lt' => :'Float'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# List of attributes with nullable: true
|
|
81
|
+
def self.openapi_nullable
|
|
82
|
+
Set.new([
|
|
83
|
+
])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Initializes the object
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
def initialize(attributes = {})
|
|
89
|
+
if (!attributes.is_a?(Hash))
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::IntFilter` initialize method"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::IntFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'eq')
|
|
103
|
+
self.eq = attributes[:'eq']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'_not')
|
|
107
|
+
self._not = attributes[:'_not']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'_in')
|
|
111
|
+
if (value = attributes[:'_in']).is_a?(Array)
|
|
112
|
+
self._in = value
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'not_in')
|
|
117
|
+
if (value = attributes[:'not_in']).is_a?(Array)
|
|
118
|
+
self.not_in = value
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'gte')
|
|
123
|
+
self.gte = attributes[:'gte']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'lte')
|
|
127
|
+
self.lte = attributes[:'lte']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'gt')
|
|
131
|
+
self.gt = attributes[:'gt']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'lt')
|
|
135
|
+
self.lt = attributes[:'lt']
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
140
|
+
# @return Array for valid properties with the reasons
|
|
141
|
+
def list_invalid_properties
|
|
142
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
143
|
+
invalid_properties = Array.new
|
|
144
|
+
invalid_properties
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Check to see if the all the properties in the model are valid
|
|
148
|
+
# @return true if the model is valid
|
|
149
|
+
def valid?
|
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
151
|
+
true
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Checks equality by comparing each attribute.
|
|
155
|
+
# @param [Object] Object to be compared
|
|
156
|
+
def ==(o)
|
|
157
|
+
return true if self.equal?(o)
|
|
158
|
+
self.class == o.class &&
|
|
159
|
+
eq == o.eq &&
|
|
160
|
+
_not == o._not &&
|
|
161
|
+
_in == o._in &&
|
|
162
|
+
not_in == o.not_in &&
|
|
163
|
+
gte == o.gte &&
|
|
164
|
+
lte == o.lte &&
|
|
165
|
+
gt == o.gt &&
|
|
166
|
+
lt == o.lt
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# @see the `==` method
|
|
170
|
+
# @param [Object] Object to be compared
|
|
171
|
+
def eql?(o)
|
|
172
|
+
self == o
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Calculates hash code according to all attributes.
|
|
176
|
+
# @return [Integer] Hash code
|
|
177
|
+
def hash
|
|
178
|
+
[eq, _not, _in, not_in, gte, lte, gt, lt].hash
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Builds the object from hash
|
|
182
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
183
|
+
# @return [Object] Returns the model itself
|
|
184
|
+
def self.build_from_hash(attributes)
|
|
185
|
+
return nil unless attributes.is_a?(Hash)
|
|
186
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
187
|
+
transformed_hash = {}
|
|
188
|
+
openapi_types.each_pair do |key, type|
|
|
189
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
190
|
+
transformed_hash["#{key}"] = nil
|
|
191
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
192
|
+
# check to ensure the input is an array given that the attribute
|
|
193
|
+
# is documented as an array but the input is not
|
|
194
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
195
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
196
|
+
end
|
|
197
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
198
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
new(transformed_hash)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the object in the form of hash
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_hash
|
|
207
|
+
hash = {}
|
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
209
|
+
value = self.send(attr)
|
|
210
|
+
if value.nil?
|
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|