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