bt_test 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +187 -0
  4. data/Rakefile +10 -0
  5. data/bt_test.gemspec +38 -0
  6. data/docs/CreateGoalRequest.md +18 -0
  7. data/docs/CreateProjectRequest.md +26 -0
  8. data/docs/CreateProjectsTagRequest.md +18 -0
  9. data/docs/CreateScaffoldingAbsolutelyAbstractCreativeConceptRequest.md +20 -0
  10. data/docs/CreateTeamRequest.md +20 -0
  11. data/docs/CreateWebhooksOutgoingEndpointRequest.md +22 -0
  12. data/docs/Goal.md +18 -0
  13. data/docs/GoalData.md +24 -0
  14. data/docs/GoalDataAttributes.md +24 -0
  15. data/docs/GoalDataRelationships.md +18 -0
  16. data/docs/Me.md +18 -0
  17. data/docs/MeData.md +24 -0
  18. data/docs/MeDataAttributes.md +38 -0
  19. data/docs/MeDataRelationships.md +20 -0
  20. data/docs/PlatformApi.md +2834 -0
  21. data/docs/Project.md +18 -0
  22. data/docs/ProjectData.md +24 -0
  23. data/docs/ProjectDataAttributes.md +24 -0
  24. data/docs/ProjectDataRelationships.md +26 -0
  25. data/docs/ProjectDataRelationshipsTags.md +18 -0
  26. data/docs/ProjectsTag.md +18 -0
  27. data/docs/ProjectsTagData.md +24 -0
  28. data/docs/ProjectsTagDataAttributes.md +22 -0
  29. data/docs/ProjectsTagDataRelationships.md +20 -0
  30. data/docs/ProjectsTagDataRelationshipsTeam.md +18 -0
  31. data/docs/ProjectsTagDataRelationshipsTeamData.md +20 -0
  32. data/docs/ScaffoldingAbsolutelyAbstractCreativeConcept.md +18 -0
  33. data/docs/ScaffoldingAbsolutelyAbstractCreativeConceptData.md +24 -0
  34. data/docs/ScaffoldingAbsolutelyAbstractCreativeConceptDataAttributes.md +28 -0
  35. data/docs/ScaffoldingAbsolutelyAbstractCreativeConceptDataRelationships.md +20 -0
  36. data/docs/ScaffoldingCompletelyConcreteTangibleThing.md +18 -0
  37. data/docs/ScaffoldingCompletelyConcreteTangibleThingData.md +24 -0
  38. data/docs/ScaffoldingCompletelyConcreteTangibleThingDataAttributes.md +46 -0
  39. data/docs/ScaffoldingCompletelyConcreteTangibleThingDataRelationships.md +18 -0
  40. data/docs/Team.md +18 -0
  41. data/docs/TeamData.md +24 -0
  42. data/docs/TeamDataAttributes.md +28 -0
  43. data/docs/TeamDataRelationships.md +18 -0
  44. data/docs/UpdateScaffoldingCompletelyConcreteTangibleThingRequest.md +46 -0
  45. data/docs/WebhooksOutgoingDelivery.md +18 -0
  46. data/docs/WebhooksOutgoingDeliveryAttempt.md +18 -0
  47. data/docs/WebhooksOutgoingDeliveryAttemptData.md +24 -0
  48. data/docs/WebhooksOutgoingDeliveryAttemptDataAttributes.md +34 -0
  49. data/docs/WebhooksOutgoingDeliveryAttemptDataRelationships.md +18 -0
  50. data/docs/WebhooksOutgoingDeliveryData.md +24 -0
  51. data/docs/WebhooksOutgoingDeliveryDataAttributes.md +30 -0
  52. data/docs/WebhooksOutgoingDeliveryDataRelationships.md +18 -0
  53. data/docs/WebhooksOutgoingEndpoint.md +18 -0
  54. data/docs/WebhooksOutgoingEndpointData.md +24 -0
  55. data/docs/WebhooksOutgoingEndpointDataAttributes.md +28 -0
  56. data/docs/WebhooksOutgoingEndpointDataRelationships.md +18 -0
  57. data/git_push.sh +57 -0
  58. data/lib/bt_test/api/platform_api.rb +2523 -0
  59. data/lib/bt_test/api_client.rb +392 -0
  60. data/lib/bt_test/api_error.rb +57 -0
  61. data/lib/bt_test/configuration.rb +280 -0
  62. data/lib/bt_test/models/create_goal_request.rb +220 -0
  63. data/lib/bt_test/models/create_project_request.rb +262 -0
  64. data/lib/bt_test/models/create_projects_tag_request.rb +220 -0
  65. data/lib/bt_test/models/create_scaffolding_absolutely_abstract_creative_concept_request.rb +230 -0
  66. data/lib/bt_test/models/create_team_request.rb +230 -0
  67. data/lib/bt_test/models/create_webhooks_outgoing_endpoint_request.rb +242 -0
  68. data/lib/bt_test/models/goal.rb +220 -0
  69. data/lib/bt_test/models/goal_data.rb +246 -0
  70. data/lib/bt_test/models/goal_data_attributes.rb +246 -0
  71. data/lib/bt_test/models/goal_data_relationships.rb +219 -0
  72. data/lib/bt_test/models/me.rb +220 -0
  73. data/lib/bt_test/models/me_data.rb +246 -0
  74. data/lib/bt_test/models/me_data_attributes.rb +309 -0
  75. data/lib/bt_test/models/me_data_relationships.rb +228 -0
  76. data/lib/bt_test/models/project.rb +220 -0
  77. data/lib/bt_test/models/project_data.rb +246 -0
  78. data/lib/bt_test/models/project_data_attributes.rb +246 -0
  79. data/lib/bt_test/models/project_data_relationships.rb +255 -0
  80. data/lib/bt_test/models/project_data_relationships_tags.rb +221 -0
  81. data/lib/bt_test/models/projects_tag.rb +220 -0
  82. data/lib/bt_test/models/projects_tag_data.rb +246 -0
  83. data/lib/bt_test/models/projects_tag_data_attributes.rb +237 -0
  84. data/lib/bt_test/models/projects_tag_data_relationships.rb +228 -0
  85. data/lib/bt_test/models/projects_tag_data_relationships_team.rb +219 -0
  86. data/lib/bt_test/models/projects_tag_data_relationships_team_data.rb +228 -0
  87. data/lib/bt_test/models/scaffolding_absolutely_abstract_creative_concept.rb +220 -0
  88. data/lib/bt_test/models/scaffolding_absolutely_abstract_creative_concept_data.rb +246 -0
  89. data/lib/bt_test/models/scaffolding_absolutely_abstract_creative_concept_data_attributes.rb +264 -0
  90. data/lib/bt_test/models/scaffolding_absolutely_abstract_creative_concept_data_relationships.rb +228 -0
  91. data/lib/bt_test/models/scaffolding_completely_concrete_tangible_thing.rb +220 -0
  92. data/lib/bt_test/models/scaffolding_completely_concrete_tangible_thing_data.rb +246 -0
  93. data/lib/bt_test/models/scaffolding_completely_concrete_tangible_thing_data_attributes.rb +345 -0
  94. data/lib/bt_test/models/scaffolding_completely_concrete_tangible_thing_data_relationships.rb +219 -0
  95. data/lib/bt_test/models/team.rb +220 -0
  96. data/lib/bt_test/models/team_data.rb +246 -0
  97. data/lib/bt_test/models/team_data_attributes.rb +264 -0
  98. data/lib/bt_test/models/team_data_relationships.rb +219 -0
  99. data/lib/bt_test/models/update_scaffolding_completely_concrete_tangible_thing_request.rb +366 -0
  100. data/lib/bt_test/models/webhooks_outgoing_delivery.rb +220 -0
  101. data/lib/bt_test/models/webhooks_outgoing_delivery_attempt.rb +220 -0
  102. data/lib/bt_test/models/webhooks_outgoing_delivery_attempt_data.rb +246 -0
  103. data/lib/bt_test/models/webhooks_outgoing_delivery_attempt_data_attributes.rb +291 -0
  104. data/lib/bt_test/models/webhooks_outgoing_delivery_attempt_data_relationships.rb +219 -0
  105. data/lib/bt_test/models/webhooks_outgoing_delivery_data.rb +246 -0
  106. data/lib/bt_test/models/webhooks_outgoing_delivery_data_attributes.rb +273 -0
  107. data/lib/bt_test/models/webhooks_outgoing_delivery_data_relationships.rb +219 -0
  108. data/lib/bt_test/models/webhooks_outgoing_endpoint.rb +220 -0
  109. data/lib/bt_test/models/webhooks_outgoing_endpoint_data.rb +246 -0
  110. data/lib/bt_test/models/webhooks_outgoing_endpoint_data_attributes.rb +264 -0
  111. data/lib/bt_test/models/webhooks_outgoing_endpoint_data_relationships.rb +219 -0
  112. data/lib/bt_test/version.rb +15 -0
  113. data/lib/bt_test.rb +90 -0
  114. data/spec/api/platform_api_spec.rb +493 -0
  115. data/spec/api_client_spec.rb +226 -0
  116. data/spec/configuration_spec.rb +42 -0
  117. data/spec/models/create_goal_request_spec.rb +34 -0
  118. data/spec/models/create_project_request_spec.rb +58 -0
  119. data/spec/models/create_projects_tag_request_spec.rb +34 -0
  120. data/spec/models/create_scaffolding_absolutely_abstract_creative_concept_request_spec.rb +40 -0
  121. data/spec/models/create_team_request_spec.rb +40 -0
  122. data/spec/models/create_webhooks_outgoing_endpoint_request_spec.rb +46 -0
  123. data/spec/models/goal_data_attributes_spec.rb +52 -0
  124. data/spec/models/goal_data_relationships_spec.rb +34 -0
  125. data/spec/models/goal_data_spec.rb +52 -0
  126. data/spec/models/goal_spec.rb +34 -0
  127. data/spec/models/me_data_attributes_spec.rb +94 -0
  128. data/spec/models/me_data_relationships_spec.rb +40 -0
  129. data/spec/models/me_data_spec.rb +52 -0
  130. data/spec/models/me_spec.rb +34 -0
  131. data/spec/models/project_data_attributes_spec.rb +52 -0
  132. data/spec/models/project_data_relationships_spec.rb +58 -0
  133. data/spec/models/project_data_relationships_tags_spec.rb +34 -0
  134. data/spec/models/project_data_spec.rb +52 -0
  135. data/spec/models/project_spec.rb +34 -0
  136. data/spec/models/projects_tag_data_attributes_spec.rb +46 -0
  137. data/spec/models/projects_tag_data_relationships_spec.rb +40 -0
  138. data/spec/models/projects_tag_data_relationships_team_data_spec.rb +40 -0
  139. data/spec/models/projects_tag_data_relationships_team_spec.rb +34 -0
  140. data/spec/models/projects_tag_data_spec.rb +52 -0
  141. data/spec/models/projects_tag_spec.rb +34 -0
  142. data/spec/models/scaffolding_absolutely_abstract_creative_concept_data_attributes_spec.rb +64 -0
  143. data/spec/models/scaffolding_absolutely_abstract_creative_concept_data_relationships_spec.rb +40 -0
  144. data/spec/models/scaffolding_absolutely_abstract_creative_concept_data_spec.rb +52 -0
  145. data/spec/models/scaffolding_absolutely_abstract_creative_concept_spec.rb +34 -0
  146. data/spec/models/scaffolding_completely_concrete_tangible_thing_data_attributes_spec.rb +118 -0
  147. data/spec/models/scaffolding_completely_concrete_tangible_thing_data_relationships_spec.rb +34 -0
  148. data/spec/models/scaffolding_completely_concrete_tangible_thing_data_spec.rb +52 -0
  149. data/spec/models/scaffolding_completely_concrete_tangible_thing_spec.rb +34 -0
  150. data/spec/models/team_data_attributes_spec.rb +64 -0
  151. data/spec/models/team_data_relationships_spec.rb +34 -0
  152. data/spec/models/team_data_spec.rb +52 -0
  153. data/spec/models/team_spec.rb +34 -0
  154. data/spec/models/update_scaffolding_completely_concrete_tangible_thing_request_spec.rb +118 -0
  155. data/spec/models/webhooks_outgoing_delivery_attempt_data_attributes_spec.rb +82 -0
  156. data/spec/models/webhooks_outgoing_delivery_attempt_data_relationships_spec.rb +34 -0
  157. data/spec/models/webhooks_outgoing_delivery_attempt_data_spec.rb +52 -0
  158. data/spec/models/webhooks_outgoing_delivery_attempt_spec.rb +34 -0
  159. data/spec/models/webhooks_outgoing_delivery_data_attributes_spec.rb +70 -0
  160. data/spec/models/webhooks_outgoing_delivery_data_relationships_spec.rb +34 -0
  161. data/spec/models/webhooks_outgoing_delivery_data_spec.rb +52 -0
  162. data/spec/models/webhooks_outgoing_delivery_spec.rb +34 -0
  163. data/spec/models/webhooks_outgoing_endpoint_data_attributes_spec.rb +64 -0
  164. data/spec/models/webhooks_outgoing_endpoint_data_relationships_spec.rb +34 -0
  165. data/spec/models/webhooks_outgoing_endpoint_data_spec.rb +52 -0
  166. data/spec/models/webhooks_outgoing_endpoint_spec.rb +34 -0
  167. data/spec/spec_helper.rb +111 -0
  168. metadata +303 -0
