appmarketapi-rest 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +126 -0
  4. data/Rakefile +8 -0
  5. data/appmarketapi-rest.gemspec +45 -0
  6. data/docs/AppMarketAPIApi.md +388 -0
  7. data/docs/AppmarketapiApplication.md +22 -0
  8. data/docs/AppmarketapiApplicationCategories.md +8 -0
  9. data/docs/AppmarketapiApplicationFlowImages.md +8 -0
  10. data/docs/AppmarketapiApplicationIcon.md +8 -0
  11. data/docs/AppmarketapiApplicationMode.md +7 -0
  12. data/docs/AppmarketapiApplicationPromotion.md +8 -0
  13. data/docs/AppmarketapiApplicationSupportedPlatforms.md +8 -0
  14. data/docs/AppmarketapiApplicationTestUsers.md +8 -0
  15. data/docs/AppmarketapiAuthorizeApplicationRequest.md +11 -0
  16. data/docs/AppmarketapiAuthorizeApplicationResponse.md +8 -0
  17. data/docs/AppmarketapiCategory.md +8 -0
  18. data/docs/AppmarketapiCreateApplicationRequest.md +9 -0
  19. data/docs/AppmarketapiCreateApplicationResponse.md +9 -0
  20. data/docs/AppmarketapiCreateDeveloperRequest.md +11 -0
  21. data/docs/AppmarketapiCreateDeveloperResponse.md +11 -0
  22. data/docs/AppmarketapiCurrentApplicationMode.md +8 -0
  23. data/docs/AppmarketapiDeauthorizeApplicationRequest.md +10 -0
  24. data/docs/AppmarketapiDeauthorizeApplicationResponse.md +7 -0
  25. data/docs/AppmarketapiDeveloper.md +10 -0
  26. data/docs/AppmarketapiExtendedApplication.md +9 -0
  27. data/docs/AppmarketapiFlowImage.md +9 -0
  28. data/docs/AppmarketapiGetApplicationIdResponse.md +8 -0
  29. data/docs/AppmarketapiGetApplicationResponse.md +9 -0
  30. data/docs/AppmarketapiGetApplicationsResponse.md +8 -0
  31. data/docs/AppmarketapiPlatform.md +8 -0
  32. data/docs/AppmarketapiSectionError.md +9 -0
  33. data/docs/AppmarketapiUpdateApplicationMetadata.md +14 -0
  34. data/docs/AppmarketapiUpdateApplicationRequest.md +16 -0
  35. data/docs/AppmarketapiUpdateApplicationResponse.md +17 -0
  36. data/docs/AppmarketapiUser.md +9 -0
  37. data/git_push.sh +55 -0
  38. data/lib/appmarketapi-rest.rb +70 -0
  39. data/lib/appmarketapi-rest/api/app_market_api_api.rb +450 -0
  40. data/lib/appmarketapi-rest/api_client.rb +388 -0
  41. data/lib/appmarketapi-rest/api_error.rb +38 -0
  42. data/lib/appmarketapi-rest/configuration.rb +202 -0
  43. data/lib/appmarketapi-rest/models/appmarketapi_application.rb +317 -0
  44. data/lib/appmarketapi-rest/models/appmarketapi_application_categories.rb +185 -0
  45. data/lib/appmarketapi-rest/models/appmarketapi_application_flow_images.rb +185 -0
  46. data/lib/appmarketapi-rest/models/appmarketapi_application_icon.rb +183 -0
  47. data/lib/appmarketapi-rest/models/appmarketapi_application_mode.rb +32 -0
  48. data/lib/appmarketapi-rest/models/appmarketapi_application_promotion.rb +183 -0
  49. data/lib/appmarketapi-rest/models/appmarketapi_application_supported_platforms.rb +185 -0
  50. data/lib/appmarketapi-rest/models/appmarketapi_application_test_users.rb +185 -0
  51. data/lib/appmarketapi-rest/models/appmarketapi_authorize_application_request.rb +210 -0
  52. data/lib/appmarketapi-rest/models/appmarketapi_authorize_application_response.rb +183 -0
  53. data/lib/appmarketapi-rest/models/appmarketapi_category.rb +183 -0
  54. data/lib/appmarketapi-rest/models/appmarketapi_create_application_request.rb +192 -0
  55. data/lib/appmarketapi-rest/models/appmarketapi_create_application_response.rb +192 -0
  56. data/lib/appmarketapi-rest/models/appmarketapi_create_developer_request.rb +210 -0
  57. data/lib/appmarketapi-rest/models/appmarketapi_create_developer_response.rb +210 -0
  58. data/lib/appmarketapi-rest/models/appmarketapi_current_application_mode.rb +183 -0
  59. data/lib/appmarketapi-rest/models/appmarketapi_deauthorize_application_request.rb +201 -0
  60. data/lib/appmarketapi-rest/models/appmarketapi_deauthorize_application_response.rb +174 -0
  61. data/lib/appmarketapi-rest/models/appmarketapi_developer.rb +201 -0
  62. data/lib/appmarketapi-rest/models/appmarketapi_extended_application.rb +192 -0
  63. data/lib/appmarketapi-rest/models/appmarketapi_flow_image.rb +192 -0
  64. data/lib/appmarketapi-rest/models/appmarketapi_get_application_id_response.rb +183 -0
  65. data/lib/appmarketapi-rest/models/appmarketapi_get_application_response.rb +192 -0
  66. data/lib/appmarketapi-rest/models/appmarketapi_get_applications_response.rb +185 -0
  67. data/lib/appmarketapi-rest/models/appmarketapi_platform.rb +183 -0
  68. data/lib/appmarketapi-rest/models/appmarketapi_section_error.rb +192 -0
  69. data/lib/appmarketapi-rest/models/appmarketapi_update_application_metadata.rb +237 -0
  70. data/lib/appmarketapi-rest/models/appmarketapi_update_application_request.rb +255 -0
  71. data/lib/appmarketapi-rest/models/appmarketapi_update_application_response.rb +266 -0
  72. data/lib/appmarketapi-rest/models/appmarketapi_user.rb +194 -0
  73. data/lib/appmarketapi-rest/version.rb +15 -0
  74. data/spec/api/app_market_api_api_spec.rb +122 -0
  75. data/spec/api_client_spec.rb +226 -0
  76. data/spec/configuration_spec.rb +42 -0
  77. data/spec/models/appmarketapi_application_categories_spec.rb +41 -0
  78. data/spec/models/appmarketapi_application_flow_images_spec.rb +41 -0
  79. data/spec/models/appmarketapi_application_icon_spec.rb +41 -0
  80. data/spec/models/appmarketapi_application_mode_spec.rb +35 -0
  81. data/spec/models/appmarketapi_application_promotion_spec.rb +41 -0
  82. data/spec/models/appmarketapi_application_spec.rb +125 -0
  83. data/spec/models/appmarketapi_application_supported_platforms_spec.rb +41 -0
  84. data/spec/models/appmarketapi_application_test_users_spec.rb +41 -0
  85. data/spec/models/appmarketapi_authorize_application_request_spec.rb +59 -0
  86. data/spec/models/appmarketapi_authorize_application_response_spec.rb +41 -0
  87. data/spec/models/appmarketapi_category_spec.rb +41 -0
  88. data/spec/models/appmarketapi_create_application_request_spec.rb +47 -0
  89. data/spec/models/appmarketapi_create_application_response_spec.rb +47 -0
  90. data/spec/models/appmarketapi_create_developer_request_spec.rb +59 -0
  91. data/spec/models/appmarketapi_create_developer_response_spec.rb +59 -0
  92. data/spec/models/appmarketapi_current_application_mode_spec.rb +41 -0
  93. data/spec/models/appmarketapi_deauthorize_application_request_spec.rb +53 -0
  94. data/spec/models/appmarketapi_deauthorize_application_response_spec.rb +35 -0
  95. data/spec/models/appmarketapi_developer_spec.rb +53 -0
  96. data/spec/models/appmarketapi_extended_application_spec.rb +47 -0
  97. data/spec/models/appmarketapi_flow_image_spec.rb +47 -0
  98. data/spec/models/appmarketapi_get_application_id_response_spec.rb +41 -0
  99. data/spec/models/appmarketapi_get_application_response_spec.rb +47 -0
  100. data/spec/models/appmarketapi_get_applications_response_spec.rb +41 -0
  101. data/spec/models/appmarketapi_platform_spec.rb +41 -0
  102. data/spec/models/appmarketapi_section_error_spec.rb +47 -0
  103. data/spec/models/appmarketapi_update_application_metadata_spec.rb +77 -0
  104. data/spec/models/appmarketapi_update_application_request_spec.rb +89 -0
  105. data/spec/models/appmarketapi_update_application_response_spec.rb +95 -0
  106. data/spec/models/appmarketapi_user_spec.rb +47 -0
  107. data/spec/spec_helper.rb +111 -0
  108. metadata +364 -0
