plainrouter-sdk 0.1.0 → 0.2.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/README.md +2 -2
- data/lib/plainrouter/client.rb +73 -1
- data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +96 -0
- data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +96 -0
- data/lib/plainrouter/openapi/api/action_read_api_api.rb +404 -0
- data/lib/plainrouter/openapi/api/event_api.rb +15 -15
- data/lib/plainrouter/openapi/api/operations_api.rb +24 -28
- data/lib/plainrouter/openapi/api/sandbox_api.rb +74 -17
- data/lib/plainrouter/openapi/api_client.rb +2 -2
- data/lib/plainrouter/openapi/api_error.rb +2 -2
- data/lib/plainrouter/openapi/api_model_base.rb +2 -2
- data/lib/plainrouter/openapi/configuration.rb +10 -3
- data/lib/plainrouter/openapi/models/action_batch_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_batch_read_data.rb +450 -0
- data/lib/plainrouter/openapi/models/action_current_disposition.rb +294 -0
- data/lib/plainrouter/openapi/models/action_decision_receipt_read.rb +244 -0
- data/lib/plainrouter/openapi/models/action_decision_receipt_read_chain_entry.rb +190 -0
- data/lib/plainrouter/openapi/models/action_detail_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run.rb +166 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner.rb +103 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of.rb +376 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of1.rb +268 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of_diff.rb +162 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of_target_entity.rb +199 -0
- data/lib/plainrouter/openapi/models/action_list_read.rb +192 -0
- data/lib/plainrouter/openapi/models/action_list_read_meta.rb +242 -0
- data/lib/plainrouter/openapi/models/action_policy_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_policy_read_data.rb +380 -0
- data/lib/plainrouter/openapi/models/action_proposal_input.rb +378 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner.rb +115 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of1.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10_params.rb +356 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11_params.rb +173 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12_params.rb +188 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13_params.rb +259 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of2.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of3.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4_target_entity.rb +253 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of5.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of6.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of7.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of8.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of9.rb +303 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_params.rb +173 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_target_entity.rb +264 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_evidence_inner.rb +262 -0
- data/lib/plainrouter/openapi/models/action_proposal_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_proposal_read_proposal.rb +452 -0
- data/lib/plainrouter/openapi/models/action_proposal_read_proposal_actions_inner.rb +386 -0
- data/lib/plainrouter/openapi/models/action_proposal_read_proposal_actions_inner_params.rb +103 -0
- data/lib/plainrouter/openapi/models/action_proposal_read_proposal_proposed_by.rb +202 -0
- data/lib/plainrouter/openapi/models/action_read_item.rb +516 -0
- data/lib/plainrouter/openapi/models/create_event200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event202_response.rb +218 -0
- data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +240 -0
- data/lib/plainrouter/openapi/models/create_event_request.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +2 -2
- data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/delete_user_data_request.rb +35 -36
- data/lib/plainrouter/openapi/models/delivery_status.rb +2 -2
- data/lib/plainrouter/openapi/models/destination.rb +30 -3
- data/lib/plainrouter/openapi/models/destination_credential_source.rb +3 -4
- data/lib/plainrouter/openapi/models/destination_status.rb +2 -2
- data/lib/plainrouter/openapi/models/destination_type.rb +2 -2
- data/lib/plainrouter/openapi/models/emq_snapshot.rb +30 -3
- data/lib/plainrouter/openapi/models/error_message.rb +2 -2
- data/lib/plainrouter/openapi/models/event.rb +89 -45
- data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +30 -3
- data/lib/plainrouter/openapi/models/get_event200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +30 -3
- data/lib/plainrouter/openapi/models/get_event200_response_event.rb +31 -4
- data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +2 -2
- data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +30 -3
- data/lib/plainrouter/openapi/models/get_event200_response_event_user_data_hashed.rb +104 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +2 -2
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +31 -4
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +31 -4
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +30 -3
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +2 -2
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +2 -2
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +2 -2
- data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +32 -6
- data/lib/plainrouter/openapi/models/{create_sandbox_key201_response.rb → get_sandbox200_response_self_serve_key_issued_key.rb} +6 -6
- data/lib/plainrouter/openapi/models/{create_sandbox_key201_response_use.rb → get_sandbox200_response_self_serve_key_issued_key_use.rb} +5 -5
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +2 -2
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +2 -2
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +2 -2
- data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +39 -0
- data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +2 -2
- data/lib/plainrouter/openapi/models/list_events200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/list_events200_response_events.rb +2 -2
- data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +2 -2
- data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +2 -2
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +2 -2
- data/lib/plainrouter/openapi/models/reconciliation_report.rb +31 -3
- data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +2 -2
- data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +2 -2
- data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +2 -2
- data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +2 -2
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +30 -3
- data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +2 -2
- data/lib/plainrouter/openapi/models/traffic_class.rb +2 -2
- data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +2 -2
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +2 -2
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +2 -2
- data/lib/plainrouter/openapi/models/validation_error.rb +2 -2
- data/lib/plainrouter/openapi/version.rb +3 -3
- data/lib/plainrouter/openapi.rb +58 -4
- data/lib/plainrouter/version.rb +1 -1
- metadata +64 -10
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Plainrouter Conversion API
|
|
3
|
+
|
|
4
|
+
#Plainrouter public Signals Conversion API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PlainRouter::OpenAPI
|
|
17
|
+
class ActionProposalReadProposal < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :scope
|
|
21
|
+
|
|
22
|
+
attr_accessor :evidence_provenance
|
|
23
|
+
|
|
24
|
+
attr_accessor :status
|
|
25
|
+
|
|
26
|
+
attr_accessor :policy_decision
|
|
27
|
+
|
|
28
|
+
attr_accessor :policy_reasons
|
|
29
|
+
|
|
30
|
+
attr_accessor :approval_required
|
|
31
|
+
|
|
32
|
+
attr_accessor :inbox_url
|
|
33
|
+
|
|
34
|
+
attr_accessor :approval_queue_url
|
|
35
|
+
|
|
36
|
+
attr_accessor :rationale
|
|
37
|
+
|
|
38
|
+
attr_accessor :proposed_by
|
|
39
|
+
|
|
40
|
+
attr_accessor :actions
|
|
41
|
+
|
|
42
|
+
class EnumAttributeValidator
|
|
43
|
+
attr_reader :datatype
|
|
44
|
+
attr_reader :allowable_values
|
|
45
|
+
|
|
46
|
+
def initialize(datatype, allowable_values)
|
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
|
48
|
+
case datatype.to_s
|
|
49
|
+
when /Integer/i
|
|
50
|
+
value.to_i
|
|
51
|
+
when /Float/i
|
|
52
|
+
value.to_f
|
|
53
|
+
else
|
|
54
|
+
value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def valid?(value)
|
|
60
|
+
!value || allowable_values.include?(value)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
|
+
def self.attribute_map
|
|
66
|
+
{
|
|
67
|
+
:'id' => :'id',
|
|
68
|
+
:'scope' => :'scope',
|
|
69
|
+
:'evidence_provenance' => :'evidence_provenance',
|
|
70
|
+
:'status' => :'status',
|
|
71
|
+
:'policy_decision' => :'policy_decision',
|
|
72
|
+
:'policy_reasons' => :'policy_reasons',
|
|
73
|
+
:'approval_required' => :'approval_required',
|
|
74
|
+
:'inbox_url' => :'inbox_url',
|
|
75
|
+
:'approval_queue_url' => :'approval_queue_url',
|
|
76
|
+
:'rationale' => :'rationale',
|
|
77
|
+
:'proposed_by' => :'proposed_by',
|
|
78
|
+
:'actions' => :'actions'
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Returns attribute mapping this model knows about
|
|
83
|
+
def self.acceptable_attribute_map
|
|
84
|
+
attribute_map
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Returns all the JSON keys this model knows about
|
|
88
|
+
def self.acceptable_attributes
|
|
89
|
+
acceptable_attribute_map.values
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Attribute type mapping.
|
|
93
|
+
def self.openapi_types
|
|
94
|
+
{
|
|
95
|
+
:'id' => :'String',
|
|
96
|
+
:'scope' => :'Object',
|
|
97
|
+
:'evidence_provenance' => :'Object',
|
|
98
|
+
:'status' => :'String',
|
|
99
|
+
:'policy_decision' => :'String',
|
|
100
|
+
:'policy_reasons' => :'Array<String>',
|
|
101
|
+
:'approval_required' => :'Boolean',
|
|
102
|
+
:'inbox_url' => :'String',
|
|
103
|
+
:'approval_queue_url' => :'String',
|
|
104
|
+
:'rationale' => :'String',
|
|
105
|
+
:'proposed_by' => :'ActionProposalReadProposalProposedBy',
|
|
106
|
+
:'actions' => :'Array<ActionProposalReadProposalActionsInner>'
|
|
107
|
+
}
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# List of attributes with nullable: true
|
|
111
|
+
def self.openapi_nullable
|
|
112
|
+
Set.new([
|
|
113
|
+
:'scope',
|
|
114
|
+
:'evidence_provenance',
|
|
115
|
+
])
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Initializes the object
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
def initialize(attributes = {})
|
|
121
|
+
if (!attributes.is_a?(Hash))
|
|
122
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalReadProposal` initialize method"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
126
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
127
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
128
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
129
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ActionProposalReadProposal`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
130
|
+
end
|
|
131
|
+
h[k.to_sym] = v
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'id')
|
|
135
|
+
self.id = attributes[:'id']
|
|
136
|
+
else
|
|
137
|
+
self.id = nil
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'scope')
|
|
141
|
+
self.scope = attributes[:'scope']
|
|
142
|
+
else
|
|
143
|
+
self.scope = nil
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'evidence_provenance')
|
|
147
|
+
self.evidence_provenance = attributes[:'evidence_provenance']
|
|
148
|
+
else
|
|
149
|
+
self.evidence_provenance = nil
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'status')
|
|
153
|
+
self.status = attributes[:'status']
|
|
154
|
+
else
|
|
155
|
+
self.status = nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'policy_decision')
|
|
159
|
+
self.policy_decision = attributes[:'policy_decision']
|
|
160
|
+
else
|
|
161
|
+
self.policy_decision = nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'policy_reasons')
|
|
165
|
+
if (value = attributes[:'policy_reasons']).is_a?(Array)
|
|
166
|
+
self.policy_reasons = value
|
|
167
|
+
end
|
|
168
|
+
else
|
|
169
|
+
self.policy_reasons = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'approval_required')
|
|
173
|
+
self.approval_required = attributes[:'approval_required']
|
|
174
|
+
else
|
|
175
|
+
self.approval_required = nil
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'inbox_url')
|
|
179
|
+
self.inbox_url = attributes[:'inbox_url']
|
|
180
|
+
else
|
|
181
|
+
self.inbox_url = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'approval_queue_url')
|
|
185
|
+
self.approval_queue_url = attributes[:'approval_queue_url']
|
|
186
|
+
else
|
|
187
|
+
self.approval_queue_url = nil
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'rationale')
|
|
191
|
+
self.rationale = attributes[:'rationale']
|
|
192
|
+
else
|
|
193
|
+
self.rationale = nil
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'proposed_by')
|
|
197
|
+
self.proposed_by = attributes[:'proposed_by']
|
|
198
|
+
else
|
|
199
|
+
self.proposed_by = nil
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'actions')
|
|
203
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
|
204
|
+
self.actions = value
|
|
205
|
+
end
|
|
206
|
+
else
|
|
207
|
+
self.actions = nil
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
212
|
+
# @return Array for valid properties with the reasons
|
|
213
|
+
def list_invalid_properties
|
|
214
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
215
|
+
invalid_properties = Array.new
|
|
216
|
+
if @id.nil?
|
|
217
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if @status.nil?
|
|
221
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if @policy_decision.nil?
|
|
225
|
+
invalid_properties.push('invalid value for "policy_decision", policy_decision cannot be nil.')
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if @policy_reasons.nil?
|
|
229
|
+
invalid_properties.push('invalid value for "policy_reasons", policy_reasons cannot be nil.')
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
if @approval_required.nil?
|
|
233
|
+
invalid_properties.push('invalid value for "approval_required", approval_required cannot be nil.')
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if @inbox_url.nil?
|
|
237
|
+
invalid_properties.push('invalid value for "inbox_url", inbox_url cannot be nil.')
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
if @approval_queue_url.nil?
|
|
241
|
+
invalid_properties.push('invalid value for "approval_queue_url", approval_queue_url cannot be nil.')
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if @rationale.nil?
|
|
245
|
+
invalid_properties.push('invalid value for "rationale", rationale cannot be nil.')
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if @proposed_by.nil?
|
|
249
|
+
invalid_properties.push('invalid value for "proposed_by", proposed_by cannot be nil.')
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if @actions.nil?
|
|
253
|
+
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
invalid_properties
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Check to see if the all the properties in the model are valid
|
|
260
|
+
# @return true if the model is valid
|
|
261
|
+
def valid?
|
|
262
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
263
|
+
return false if @id.nil?
|
|
264
|
+
return false if @status.nil?
|
|
265
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "approved", "approved_without_execution", "auto_approved", "rejected", "executing", "executed_pending_verification", "compensating", "measuring", "completed", "failed", "rolled_back", "rollback_incomplete", "blocked", "halted"])
|
|
266
|
+
return false unless status_validator.valid?(@status)
|
|
267
|
+
return false if @policy_decision.nil?
|
|
268
|
+
policy_decision_validator = EnumAttributeValidator.new('String', ["allow", "require_approval", "block"])
|
|
269
|
+
return false unless policy_decision_validator.valid?(@policy_decision)
|
|
270
|
+
return false if @policy_reasons.nil?
|
|
271
|
+
return false if @approval_required.nil?
|
|
272
|
+
return false if @inbox_url.nil?
|
|
273
|
+
return false if @approval_queue_url.nil?
|
|
274
|
+
return false if @rationale.nil?
|
|
275
|
+
return false if @proposed_by.nil?
|
|
276
|
+
return false if @actions.nil?
|
|
277
|
+
true
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Custom attribute writer method with validation
|
|
281
|
+
# @param [Object] id Value to be assigned
|
|
282
|
+
def id=(id)
|
|
283
|
+
if id.nil?
|
|
284
|
+
fail ArgumentError, 'id cannot be nil'
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
@id = id
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
291
|
+
# @param [Object] status Object to be assigned
|
|
292
|
+
def status=(status)
|
|
293
|
+
validator = EnumAttributeValidator.new('String', ["pending", "approved", "approved_without_execution", "auto_approved", "rejected", "executing", "executed_pending_verification", "compensating", "measuring", "completed", "failed", "rolled_back", "rollback_incomplete", "blocked", "halted"])
|
|
294
|
+
unless validator.valid?(status)
|
|
295
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
296
|
+
end
|
|
297
|
+
@status = status
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
301
|
+
# @param [Object] policy_decision Object to be assigned
|
|
302
|
+
def policy_decision=(policy_decision)
|
|
303
|
+
validator = EnumAttributeValidator.new('String', ["allow", "require_approval", "block"])
|
|
304
|
+
unless validator.valid?(policy_decision)
|
|
305
|
+
fail ArgumentError, "invalid value for \"policy_decision\", must be one of #{validator.allowable_values}."
|
|
306
|
+
end
|
|
307
|
+
@policy_decision = policy_decision
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Custom attribute writer method with validation
|
|
311
|
+
# @param [Object] policy_reasons Value to be assigned
|
|
312
|
+
def policy_reasons=(policy_reasons)
|
|
313
|
+
if policy_reasons.nil?
|
|
314
|
+
fail ArgumentError, 'policy_reasons cannot be nil'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
@policy_reasons = policy_reasons
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Custom attribute writer method with validation
|
|
321
|
+
# @param [Object] approval_required Value to be assigned
|
|
322
|
+
def approval_required=(approval_required)
|
|
323
|
+
if approval_required.nil?
|
|
324
|
+
fail ArgumentError, 'approval_required cannot be nil'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
@approval_required = approval_required
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] inbox_url Value to be assigned
|
|
332
|
+
def inbox_url=(inbox_url)
|
|
333
|
+
if inbox_url.nil?
|
|
334
|
+
fail ArgumentError, 'inbox_url cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
@inbox_url = inbox_url
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Custom attribute writer method with validation
|
|
341
|
+
# @param [Object] approval_queue_url Value to be assigned
|
|
342
|
+
def approval_queue_url=(approval_queue_url)
|
|
343
|
+
if approval_queue_url.nil?
|
|
344
|
+
fail ArgumentError, 'approval_queue_url cannot be nil'
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
@approval_queue_url = approval_queue_url
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Custom attribute writer method with validation
|
|
351
|
+
# @param [Object] rationale Value to be assigned
|
|
352
|
+
def rationale=(rationale)
|
|
353
|
+
if rationale.nil?
|
|
354
|
+
fail ArgumentError, 'rationale cannot be nil'
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
@rationale = rationale
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Custom attribute writer method with validation
|
|
361
|
+
# @param [Object] proposed_by Value to be assigned
|
|
362
|
+
def proposed_by=(proposed_by)
|
|
363
|
+
if proposed_by.nil?
|
|
364
|
+
fail ArgumentError, 'proposed_by cannot be nil'
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
@proposed_by = proposed_by
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# Custom attribute writer method with validation
|
|
371
|
+
# @param [Object] actions Value to be assigned
|
|
372
|
+
def actions=(actions)
|
|
373
|
+
if actions.nil?
|
|
374
|
+
fail ArgumentError, 'actions cannot be nil'
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
@actions = actions
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# Checks equality by comparing each attribute.
|
|
381
|
+
# @param [Object] Object to be compared
|
|
382
|
+
def ==(o)
|
|
383
|
+
return true if self.equal?(o)
|
|
384
|
+
self.class == o.class &&
|
|
385
|
+
id == o.id &&
|
|
386
|
+
scope == o.scope &&
|
|
387
|
+
evidence_provenance == o.evidence_provenance &&
|
|
388
|
+
status == o.status &&
|
|
389
|
+
policy_decision == o.policy_decision &&
|
|
390
|
+
policy_reasons == o.policy_reasons &&
|
|
391
|
+
approval_required == o.approval_required &&
|
|
392
|
+
inbox_url == o.inbox_url &&
|
|
393
|
+
approval_queue_url == o.approval_queue_url &&
|
|
394
|
+
rationale == o.rationale &&
|
|
395
|
+
proposed_by == o.proposed_by &&
|
|
396
|
+
actions == o.actions
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# @see the `==` method
|
|
400
|
+
# @param [Object] Object to be compared
|
|
401
|
+
def eql?(o)
|
|
402
|
+
self == o
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Calculates hash code according to all attributes.
|
|
406
|
+
# @return [Integer] Hash code
|
|
407
|
+
def hash
|
|
408
|
+
[id, scope, evidence_provenance, status, policy_decision, policy_reasons, approval_required, inbox_url, approval_queue_url, rationale, proposed_by, actions].hash
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Builds the object from hash
|
|
412
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
413
|
+
# @return [Object] Returns the model itself
|
|
414
|
+
def self.build_from_hash(attributes)
|
|
415
|
+
return nil unless attributes.is_a?(Hash)
|
|
416
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
417
|
+
transformed_hash = {}
|
|
418
|
+
openapi_types.each_pair do |key, type|
|
|
419
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
420
|
+
transformed_hash["#{key}"] = nil
|
|
421
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
422
|
+
# check to ensure the input is an array given that the attribute
|
|
423
|
+
# is documented as an array but the input is not
|
|
424
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
425
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
426
|
+
end
|
|
427
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
428
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
new(transformed_hash)
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Returns the object in the form of hash
|
|
435
|
+
# @return [Hash] Returns the object in the form of hash
|
|
436
|
+
def to_hash
|
|
437
|
+
hash = {}
|
|
438
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
439
|
+
value = self.send(attr)
|
|
440
|
+
if value.nil?
|
|
441
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
442
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
hash[param] = _to_hash(value)
|
|
446
|
+
end
|
|
447
|
+
hash
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
end
|