@@ -0,0 +1,345 @@
1
+ =begin
2
+ #BT Test
3
+
4
+ #You can update this description in `config/locales/en/application.en.yml`.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BtTest
17
+ class ScaffoldingCompletelyConcreteTangibleThingDataAttributes
18
+ attr_accessor :id
19
+
20
+ attr_accessor :absolutely_abstract_creative_concept_id
21
+
22
+ attr_accessor :text_field_value
23
+
24
+ attr_accessor :button_value
25
+
26
+ attr_accessor :color_picker_value
27
+
28
+ attr_accessor :cloudinary_image_value
29
+
30
+ attr_accessor :date_field_value
31
+
32
+ attr_accessor :date_and_time_field_value
33
+
34
+ attr_accessor :email_field_value
35
+
36
+ attr_accessor :password_field_value
37
+
38
+ attr_accessor :phone_field_value
39
+
40
+ attr_accessor :option_value
41
+
42
+ attr_accessor :super_select_value
43
+
44
+ attr_accessor :created_at
45
+
46
+ attr_accessor :updated_at
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'absolutely_abstract_creative_concept_id' => :'absolutely_abstract_creative_concept_id',
53
+ :'text_field_value' => :'text_field_value',
54
+ :'button_value' => :'button_value',
55
+ :'color_picker_value' => :'color_picker_value',
56
+ :'cloudinary_image_value' => :'cloudinary_image_value',
57
+ :'date_field_value' => :'date_field_value',
58
+ :'date_and_time_field_value' => :'date_and_time_field_value',
59
+ :'email_field_value' => :'email_field_value',
60
+ :'password_field_value' => :'password_field_value',
61
+ :'phone_field_value' => :'phone_field_value',
62
+ :'option_value' => :'option_value',
63
+ :'super_select_value' => :'super_select_value',
64
+ :'created_at' => :'created_at',
65
+ :'updated_at' => :'updated_at'
66
+ }
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'id' => :'Integer',
78
+ :'absolutely_abstract_creative_concept_id' => :'Integer',
79
+ :'text_field_value' => :'String',
80
+ :'button_value' => :'String',
81
+ :'color_picker_value' => :'String',
82
+ :'cloudinary_image_value' => :'String',
83
+ :'date_field_value' => :'Date',
84
+ :'date_and_time_field_value' => :'Time',
85
+ :'email_field_value' => :'String',
86
+ :'password_field_value' => :'String',
87
+ :'phone_field_value' => :'String',
88
+ :'option_value' => :'String',
89
+ :'super_select_value' => :'String',
90
+ :'created_at' => :'Time',
91
+ :'updated_at' => :'Time'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BtTest::ScaffoldingCompletelyConcreteTangibleThingDataAttributes` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BtTest::ScaffoldingCompletelyConcreteTangibleThingDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'id')
117
+ self.id = attributes[:'id']
118
+ end
119
+
120
+ if attributes.key?(:'absolutely_abstract_creative_concept_id')
121
+ self.absolutely_abstract_creative_concept_id = attributes[:'absolutely_abstract_creative_concept_id']
122
+ end
123
+
124
+ if attributes.key?(:'text_field_value')
125
+ self.text_field_value = attributes[:'text_field_value']
126
+ end
127
+
128
+ if attributes.key?(:'button_value')
129
+ self.button_value = attributes[:'button_value']
130
+ end
131
+
132
+ if attributes.key?(:'color_picker_value')
133
+ self.color_picker_value = attributes[:'color_picker_value']
134
+ end
135
+
136
+ if attributes.key?(:'cloudinary_image_value')
137
+ self.cloudinary_image_value = attributes[:'cloudinary_image_value']
138
+ end
139
+
140
+ if attributes.key?(:'date_field_value')
141
+ self.date_field_value = attributes[:'date_field_value']
142
+ end
143
+
144
+ if attributes.key?(:'date_and_time_field_value')
145
+ self.date_and_time_field_value = attributes[:'date_and_time_field_value']
146
+ end
147
+
148
+ if attributes.key?(:'email_field_value')
149
+ self.email_field_value = attributes[:'email_field_value']
150
+ end
151
+
152
+ if attributes.key?(:'password_field_value')
153
+ self.password_field_value = attributes[:'password_field_value']
154
+ end
155
+
156
+ if attributes.key?(:'phone_field_value')
157
+ self.phone_field_value = attributes[:'phone_field_value']
158
+ end
159
+
160
+ if attributes.key?(:'option_value')
161
+ self.option_value = attributes[:'option_value']
162
+ end
163
+
164
+ if attributes.key?(:'super_select_value')
165
+ self.super_select_value = attributes[:'super_select_value']
166
+ end
167
+
168
+ if attributes.key?(:'created_at')
169
+ self.created_at = attributes[:'created_at']
170
+ end
171
+
172
+ if attributes.key?(:'updated_at')
173
+ self.updated_at = attributes[:'updated_at']
174
+ end
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properties with the reasons
179
+ def list_invalid_properties
180
+ invalid_properties = Array.new
181
+ invalid_properties
182
+ end
183
+
184
+ # Check to see if the all the properties in the model are valid
185
+ # @return true if the model is valid
186
+ def valid?
187
+ true
188
+ end
189
+
190
+ # Checks equality by comparing each attribute.
191
+ # @param [Object] Object to be compared
192
+ def ==(o)
193
+ return true if self.equal?(o)
194
+ self.class == o.class &&
195
+ id == o.id &&
196
+ absolutely_abstract_creative_concept_id == o.absolutely_abstract_creative_concept_id &&
197
+ text_field_value == o.text_field_value &&
198
+ button_value == o.button_value &&
199
+ color_picker_value == o.color_picker_value &&
200
+ cloudinary_image_value == o.cloudinary_image_value &&
201
+ date_field_value == o.date_field_value &&
202
+ date_and_time_field_value == o.date_and_time_field_value &&
203
+ email_field_value == o.email_field_value &&
204
+ password_field_value == o.password_field_value &&
205
+ phone_field_value == o.phone_field_value &&
206
+ option_value == o.option_value &&
207
+ super_select_value == o.super_select_value &&
208
+ created_at == o.created_at &&
209
+ updated_at == o.updated_at
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ def hash
221
+ [id, absolutely_abstract_creative_concept_id, text_field_value, button_value, color_picker_value, cloudinary_image_value, date_field_value, date_and_time_field_value, email_field_value, password_field_value, phone_field_value, option_value, super_select_value, created_at, updated_at].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def self.build_from_hash(attributes)
228
+ new.build_from_hash(attributes)
229
+ end
230
+
231
+ # Builds the object from hash
232
+ # @param [Hash] attributes Model attributes in the form of hash
233
+ # @return [Object] Returns the model itself
234
+ def build_from_hash(attributes)
235
+ return nil unless attributes.is_a?(Hash)
236
+ attributes = attributes.transform_keys(&:to_sym)
237
+ self.class.openapi_types.each_pair do |key, type|
238
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
239
+ self.send("#{key}=", nil)
240
+ elsif type =~ /\AArray<(.*)>/i
241
+ # check to ensure the input is an array given that the attribute
242
+ # is documented as an array but the input is not
243
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
244
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
245
+ end
246
+ elsif !attributes[self.class.attribute_map[key]].nil?
247
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
248
+ end
249
+ end
250
+
251
+ self
252
+ end
253
+
254
+ # Deserializes the data based on type
255
+ # @param string type Data type
256
+ # @param string value Value to be deserialized
257
+ # @return [Object] Deserialized data
258
+ def _deserialize(type, value)
259
+ case type.to_sym
260
+ when :Time
261
+ Time.parse(value)
262
+ when :Date
263
+ Date.parse(value)
264
+ when :String
265
+ value.to_s
266
+ when :Integer
267
+ value.to_i
268
+ when :Float
269
+ value.to_f
270
+ when :Boolean
271
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
272
+ true
273
+ else
274
+ false
275
+ end
276
+ when :Object
277
+ # generic object (usually a Hash), return directly
278
+ value
279
+ when /\AArray<(?<inner_type>.+)>\z/
280
+ inner_type = Regexp.last_match[:inner_type]
281
+ value.map { |v| _deserialize(inner_type, v) }
282
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
283
+ k_type = Regexp.last_match[:k_type]
284
+ v_type = Regexp.last_match[:v_type]
285
+ {}.tap do |hash|
286
+ value.each do |k, v|
287
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
288
+ end
289
+ end
290
+ else # model
291
+ # models (e.g. Pet) or oneOf
292
+ klass = BtTest.const_get(type)
293
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
294
+ end
295
+ end
296
+
297
+ # Returns the string representation of the object
298
+ # @return [String] String presentation of the object
299
+ def to_s
300
+ to_hash.to_s
301
+ end
302
+
303
+ # to_body is an alias to to_hash (backward compatibility)
304
+ # @return [Hash] Returns the object in the form of hash
305
+ def to_body
306
+ to_hash
307
+ end
308
+
309
+ # Returns the object in the form of hash
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_hash
312
+ hash = {}
313
+ self.class.attribute_map.each_pair do |attr, param|
314
+ value = self.send(attr)
315
+ if value.nil?
316
+ is_nullable = self.class.openapi_nullable.include?(attr)
317
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
318
+ end
319
+
320
+ hash[param] = _to_hash(value)
321
+ end
322
+ hash
323
+ end
324
+
325
+ # Outputs non-array value in the form of hash
326
+ # For object, use to_hash. Otherwise, just return the value
327
+ # @param [Object] value Any valid value
328
+ # @return [Hash] Returns the value in the form of hash
329
+ def _to_hash(value)
330
+ if value.is_a?(Array)
331
+ value.compact.map { |v| _to_hash(v) }
332
+ elsif value.is_a?(Hash)
333
+ {}.tap do |hash|
334
+ value.each { |k, v| hash[k] = _to_hash(v) }
335
+ end
336
+ elsif value.respond_to? :to_hash
337
+ value.to_hash
338
+ else
339
+ value
340
+ end
341
+ end
342
+
343
+ end
344
+
345
+ end
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #BT Test
3
+
4
+ #You can update this description in `config/locales/en/application.en.yml`.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BtTest
17
+ class ScaffoldingCompletelyConcreteTangibleThingDataRelationships
18
+ attr_accessor :absolutely_abstract_creative_concept
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'absolutely_abstract_creative_concept' => :'absolutely_abstract_creative_concept'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'absolutely_abstract_creative_concept' => :'ProjectsTagDataRelationshipsTeam'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BtTest::ScaffoldingCompletelyConcreteTangibleThingDataRelationships` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BtTest::ScaffoldingCompletelyConcreteTangibleThingDataRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'absolutely_abstract_creative_concept')
61
+ self.absolutely_abstract_creative_concept = attributes[:'absolutely_abstract_creative_concept']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ absolutely_abstract_creative_concept == o.absolutely_abstract_creative_concept
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [absolutely_abstract_creative_concept].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = BtTest.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end