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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/plainrouter/client.rb +73 -1
  4. data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +96 -0
  5. data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +96 -0
  6. data/lib/plainrouter/openapi/api/action_read_api_api.rb +404 -0
  7. data/lib/plainrouter/openapi/api/event_api.rb +15 -15
  8. data/lib/plainrouter/openapi/api/operations_api.rb +24 -28
  9. data/lib/plainrouter/openapi/api/sandbox_api.rb +74 -17
  10. data/lib/plainrouter/openapi/api_client.rb +2 -2
  11. data/lib/plainrouter/openapi/api_error.rb +2 -2
  12. data/lib/plainrouter/openapi/api_model_base.rb +2 -2
  13. data/lib/plainrouter/openapi/configuration.rb +10 -3
  14. data/lib/plainrouter/openapi/models/action_batch_read.rb +164 -0
  15. data/lib/plainrouter/openapi/models/action_batch_read_data.rb +450 -0
  16. data/lib/plainrouter/openapi/models/action_current_disposition.rb +294 -0
  17. data/lib/plainrouter/openapi/models/action_decision_receipt_read.rb +244 -0
  18. data/lib/plainrouter/openapi/models/action_decision_receipt_read_chain_entry.rb +190 -0
  19. data/lib/plainrouter/openapi/models/action_detail_read.rb +164 -0
  20. data/lib/plainrouter/openapi/models/action_dry_run_read.rb +164 -0
  21. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run.rb +166 -0
  22. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner.rb +103 -0
  23. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of.rb +376 -0
  24. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of1.rb +268 -0
  25. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of_diff.rb +162 -0
  26. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of_target_entity.rb +199 -0
  27. data/lib/plainrouter/openapi/models/action_list_read.rb +192 -0
  28. data/lib/plainrouter/openapi/models/action_list_read_meta.rb +242 -0
  29. data/lib/plainrouter/openapi/models/action_policy_read.rb +164 -0
  30. data/lib/plainrouter/openapi/models/action_policy_read_data.rb +380 -0
  31. data/lib/plainrouter/openapi/models/action_proposal_input.rb +378 -0
  32. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner.rb +115 -0
  33. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of.rb +303 -0
  34. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of1.rb +303 -0
  35. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10.rb +303 -0
  36. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10_params.rb +356 -0
  37. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11.rb +303 -0
  38. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11_params.rb +173 -0
  39. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12.rb +303 -0
  40. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12_params.rb +188 -0
  41. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13.rb +303 -0
  42. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13_params.rb +259 -0
  43. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of2.rb +303 -0
  44. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of3.rb +303 -0
  45. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4.rb +303 -0
  46. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4_target_entity.rb +253 -0
  47. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of5.rb +303 -0
  48. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of6.rb +303 -0
  49. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of7.rb +303 -0
  50. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of8.rb +303 -0
  51. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of9.rb +303 -0
  52. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_params.rb +173 -0
  53. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_target_entity.rb +264 -0
  54. data/lib/plainrouter/openapi/models/action_proposal_input_evidence_inner.rb +262 -0
  55. data/lib/plainrouter/openapi/models/action_proposal_read.rb +164 -0
  56. data/lib/plainrouter/openapi/models/action_proposal_read_proposal.rb +452 -0
  57. data/lib/plainrouter/openapi/models/action_proposal_read_proposal_actions_inner.rb +386 -0
  58. data/lib/plainrouter/openapi/models/action_proposal_read_proposal_actions_inner_params.rb +103 -0
  59. data/lib/plainrouter/openapi/models/action_proposal_read_proposal_proposed_by.rb +202 -0
  60. data/lib/plainrouter/openapi/models/action_read_item.rb +516 -0
  61. data/lib/plainrouter/openapi/models/create_event200_response.rb +2 -2
  62. data/lib/plainrouter/openapi/models/create_event202_response.rb +218 -0
  63. data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +240 -0
  64. data/lib/plainrouter/openapi/models/create_event_request.rb +2 -2
  65. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +2 -2
  66. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +2 -2
  67. data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +2 -2
  68. data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +2 -2
  69. data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +2 -2
  70. data/lib/plainrouter/openapi/models/delete_user_data_request.rb +35 -36
  71. data/lib/plainrouter/openapi/models/delivery_status.rb +2 -2
  72. data/lib/plainrouter/openapi/models/destination.rb +30 -3
  73. data/lib/plainrouter/openapi/models/destination_credential_source.rb +3 -4
  74. data/lib/plainrouter/openapi/models/destination_status.rb +2 -2
  75. data/lib/plainrouter/openapi/models/destination_type.rb +2 -2
  76. data/lib/plainrouter/openapi/models/emq_snapshot.rb +30 -3
  77. data/lib/plainrouter/openapi/models/error_message.rb +2 -2
  78. data/lib/plainrouter/openapi/models/event.rb +89 -45
  79. data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +2 -2
  80. data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +30 -3
  81. data/lib/plainrouter/openapi/models/get_event200_response.rb +2 -2
  82. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +30 -3
  83. data/lib/plainrouter/openapi/models/get_event200_response_event.rb +31 -4
  84. data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +2 -2
  85. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +30 -3
  86. data/lib/plainrouter/openapi/models/get_event200_response_event_user_data_hashed.rb +104 -0
  87. data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +2 -2
  88. data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +31 -4
  89. data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +31 -4
  90. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +2 -2
  91. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +30 -3
  92. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +2 -2
  93. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +2 -2
  94. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +2 -2
  95. data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +2 -2
  96. data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +32 -6
  97. data/lib/plainrouter/openapi/models/{create_sandbox_key201_response.rb → get_sandbox200_response_self_serve_key_issued_key.rb} +6 -6
  98. data/lib/plainrouter/openapi/models/{create_sandbox_key201_response_use.rb → get_sandbox200_response_self_serve_key_issued_key_use.rb} +5 -5
  99. data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +2 -2
  100. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +2 -2
  101. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +2 -2
  102. data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +39 -0
  103. data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +2 -2
  104. data/lib/plainrouter/openapi/models/list_events200_response.rb +2 -2
  105. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +2 -2
  106. data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +2 -2
  107. data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +2 -2
  108. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +2 -2
  109. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +2 -2
  110. data/lib/plainrouter/openapi/models/reconciliation_report.rb +31 -3
  111. data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +2 -2
  112. data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +2 -2
  113. data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +2 -2
  114. data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +2 -2
  115. data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +2 -2
  116. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +2 -2
  117. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +30 -3
  118. data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +2 -2
  119. data/lib/plainrouter/openapi/models/traffic_class.rb +2 -2
  120. data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +2 -2
  121. data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +2 -2
  122. data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +2 -2
  123. data/lib/plainrouter/openapi/models/validation_error.rb +2 -2
  124. data/lib/plainrouter/openapi/version.rb +3 -3
  125. data/lib/plainrouter/openapi.rb +58 -4
  126. data/lib/plainrouter/version.rb +1 -1
  127. metadata +64 -10
