smplkit 3.0.117 → 3.0.118
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/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb +364 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb +5 -2
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job.rb +12 -1
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_environment.rb +12 -1
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_on.rb +185 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy.rb +396 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_create_request.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_create_resource.rb +237 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_list_response.rb +193 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_request.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_resource.rb +186 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_response.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run.rb +15 -4
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_meta.rb +1 -1
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_retry.rb +193 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client.rb +10 -0
- data/lib/smplkit/_generated/jobs/spec/api/retry_policies_api_spec.rb +100 -0
- data/lib/smplkit/_generated/jobs/spec/api/runs_api_spec.rb +2 -1
- data/lib/smplkit/_generated/jobs/spec/models/job_environment_spec.rb +6 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_spec.rb +6 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_on_spec.rb +46 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_create_request_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_create_resource_spec.rb +52 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_list_response_spec.rb +42 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_request_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_resource_spec.rb +48 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_response_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_spec.rb +94 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_retry_spec.rb +42 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_spec.rb +7 -1
- metadata +21 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Jobs API
|
|
3
|
+
|
|
4
|
+
#Scheduled HTTP job execution API for smplkit.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Jobs
|
|
17
|
+
# JSON:API request envelope for updating a retry policy.
|
|
18
|
+
class RetryPolicyRequest < ApiModelBase
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'data' => :'data'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'data' => :'RetryPolicyResource'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Jobs::RetryPolicyRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Jobs::RetryPolicyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'data')
|
|
68
|
+
self.data = attributes[:'data']
|
|
69
|
+
else
|
|
70
|
+
self.data = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @data.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @data.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] data Value to be assigned
|
|
96
|
+
def data=(data)
|
|
97
|
+
if data.nil?
|
|
98
|
+
fail ArgumentError, 'data cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@data = data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
data == o.data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[data].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Jobs API
|
|
3
|
+
|
|
4
|
+
#Scheduled HTTP job execution API for smplkit.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Jobs
|
|
17
|
+
# JSON:API resource envelope for a retry policy. The caller supplies `id` on create.
|
|
18
|
+
class RetryPolicyResource < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
attr_accessor :attributes
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'id' => :'id',
|
|
29
|
+
:'type' => :'type',
|
|
30
|
+
:'attributes' => :'attributes'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'id' => :'String',
|
|
48
|
+
:'type' => :'String',
|
|
49
|
+
:'attributes' => :'RetryPolicy'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
:'id',
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Jobs::RetryPolicyResource` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Jobs::RetryPolicyResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'id')
|
|
77
|
+
self.id = attributes[:'id']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'type')
|
|
81
|
+
self.type = attributes[:'type']
|
|
82
|
+
else
|
|
83
|
+
self.type = 'retry_policy'
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'attributes')
|
|
87
|
+
self.attributes = attributes[:'attributes']
|
|
88
|
+
else
|
|
89
|
+
self.attributes = nil
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
94
|
+
# @return Array for valid properties with the reasons
|
|
95
|
+
def list_invalid_properties
|
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
97
|
+
invalid_properties = Array.new
|
|
98
|
+
if @attributes.nil?
|
|
99
|
+
invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
invalid_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
def valid?
|
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
109
|
+
return false if @attributes.nil?
|
|
110
|
+
true
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Custom attribute writer method with validation
|
|
114
|
+
# @param [Object] attributes Value to be assigned
|
|
115
|
+
def attributes=(attributes)
|
|
116
|
+
if attributes.nil?
|
|
117
|
+
fail ArgumentError, 'attributes cannot be nil'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
@attributes = attributes
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Checks equality by comparing each attribute.
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def ==(o)
|
|
126
|
+
return true if self.equal?(o)
|
|
127
|
+
self.class == o.class &&
|
|
128
|
+
id == o.id &&
|
|
129
|
+
type == o.type &&
|
|
130
|
+
attributes == o.attributes
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# @see the `==` method
|
|
134
|
+
# @param [Object] Object to be compared
|
|
135
|
+
def eql?(o)
|
|
136
|
+
self == o
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Calculates hash code according to all attributes.
|
|
140
|
+
# @return [Integer] Hash code
|
|
141
|
+
def hash
|
|
142
|
+
[id, type, attributes].hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Builds the object from hash
|
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
147
|
+
# @return [Object] Returns the model itself
|
|
148
|
+
def self.build_from_hash(attributes)
|
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
151
|
+
transformed_hash = {}
|
|
152
|
+
openapi_types.each_pair do |key, type|
|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
154
|
+
transformed_hash["#{key}"] = nil
|
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
156
|
+
# check to ensure the input is an array given that the attribute
|
|
157
|
+
# is documented as an array but the input is not
|
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
160
|
+
end
|
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
new(transformed_hash)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Returns the object in the form of hash
|
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
|
170
|
+
def to_hash
|
|
171
|
+
hash = {}
|
|
172
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
173
|
+
value = self.send(attr)
|
|
174
|
+
if value.nil?
|
|
175
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
176
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
hash[param] = _to_hash(value)
|
|
180
|
+
end
|
|
181
|
+
hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
end
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Jobs API
|
|
3
|
+
|
|
4
|
+
#Scheduled HTTP job execution API for smplkit.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Jobs
|
|
17
|
+
# JSON:API single-resource response for a retry policy.
|
|
18
|
+
class RetryPolicyResponse < ApiModelBase
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'data' => :'data'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'data' => :'RetryPolicyResource'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Jobs::RetryPolicyResponse` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Jobs::RetryPolicyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'data')
|
|
68
|
+
self.data = attributes[:'data']
|
|
69
|
+
else
|
|
70
|
+
self.data = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @data.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @data.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] data Value to be assigned
|
|
96
|
+
def data=(data)
|
|
97
|
+
if data.nil?
|
|
98
|
+
fail ArgumentError, 'data cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@data = data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
data == o.data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[data].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -25,12 +25,15 @@ module SmplkitGeneratedClient::Jobs
|
|
|
25
25
|
# The environment this run executed in. A scheduled run inherits the firing job-environment; a manual run is created in the environment you name with the `X-Smplkit-Environment` header; a rerun copies its source run's environment.
|
|
26
26
|
attr_accessor :environment
|
|
27
27
|
|
|
28
|
-
# Why the run exists: `SCHEDULE`, `MANUAL` (Run now), or `
|
|
28
|
+
# Why the run exists: `SCHEDULE`, `MANUAL` (Run now), `RERUN`, or `RETRY` (an automatic retry of a failed run).
|
|
29
29
|
attr_accessor :trigger
|
|
30
30
|
|
|
31
31
|
# The source run's id; set only when `trigger` is `RERUN`.
|
|
32
32
|
attr_accessor :rerun_of
|
|
33
33
|
|
|
34
|
+
# Retry-chain position, present only when `trigger` is `RETRY`: the id of the original run the chain retries (`of`) and this run's `attempt` number.
|
|
35
|
+
attr_accessor :_retry
|
|
36
|
+
|
|
34
37
|
# The intended fire time for a scheduled run; `null` for manual / rerun runs.
|
|
35
38
|
attr_accessor :scheduled_for
|
|
36
39
|
|
|
@@ -97,6 +100,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
97
100
|
:'environment' => :'environment',
|
|
98
101
|
:'trigger' => :'trigger',
|
|
99
102
|
:'rerun_of' => :'rerun_of',
|
|
103
|
+
:'_retry' => :'retry',
|
|
100
104
|
:'scheduled_for' => :'scheduled_for',
|
|
101
105
|
:'status' => :'status',
|
|
102
106
|
:'started_at' => :'started_at',
|
|
@@ -130,6 +134,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
130
134
|
:'environment' => :'String',
|
|
131
135
|
:'trigger' => :'String',
|
|
132
136
|
:'rerun_of' => :'String',
|
|
137
|
+
:'_retry' => :'RunRetry',
|
|
133
138
|
:'scheduled_for' => :'Time',
|
|
134
139
|
:'status' => :'String',
|
|
135
140
|
:'started_at' => :'Time',
|
|
@@ -150,6 +155,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
150
155
|
Set.new([
|
|
151
156
|
:'job_version',
|
|
152
157
|
:'rerun_of',
|
|
158
|
+
:'_retry',
|
|
153
159
|
:'scheduled_for',
|
|
154
160
|
:'started_at',
|
|
155
161
|
:'finished_at',
|
|
@@ -206,6 +212,10 @@ module SmplkitGeneratedClient::Jobs
|
|
|
206
212
|
self.rerun_of = attributes[:'rerun_of']
|
|
207
213
|
end
|
|
208
214
|
|
|
215
|
+
if attributes.key?(:'_retry')
|
|
216
|
+
self._retry = attributes[:'_retry']
|
|
217
|
+
end
|
|
218
|
+
|
|
209
219
|
if attributes.key?(:'scheduled_for')
|
|
210
220
|
self.scheduled_for = attributes[:'scheduled_for']
|
|
211
221
|
end
|
|
@@ -292,7 +302,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
292
302
|
return false if @job.nil?
|
|
293
303
|
return false if @environment.nil?
|
|
294
304
|
return false if @trigger.nil?
|
|
295
|
-
trigger_validator = EnumAttributeValidator.new('String', ["SCHEDULE", "MANUAL", "RERUN"])
|
|
305
|
+
trigger_validator = EnumAttributeValidator.new('String', ["SCHEDULE", "MANUAL", "RERUN", "RETRY"])
|
|
296
306
|
return false unless trigger_validator.valid?(@trigger)
|
|
297
307
|
return false if @status.nil?
|
|
298
308
|
status_validator = EnumAttributeValidator.new('String', ["PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED"])
|
|
@@ -325,7 +335,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
325
335
|
# Custom attribute writer method checking allowed values (enum).
|
|
326
336
|
# @param [Object] trigger Object to be assigned
|
|
327
337
|
def trigger=(trigger)
|
|
328
|
-
validator = EnumAttributeValidator.new('String', ["SCHEDULE", "MANUAL", "RERUN"])
|
|
338
|
+
validator = EnumAttributeValidator.new('String', ["SCHEDULE", "MANUAL", "RERUN", "RETRY"])
|
|
329
339
|
unless validator.valid?(trigger)
|
|
330
340
|
fail ArgumentError, "invalid value for \"trigger\", must be one of #{validator.allowable_values}."
|
|
331
341
|
end
|
|
@@ -362,6 +372,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
362
372
|
environment == o.environment &&
|
|
363
373
|
trigger == o.trigger &&
|
|
364
374
|
rerun_of == o.rerun_of &&
|
|
375
|
+
_retry == o._retry &&
|
|
365
376
|
scheduled_for == o.scheduled_for &&
|
|
366
377
|
status == o.status &&
|
|
367
378
|
started_at == o.started_at &&
|
|
@@ -385,7 +396,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
385
396
|
# Calculates hash code according to all attributes.
|
|
386
397
|
# @return [Integer] Hash code
|
|
387
398
|
def hash
|
|
388
|
-
[job, job_version, environment, trigger, rerun_of, scheduled_for, status, started_at, finished_at, pending_duration_ms, run_duration_ms, total_duration_ms, failure_reason, error, request, result, created_at].hash
|
|
399
|
+
[job, job_version, environment, trigger, rerun_of, _retry, scheduled_for, status, started_at, finished_at, pending_duration_ms, run_duration_ms, total_duration_ms, failure_reason, error, request, result, created_at].hash
|
|
389
400
|
end
|
|
390
401
|
|
|
391
402
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Jobs
|
|
17
|
-
# Cursor-pagination meta for the runs list
|
|
17
|
+
# Cursor-pagination meta for the runs list.
|
|
18
18
|
class RunListMeta < ApiModelBase
|
|
19
19
|
# Number of runs returned per page.
|
|
20
20
|
attr_accessor :page_size
|