@@ -0,0 +1,32 @@
1
+ =begin
2
+ #appmarketapi.proto
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: version not set
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Appmarketapi
16
+ class AppmarketapiApplicationMode
17
+
18
+ NOMODE = 'NOMODE'.freeze
19
+ DISABLED = 'DISABLED'.freeze
20
+ ENABLED = 'ENABLED'.freeze
21
+ TEST = 'TEST'.freeze
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def build_from_hash(value)
27
+ constantValues = AppmarketapiApplicationMode.constants.select { |c| AppmarketapiApplicationMode::const_get(c) == value }
28
+ raise "Invalid ENUM value #{value} for class #AppmarketapiApplicationMode" if constantValues.empty?
29
+ value
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,183 @@
1
+ =begin
2
+ #appmarketapi.proto
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: version not set
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Appmarketapi
16
+ class AppmarketapiApplicationPromotion
17
+ attr_accessor :rank
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'rank' => :'rank'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'rank' => :'String'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'rank')
42
+ self.rank = attributes[:'rank']
43
+ end
44
+ end
45
+
46
+ # Show invalid properties with the reasons. Usually used together with valid?
47
+ # @return Array for valid properties with the reasons
48
+ def list_invalid_properties
49
+ invalid_properties = Array.new
50
+ invalid_properties
51
+ end
52
+
53
+ # Check to see if the all the properties in the model are valid
54
+ # @return true if the model is valid
55
+ def valid?
56
+ true
57
+ end
58
+
59
+ # Checks equality by comparing each attribute.
60
+ # @param [Object] Object to be compared
61
+ def ==(o)
62
+ return true if self.equal?(o)
63
+ self.class == o.class &&
64
+ rank == o.rank
65
+ end
66
+
67
+ # @see the `==` method
68
+ # @param [Object] Object to be compared
69
+ def eql?(o)
70
+ self == o
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Fixnum] Hash code
75
+ def hash
76
+ [rank].hash
77
+ end
78
+
79
+ # Builds the object from hash
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ # @return [Object] Returns the model itself
82
+ def build_from_hash(attributes)
83
+ return nil unless attributes.is_a?(Hash)
84
+ self.class.swagger_types.each_pair do |key, type|
85
+ if type =~ /\AArray<(.*)>/i
86
+ # check to ensure the input is an array given that the the attribute
87
+ # is documented as an array but the input is not
88
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
89
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
90
+ end
91
+ elsif !attributes[self.class.attribute_map[key]].nil?
92
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
93
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
94
+ end
95
+
96
+ self
97
+ end
98
+
99
+ # Deserializes the data based on type
100
+ # @param string type Data type
101
+ # @param string value Value to be deserialized
102
+ # @return [Object] Deserialized data
103
+ def _deserialize(type, value)
104
+ case type.to_sym
105
+ when :DateTime
106
+ DateTime.parse(value)
107
+ when :Date
108
+ Date.parse(value)
109
+ when :String
110
+ value.to_s
111
+ when :Integer
112
+ value.to_i
113
+ when :Float
114
+ value.to_f
115
+ when :BOOLEAN
116
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
117
+ true
118
+ else
119
+ false
120
+ end
121
+ when :Object
122
+ # generic object (usually a Hash), return directly
123
+ value
124
+ when /\AArray<(?<inner_type>.+)>\z/
125
+ inner_type = Regexp.last_match[:inner_type]
126
+ value.map { |v| _deserialize(inner_type, v) }
127
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
128
+ k_type = Regexp.last_match[:k_type]
129
+ v_type = Regexp.last_match[:v_type]
130
+ {}.tap do |hash|
131
+ value.each do |k, v|
132
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
133
+ end
134
+ end
135
+ else # model
136
+ temp_model = Appmarketapi.const_get(type).new
137
+ temp_model.build_from_hash(value)
138
+ end
139
+ end
140
+
141
+ # Returns the string representation of the object
142
+ # @return [String] String presentation of the object
143
+ def to_s
144
+ to_hash.to_s
145
+ end
146
+
147
+ # to_body is an alias to to_hash (backward compatibility)
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_body
150
+ to_hash
151
+ end
152
+
153
+ # Returns the object in the form of hash
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_hash
156
+ hash = {}
157
+ self.class.attribute_map.each_pair do |attr, param|
158
+ value = self.send(attr)
159
+ next if value.nil?
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ # Outputs non-array value in the form of hash
166
+ # For object, use to_hash. Otherwise, just return the value
167
+ # @param [Object] value Any valid value
168
+ # @return [Hash] Returns the value in the form of hash
169
+ def _to_hash(value)
170
+ if value.is_a?(Array)
171
+ value.compact.map { |v| _to_hash(v) }
172
+ elsif value.is_a?(Hash)
173
+ {}.tap do |hash|
174
+ value.each { |k, v| hash[k] = _to_hash(v) }
175
+ end
176
+ elsif value.respond_to? :to_hash
177
+ value.to_hash
178
+ else
179
+ value
180
+ end
181
+ end
182
+ end
183
+ end
@@ -0,0 +1,185 @@
1
+ =begin
2
+ #appmarketapi.proto
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: version not set
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Appmarketapi
16
+ class AppmarketapiApplicationSupportedPlatforms
17
+ attr_accessor :platforms
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'platforms' => :'platforms'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'platforms' => :'Array<AppmarketapiPlatform>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'platforms')
42
+ if (value = attributes[:'platforms']).is_a?(Array)
43
+ self.platforms = value
44
+ end
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ platforms == o.platforms
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [platforms].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = Appmarketapi.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,185 @@
1
+ =begin
2
+ #appmarketapi.proto
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: version not set
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Appmarketapi
16
+ class AppmarketapiApplicationTestUsers
17
+ attr_accessor :test_user_ids
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'test_user_ids' => :'test_user_ids'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'test_user_ids' => :'Array<String>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'test_user_ids')
42
+ if (value = attributes[:'test_user_ids']).is_a?(Array)
43
+ self.test_user_ids = value
44
+ end
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ test_user_ids == o.test_user_ids
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [test_user_ids].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = Appmarketapi.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+ end
185
+ end