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,309 @@
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 MeDataAttributes
18
+ attr_accessor :id
19
+
20
+ attr_accessor :email
21
+
22
+ attr_accessor :first_name
23
+
24
+ attr_accessor :last_name
25
+
26
+ attr_accessor :time_zone
27
+
28
+ attr_accessor :profile_photo_id
29
+
30
+ attr_accessor :former_user
31
+
32
+ attr_accessor :locale
33
+
34
+ attr_accessor :platform_agent_of_id
35
+
36
+ attr_accessor :created_at
37
+
38
+ attr_accessor :updated_at
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'id' => :'id',
44
+ :'email' => :'email',
45
+ :'first_name' => :'first_name',
46
+ :'last_name' => :'last_name',
47
+ :'time_zone' => :'time_zone',
48
+ :'profile_photo_id' => :'profile_photo_id',
49
+ :'former_user' => :'former_user',
50
+ :'locale' => :'locale',
51
+ :'platform_agent_of_id' => :'platform_agent_of_id',
52
+ :'created_at' => :'created_at',
53
+ :'updated_at' => :'updated_at'
54
+ }
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'id' => :'String',
66
+ :'email' => :'String',
67
+ :'first_name' => :'String',
68
+ :'last_name' => :'String',
69
+ :'time_zone' => :'String',
70
+ :'profile_photo_id' => :'String',
71
+ :'former_user' => :'String',
72
+ :'locale' => :'String',
73
+ :'platform_agent_of_id' => :'String',
74
+ :'created_at' => :'String',
75
+ :'updated_at' => :'String'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BtTest::MeDataAttributes` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BtTest::MeDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'id')
101
+ self.id = attributes[:'id']
102
+ end
103
+
104
+ if attributes.key?(:'email')
105
+ self.email = attributes[:'email']
106
+ end
107
+
108
+ if attributes.key?(:'first_name')
109
+ self.first_name = attributes[:'first_name']
110
+ end
111
+
112
+ if attributes.key?(:'last_name')
113
+ self.last_name = attributes[:'last_name']
114
+ end
115
+
116
+ if attributes.key?(:'time_zone')
117
+ self.time_zone = attributes[:'time_zone']
118
+ end
119
+
120
+ if attributes.key?(:'profile_photo_id')
121
+ self.profile_photo_id = attributes[:'profile_photo_id']
122
+ end
123
+
124
+ if attributes.key?(:'former_user')
125
+ self.former_user = attributes[:'former_user']
126
+ end
127
+
128
+ if attributes.key?(:'locale')
129
+ self.locale = attributes[:'locale']
130
+ end
131
+
132
+ if attributes.key?(:'platform_agent_of_id')
133
+ self.platform_agent_of_id = attributes[:'platform_agent_of_id']
134
+ end
135
+
136
+ if attributes.key?(:'created_at')
137
+ self.created_at = attributes[:'created_at']
138
+ end
139
+
140
+ if attributes.key?(:'updated_at')
141
+ self.updated_at = attributes[:'updated_at']
142
+ end
143
+ end
144
+
145
+ # Show invalid properties with the reasons. Usually used together with valid?
146
+ # @return Array for valid properties with the reasons
147
+ def list_invalid_properties
148
+ invalid_properties = Array.new
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ true
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ id == o.id &&
164
+ email == o.email &&
165
+ first_name == o.first_name &&
166
+ last_name == o.last_name &&
167
+ time_zone == o.time_zone &&
168
+ profile_photo_id == o.profile_photo_id &&
169
+ former_user == o.former_user &&
170
+ locale == o.locale &&
171
+ platform_agent_of_id == o.platform_agent_of_id &&
172
+ created_at == o.created_at &&
173
+ updated_at == o.updated_at
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [id, email, first_name, last_name, time_zone, profile_photo_id, former_user, locale, platform_agent_of_id, created_at, updated_at].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ new.build_from_hash(attributes)
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def build_from_hash(attributes)
199
+ return nil unless attributes.is_a?(Hash)
200
+ attributes = attributes.transform_keys(&:to_sym)
201
+ self.class.openapi_types.each_pair do |key, type|
202
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
203
+ self.send("#{key}=", nil)
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
208
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
209
+ end
210
+ elsif !attributes[self.class.attribute_map[key]].nil?
211
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
212
+ end
213
+ end
214
+
215
+ self
216
+ end
217
+
218
+ # Deserializes the data based on type
219
+ # @param string type Data type
220
+ # @param string value Value to be deserialized
221
+ # @return [Object] Deserialized data
222
+ def _deserialize(type, value)
223
+ case type.to_sym
224
+ when :Time
225
+ Time.parse(value)
226
+ when :Date
227
+ Date.parse(value)
228
+ when :String
229
+ value.to_s
230
+ when :Integer
231
+ value.to_i
232
+ when :Float
233
+ value.to_f
234
+ when :Boolean
235
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
236
+ true
237
+ else
238
+ false
239
+ end
240
+ when :Object
241
+ # generic object (usually a Hash), return directly
242
+ value
243
+ when /\AArray<(?<inner_type>.+)>\z/
244
+ inner_type = Regexp.last_match[:inner_type]
245
+ value.map { |v| _deserialize(inner_type, v) }
246
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
247
+ k_type = Regexp.last_match[:k_type]
248
+ v_type = Regexp.last_match[:v_type]
249
+ {}.tap do |hash|
250
+ value.each do |k, v|
251
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
252
+ end
253
+ end
254
+ else # model
255
+ # models (e.g. Pet) or oneOf
256
+ klass = BtTest.const_get(type)
257
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
258
+ end
259
+ end
260
+
261
+ # Returns the string representation of the object
262
+ # @return [String] String presentation of the object
263
+ def to_s
264
+ to_hash.to_s
265
+ end
266
+
267
+ # to_body is an alias to to_hash (backward compatibility)
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_body
270
+ to_hash
271
+ end
272
+
273
+ # Returns the object in the form of hash
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_hash
276
+ hash = {}
277
+ self.class.attribute_map.each_pair do |attr, param|
278
+ value = self.send(attr)
279
+ if value.nil?
280
+ is_nullable = self.class.openapi_nullable.include?(attr)
281
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
282
+ end
283
+
284
+ hash[param] = _to_hash(value)
285
+ end
286
+ hash
287
+ end
288
+
289
+ # Outputs non-array value in the form of hash
290
+ # For object, use to_hash. Otherwise, just return the value
291
+ # @param [Object] value Any valid value
292
+ # @return [Hash] Returns the value in the form of hash
293
+ def _to_hash(value)
294
+ if value.is_a?(Array)
295
+ value.compact.map { |v| _to_hash(v) }
296
+ elsif value.is_a?(Hash)
297
+ {}.tap do |hash|
298
+ value.each { |k, v| hash[k] = _to_hash(v) }
299
+ end
300
+ elsif value.respond_to? :to_hash
301
+ value.to_hash
302
+ else
303
+ value
304
+ end
305
+ end
306
+
307
+ end
308
+
309
+ end
@@ -0,0 +1,228 @@
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 MeDataRelationships
18
+ attr_accessor :teams
19
+
20
+ attr_accessor :memberships
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'teams' => :'teams',
26
+ :'memberships' => :'memberships'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'teams' => :'ProjectDataRelationshipsTags',
39
+ :'memberships' => :'ProjectDataRelationshipsTags'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BtTest::MeDataRelationships` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BtTest::MeDataRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'teams')
65
+ self.teams = attributes[:'teams']
66
+ end
67
+
68
+ if attributes.key?(:'memberships')
69
+ self.memberships = attributes[:'memberships']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ teams == o.teams &&
92
+ memberships == o.memberships
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [teams, memberships].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ # models (e.g. Pet) or oneOf
175
+ klass = BtTest.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end