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,380 @@
|
|
|
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 ActionPolicyReadData < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :workspace_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :execution_mode
|
|
23
|
+
|
|
24
|
+
attr_accessor :max_spend_delta_percent
|
|
25
|
+
|
|
26
|
+
attr_accessor :hard_account_daily_cap_minor
|
|
27
|
+
|
|
28
|
+
attr_accessor :protected_entities
|
|
29
|
+
|
|
30
|
+
attr_accessor :quiet_hours_start
|
|
31
|
+
|
|
32
|
+
attr_accessor :quiet_hours_end
|
|
33
|
+
|
|
34
|
+
attr_accessor :protect_learning_phase
|
|
35
|
+
|
|
36
|
+
attr_accessor :outcome_check_after_hours
|
|
37
|
+
|
|
38
|
+
attr_accessor :anomaly_threshold_percent
|
|
39
|
+
|
|
40
|
+
class EnumAttributeValidator
|
|
41
|
+
attr_reader :datatype
|
|
42
|
+
attr_reader :allowable_values
|
|
43
|
+
|
|
44
|
+
def initialize(datatype, allowable_values)
|
|
45
|
+
@allowable_values = allowable_values.map do |value|
|
|
46
|
+
case datatype.to_s
|
|
47
|
+
when /Integer/i
|
|
48
|
+
value.to_i
|
|
49
|
+
when /Float/i
|
|
50
|
+
value.to_f
|
|
51
|
+
else
|
|
52
|
+
value
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def valid?(value)
|
|
58
|
+
!value || allowable_values.include?(value)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
63
|
+
def self.attribute_map
|
|
64
|
+
{
|
|
65
|
+
:'id' => :'id',
|
|
66
|
+
:'workspace_id' => :'workspace_id',
|
|
67
|
+
:'execution_mode' => :'execution_mode',
|
|
68
|
+
:'max_spend_delta_percent' => :'max_spend_delta_percent',
|
|
69
|
+
:'hard_account_daily_cap_minor' => :'hard_account_daily_cap_minor',
|
|
70
|
+
:'protected_entities' => :'protected_entities',
|
|
71
|
+
:'quiet_hours_start' => :'quiet_hours_start',
|
|
72
|
+
:'quiet_hours_end' => :'quiet_hours_end',
|
|
73
|
+
:'protect_learning_phase' => :'protect_learning_phase',
|
|
74
|
+
:'outcome_check_after_hours' => :'outcome_check_after_hours',
|
|
75
|
+
:'anomaly_threshold_percent' => :'anomaly_threshold_percent'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Returns attribute mapping this model knows about
|
|
80
|
+
def self.acceptable_attribute_map
|
|
81
|
+
attribute_map
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns all the JSON keys this model knows about
|
|
85
|
+
def self.acceptable_attributes
|
|
86
|
+
acceptable_attribute_map.values
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Attribute type mapping.
|
|
90
|
+
def self.openapi_types
|
|
91
|
+
{
|
|
92
|
+
:'id' => :'Integer',
|
|
93
|
+
:'workspace_id' => :'Integer',
|
|
94
|
+
:'execution_mode' => :'String',
|
|
95
|
+
:'max_spend_delta_percent' => :'String',
|
|
96
|
+
:'hard_account_daily_cap_minor' => :'Integer',
|
|
97
|
+
:'protected_entities' => :'Array<Object>',
|
|
98
|
+
:'quiet_hours_start' => :'String',
|
|
99
|
+
:'quiet_hours_end' => :'String',
|
|
100
|
+
:'protect_learning_phase' => :'Boolean',
|
|
101
|
+
:'outcome_check_after_hours' => :'Integer',
|
|
102
|
+
:'anomaly_threshold_percent' => :'String'
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# List of attributes with nullable: true
|
|
107
|
+
def self.openapi_nullable
|
|
108
|
+
Set.new([
|
|
109
|
+
:'id',
|
|
110
|
+
:'hard_account_daily_cap_minor',
|
|
111
|
+
:'protected_entities',
|
|
112
|
+
:'quiet_hours_start',
|
|
113
|
+
:'quiet_hours_end',
|
|
114
|
+
])
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Initializes the object
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
def initialize(attributes = {})
|
|
120
|
+
if (!attributes.is_a?(Hash))
|
|
121
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionPolicyReadData` initialize method"
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
125
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
126
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
127
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
128
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ActionPolicyReadData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
129
|
+
end
|
|
130
|
+
h[k.to_sym] = v
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'id')
|
|
134
|
+
self.id = attributes[:'id']
|
|
135
|
+
else
|
|
136
|
+
self.id = nil
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'workspace_id')
|
|
140
|
+
self.workspace_id = attributes[:'workspace_id']
|
|
141
|
+
else
|
|
142
|
+
self.workspace_id = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'execution_mode')
|
|
146
|
+
self.execution_mode = attributes[:'execution_mode']
|
|
147
|
+
else
|
|
148
|
+
self.execution_mode = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'max_spend_delta_percent')
|
|
152
|
+
self.max_spend_delta_percent = attributes[:'max_spend_delta_percent']
|
|
153
|
+
else
|
|
154
|
+
self.max_spend_delta_percent = nil
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'hard_account_daily_cap_minor')
|
|
158
|
+
self.hard_account_daily_cap_minor = attributes[:'hard_account_daily_cap_minor']
|
|
159
|
+
else
|
|
160
|
+
self.hard_account_daily_cap_minor = nil
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'protected_entities')
|
|
164
|
+
if (value = attributes[:'protected_entities']).is_a?(Array)
|
|
165
|
+
self.protected_entities = value
|
|
166
|
+
end
|
|
167
|
+
else
|
|
168
|
+
self.protected_entities = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'quiet_hours_start')
|
|
172
|
+
self.quiet_hours_start = attributes[:'quiet_hours_start']
|
|
173
|
+
else
|
|
174
|
+
self.quiet_hours_start = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'quiet_hours_end')
|
|
178
|
+
self.quiet_hours_end = attributes[:'quiet_hours_end']
|
|
179
|
+
else
|
|
180
|
+
self.quiet_hours_end = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'protect_learning_phase')
|
|
184
|
+
self.protect_learning_phase = attributes[:'protect_learning_phase']
|
|
185
|
+
else
|
|
186
|
+
self.protect_learning_phase = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'outcome_check_after_hours')
|
|
190
|
+
self.outcome_check_after_hours = attributes[:'outcome_check_after_hours']
|
|
191
|
+
else
|
|
192
|
+
self.outcome_check_after_hours = nil
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'anomaly_threshold_percent')
|
|
196
|
+
self.anomaly_threshold_percent = attributes[:'anomaly_threshold_percent']
|
|
197
|
+
else
|
|
198
|
+
self.anomaly_threshold_percent = nil
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
203
|
+
# @return Array for valid properties with the reasons
|
|
204
|
+
def list_invalid_properties
|
|
205
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
206
|
+
invalid_properties = Array.new
|
|
207
|
+
if @workspace_id.nil?
|
|
208
|
+
invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if @execution_mode.nil?
|
|
212
|
+
invalid_properties.push('invalid value for "execution_mode", execution_mode cannot be nil.')
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if @max_spend_delta_percent.nil?
|
|
216
|
+
invalid_properties.push('invalid value for "max_spend_delta_percent", max_spend_delta_percent cannot be nil.')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if @protect_learning_phase.nil?
|
|
220
|
+
invalid_properties.push('invalid value for "protect_learning_phase", protect_learning_phase cannot be nil.')
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if @outcome_check_after_hours.nil?
|
|
224
|
+
invalid_properties.push('invalid value for "outcome_check_after_hours", outcome_check_after_hours cannot be nil.')
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if @anomaly_threshold_percent.nil?
|
|
228
|
+
invalid_properties.push('invalid value for "anomaly_threshold_percent", anomaly_threshold_percent cannot be nil.')
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
invalid_properties
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Check to see if the all the properties in the model are valid
|
|
235
|
+
# @return true if the model is valid
|
|
236
|
+
def valid?
|
|
237
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
238
|
+
return false if @workspace_id.nil?
|
|
239
|
+
return false if @execution_mode.nil?
|
|
240
|
+
execution_mode_validator = EnumAttributeValidator.new('String', ["ask", "full", "suggest_only", "auto_with_limits", "full_auto"])
|
|
241
|
+
return false unless execution_mode_validator.valid?(@execution_mode)
|
|
242
|
+
return false if @max_spend_delta_percent.nil?
|
|
243
|
+
return false if @protect_learning_phase.nil?
|
|
244
|
+
return false if @outcome_check_after_hours.nil?
|
|
245
|
+
return false if @anomaly_threshold_percent.nil?
|
|
246
|
+
true
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Custom attribute writer method with validation
|
|
250
|
+
# @param [Object] workspace_id Value to be assigned
|
|
251
|
+
def workspace_id=(workspace_id)
|
|
252
|
+
if workspace_id.nil?
|
|
253
|
+
fail ArgumentError, 'workspace_id cannot be nil'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
@workspace_id = workspace_id
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
260
|
+
# @param [Object] execution_mode Object to be assigned
|
|
261
|
+
def execution_mode=(execution_mode)
|
|
262
|
+
validator = EnumAttributeValidator.new('String', ["ask", "full", "suggest_only", "auto_with_limits", "full_auto"])
|
|
263
|
+
unless validator.valid?(execution_mode)
|
|
264
|
+
fail ArgumentError, "invalid value for \"execution_mode\", must be one of #{validator.allowable_values}."
|
|
265
|
+
end
|
|
266
|
+
@execution_mode = execution_mode
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Custom attribute writer method with validation
|
|
270
|
+
# @param [Object] max_spend_delta_percent Value to be assigned
|
|
271
|
+
def max_spend_delta_percent=(max_spend_delta_percent)
|
|
272
|
+
if max_spend_delta_percent.nil?
|
|
273
|
+
fail ArgumentError, 'max_spend_delta_percent cannot be nil'
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
@max_spend_delta_percent = max_spend_delta_percent
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Custom attribute writer method with validation
|
|
280
|
+
# @param [Object] protect_learning_phase Value to be assigned
|
|
281
|
+
def protect_learning_phase=(protect_learning_phase)
|
|
282
|
+
if protect_learning_phase.nil?
|
|
283
|
+
fail ArgumentError, 'protect_learning_phase cannot be nil'
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
@protect_learning_phase = protect_learning_phase
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Custom attribute writer method with validation
|
|
290
|
+
# @param [Object] outcome_check_after_hours Value to be assigned
|
|
291
|
+
def outcome_check_after_hours=(outcome_check_after_hours)
|
|
292
|
+
if outcome_check_after_hours.nil?
|
|
293
|
+
fail ArgumentError, 'outcome_check_after_hours cannot be nil'
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
@outcome_check_after_hours = outcome_check_after_hours
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Custom attribute writer method with validation
|
|
300
|
+
# @param [Object] anomaly_threshold_percent Value to be assigned
|
|
301
|
+
def anomaly_threshold_percent=(anomaly_threshold_percent)
|
|
302
|
+
if anomaly_threshold_percent.nil?
|
|
303
|
+
fail ArgumentError, 'anomaly_threshold_percent cannot be nil'
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
@anomaly_threshold_percent = anomaly_threshold_percent
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Checks equality by comparing each attribute.
|
|
310
|
+
# @param [Object] Object to be compared
|
|
311
|
+
def ==(o)
|
|
312
|
+
return true if self.equal?(o)
|
|
313
|
+
self.class == o.class &&
|
|
314
|
+
id == o.id &&
|
|
315
|
+
workspace_id == o.workspace_id &&
|
|
316
|
+
execution_mode == o.execution_mode &&
|
|
317
|
+
max_spend_delta_percent == o.max_spend_delta_percent &&
|
|
318
|
+
hard_account_daily_cap_minor == o.hard_account_daily_cap_minor &&
|
|
319
|
+
protected_entities == o.protected_entities &&
|
|
320
|
+
quiet_hours_start == o.quiet_hours_start &&
|
|
321
|
+
quiet_hours_end == o.quiet_hours_end &&
|
|
322
|
+
protect_learning_phase == o.protect_learning_phase &&
|
|
323
|
+
outcome_check_after_hours == o.outcome_check_after_hours &&
|
|
324
|
+
anomaly_threshold_percent == o.anomaly_threshold_percent
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# @see the `==` method
|
|
328
|
+
# @param [Object] Object to be compared
|
|
329
|
+
def eql?(o)
|
|
330
|
+
self == o
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Calculates hash code according to all attributes.
|
|
334
|
+
# @return [Integer] Hash code
|
|
335
|
+
def hash
|
|
336
|
+
[id, workspace_id, execution_mode, max_spend_delta_percent, hard_account_daily_cap_minor, protected_entities, quiet_hours_start, quiet_hours_end, protect_learning_phase, outcome_check_after_hours, anomaly_threshold_percent].hash
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Builds the object from hash
|
|
340
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
341
|
+
# @return [Object] Returns the model itself
|
|
342
|
+
def self.build_from_hash(attributes)
|
|
343
|
+
return nil unless attributes.is_a?(Hash)
|
|
344
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
345
|
+
transformed_hash = {}
|
|
346
|
+
openapi_types.each_pair do |key, type|
|
|
347
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
348
|
+
transformed_hash["#{key}"] = nil
|
|
349
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
350
|
+
# check to ensure the input is an array given that the attribute
|
|
351
|
+
# is documented as an array but the input is not
|
|
352
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
353
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
354
|
+
end
|
|
355
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
356
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
new(transformed_hash)
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Returns the object in the form of hash
|
|
363
|
+
# @return [Hash] Returns the object in the form of hash
|
|
364
|
+
def to_hash
|
|
365
|
+
hash = {}
|
|
366
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
367
|
+
value = self.send(attr)
|
|
368
|
+
if value.nil?
|
|
369
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
370
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
hash[param] = _to_hash(value)
|
|
374
|
+
end
|
|
375
|
+
hash
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
end
|