@@ -0,0 +1,218 @@
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 CreateEvent202Response < ApiModelBase
18
+ attr_accessor :event_id
19
+
20
+ attr_accessor :duplicate
21
+
22
+ attr_accessor :warnings
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'event_id' => :'event_id',
28
+ :'duplicate' => :'duplicate',
29
+ :'warnings' => :'warnings'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'event_id' => :'String',
47
+ :'duplicate' => :'Boolean',
48
+ :'warnings' => :'Array<CreateEvent202ResponseWarningsInner>'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::CreateEvent202Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::CreateEvent202Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'event_id')
75
+ self.event_id = attributes[:'event_id']
76
+ else
77
+ self.event_id = nil
78
+ end
79
+
80
+ if attributes.key?(:'duplicate')
81
+ self.duplicate = attributes[:'duplicate']
82
+ else
83
+ self.duplicate = nil
84
+ end
85
+
86
+ if attributes.key?(:'warnings')
87
+ if (value = attributes[:'warnings']).is_a?(Array)
88
+ self.warnings = value
89
+ end
90
+ else
91
+ self.warnings = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @event_id.nil?
101
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
102
+ end
103
+
104
+ if @duplicate.nil?
105
+ invalid_properties.push('invalid value for "duplicate", duplicate cannot be nil.')
106
+ end
107
+
108
+ if @warnings.nil?
109
+ invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @event_id.nil?
120
+ return false if @duplicate.nil?
121
+ return false if @warnings.nil?
122
+ true
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] event_id Value to be assigned
127
+ def event_id=(event_id)
128
+ if event_id.nil?
129
+ fail ArgumentError, 'event_id cannot be nil'
130
+ end
131
+
132
+ @event_id = event_id
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] duplicate Value to be assigned
137
+ def duplicate=(duplicate)
138
+ if duplicate.nil?
139
+ fail ArgumentError, 'duplicate cannot be nil'
140
+ end
141
+
142
+ @duplicate = duplicate
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] warnings Value to be assigned
147
+ def warnings=(warnings)
148
+ if warnings.nil?
149
+ fail ArgumentError, 'warnings cannot be nil'
150
+ end
151
+
152
+ @warnings = warnings
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ event_id == o.event_id &&
161
+ duplicate == o.duplicate &&
162
+ warnings == o.warnings
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [event_id, duplicate, warnings].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ transformed_hash = {}
184
+ openapi_types.each_pair do |key, type|
185
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = nil
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[attribute_map[key]].is_a?(Array)
191
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
+ end
193
+ elsif !attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
+ end
196
+ end
197
+ new(transformed_hash)
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -0,0 +1,240 @@
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 CreateEvent202ResponseWarningsInner < ApiModelBase
18
+ attr_accessor :code
19
+
20
+ attr_accessor :field
21
+
22
+ attr_accessor :message
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'code' => :'code',
50
+ :'field' => :'field',
51
+ :'message' => :'message'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'code' => :'IngestionWarningCode',
69
+ :'field' => :'String',
70
+ :'message' => :'String'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::CreateEvent202ResponseWarningsInner` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!acceptable_attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::CreateEvent202ResponseWarningsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'code')
97
+ self.code = attributes[:'code']
98
+ else
99
+ self.code = nil
100
+ end
101
+
102
+ if attributes.key?(:'field')
103
+ self.field = attributes[:'field']
104
+ else
105
+ self.field = nil
106
+ end
107
+
108
+ if attributes.key?(:'message')
109
+ self.message = attributes[:'message']
110
+ else
111
+ self.message = nil
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @code.nil?
121
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
122
+ end
123
+
124
+ if @field.nil?
125
+ invalid_properties.push('invalid value for "field", field cannot be nil.')
126
+ end
127
+
128
+ if @message.nil?
129
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ return false if @code.nil?
140
+ return false if @field.nil?
141
+ field_validator = EnumAttributeValidator.new('String', ["consent.captured_at"])
142
+ return false unless field_validator.valid?(@field)
143
+ return false if @message.nil?
144
+ true
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] code Value to be assigned
149
+ def code=(code)
150
+ if code.nil?
151
+ fail ArgumentError, 'code cannot be nil'
152
+ end
153
+
154
+ @code = code
155
+ end
156
+
157
+ # Custom attribute writer method checking allowed values (enum).
158
+ # @param [Object] field Object to be assigned
159
+ def field=(field)
160
+ validator = EnumAttributeValidator.new('String', ["consent.captured_at"])
161
+ unless validator.valid?(field)
162
+ fail ArgumentError, "invalid value for \"field\", must be one of #{validator.allowable_values}."
163
+ end
164
+ @field = field
165
+ end
166
+
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] message Value to be assigned
169
+ def message=(message)
170
+ if message.nil?
171
+ fail ArgumentError, 'message cannot be nil'
172
+ end
173
+
174
+ @message = message
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ code == o.code &&
183
+ field == o.field &&
184
+ message == o.message
185
+ end
186
+
187
+ # @see the `==` method
188
+ # @param [Object] Object to be compared
189
+ def eql?(o)
190
+ self == o
191
+ end
192
+
193
+ # Calculates hash code according to all attributes.
194
+ # @return [Integer] Hash code
195
+ def hash
196
+ [code, field, message].hash
197
+ end
198
+
199
+ # Builds the object from hash
200
+ # @param [Hash] attributes Model attributes in the form of hash
201
+ # @return [Object] Returns the model itself
202
+ def self.build_from_hash(attributes)
203
+ return nil unless attributes.is_a?(Hash)
204
+ attributes = attributes.transform_keys(&:to_sym)
205
+ transformed_hash = {}
206
+ openapi_types.each_pair do |key, type|
207
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = nil
209
+ elsif type =~ /\AArray<(.*)>/i
210
+ # check to ensure the input is an array given that the attribute
211
+ # is documented as an array but the input is not
212
+ if attributes[attribute_map[key]].is_a?(Array)
213
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
214
+ end
215
+ elsif !attributes[attribute_map[key]].nil?
216
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
217
+ end
218
+ end
219
+ new(transformed_hash)
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7
 
@@ -19,33 +19,14 @@ module PlainRouter::OpenAPI
19
19
 
20
20
  attr_accessor :identifier_hash
21
21
 
22
- class EnumAttributeValidator
23
- attr_reader :datatype
24
- attr_reader :allowable_values
25
-
26
- def initialize(datatype, allowable_values)
27
- @allowable_values = allowable_values.map do |value|
28
- case datatype.to_s
29
- when /Integer/i
30
- value.to_i
31
- when /Float/i
32
- value.to_f
33
- else
34
- value
35
- end
36
- end
37
- end
38
-
39
- def valid?(value)
40
- !value || allowable_values.include?(value)
41
- end
42
- end
22
+ attr_accessor :identifier
43
23
 
44
24
  # Attribute mapping from ruby-style variable name to JSON key.
45
25
  def self.attribute_map
46
26
  {
47
27
  :'identifier_type' => :'identifier_type',
48
- :'identifier_hash' => :'identifier_hash'
28
+ :'identifier_hash' => :'identifier_hash',
29
+ :'identifier' => :'identifier'
49
30
  }
50
31
  end
51
32
 
@@ -63,7 +44,8 @@ module PlainRouter::OpenAPI
63
44
  def self.openapi_types
64
45
  {
65
46
  :'identifier_type' => :'String',
66
- :'identifier_hash' => :'String'
47
+ :'identifier_hash' => :'String',
48
+ :'identifier' => :'String'
67
49
  }
68
50
  end
69
51
 
@@ -97,8 +79,10 @@ module PlainRouter::OpenAPI
97
79
 
98
80
  if attributes.key?(:'identifier_hash')
99
81
  self.identifier_hash = attributes[:'identifier_hash']
100
- else
101
- self.identifier_hash = nil
82
+ end
83
+
84
+ if attributes.key?(:'identifier')
85
+ self.identifier = attributes[:'identifier']
102
86
  end
103
87
  end
104
88
 
@@ -111,15 +95,15 @@ module PlainRouter::OpenAPI
111
95
  invalid_properties.push('invalid value for "identifier_type", identifier_type cannot be nil.')
112
96
  end
113
97
 
114
- if @identifier_hash.nil?
115
- invalid_properties.push('invalid value for "identifier_hash", identifier_hash cannot be nil.')
116
- end
117
-
118
98
  pattern = Regexp.new(/^[a-fA-F0-9]{64}$/)
119
- if @identifier_hash !~ pattern
99
+ if !@identifier_hash.nil? && @identifier_hash !~ pattern
120
100
  invalid_properties.push("invalid value for \"identifier_hash\", must conform to the pattern #{pattern}.")
121
101
  end
122
102
 
103
+ if !@identifier.nil? && @identifier.to_s.length > 512
104
+ invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 512.')
105
+ end
106
+
123
107
  invalid_properties
124
108
  end
125
109
 
@@ -130,8 +114,8 @@ module PlainRouter::OpenAPI
130
114
  return false if @identifier_type.nil?
131
115
  identifier_type_validator = EnumAttributeValidator.new('String', ["email", "phone", "external_id"])
132
116
  return false unless identifier_type_validator.valid?(@identifier_type)
133
- return false if @identifier_hash.nil?
134
- return false if @identifier_hash !~ Regexp.new(/^[a-fA-F0-9]{64}$/)
117
+ return false if !@identifier_hash.nil? && @identifier_hash !~ Regexp.new(/^[a-fA-F0-9]{64}$/)
118
+ return false if !@identifier.nil? && @identifier.to_s.length > 512
135
119
  true
136
120
  end
137
121
 
@@ -160,13 +144,28 @@ module PlainRouter::OpenAPI
160
144
  @identifier_hash = identifier_hash
161
145
  end
162
146
 
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] identifier Value to be assigned
149
+ def identifier=(identifier)
150
+ if identifier.nil?
151
+ fail ArgumentError, 'identifier cannot be nil'
152
+ end
153
+
154
+ if identifier.to_s.length > 512
155
+ fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 512.'
156
+ end
157
+
158
+ @identifier = identifier
159
+ end
160
+
163
161
  # Checks equality by comparing each attribute.
164
162
  # @param [Object] Object to be compared
165
163
  def ==(o)
166
164
  return true if self.equal?(o)
167
165
  self.class == o.class &&
168
166
  identifier_type == o.identifier_type &&
169
- identifier_hash == o.identifier_hash
167
+ identifier_hash == o.identifier_hash &&
168
+ identifier == o.identifier
170
169
  end
171
170
 
172
171
  # @see the `==` method
@@ -178,7 +177,7 @@ module PlainRouter::OpenAPI
178
177
  # Calculates hash code according to all attributes.
179
178
  # @return [Integer] Hash code
180
179
  def hash
181
- [identifier_type, identifier_hash].hash
180
+ [identifier_type, identifier_hash, identifier].hash
182
181
  end
183
182
 
184
183
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #PlainRouter Conversion API
2
+ #Plainrouter Conversion API
3
3
 
4
- #PlainRouter public Signals Conversion API.
4
+ #Plainrouter public Signals Conversion API.
5
5
 
6
6
  The version of the OpenAPI document: 0.5.0
7
7