sdksio-apimatic-sdk 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +82 -0
- data/lib/apimatic_api/api_helper.rb +10 -0
- data/lib/apimatic_api/client.rb +96 -0
- data/lib/apimatic_api/configuration.rb +125 -0
- data/lib/apimatic_api/controllers/api_validation_external_apis_controller.rb +84 -0
- data/lib/apimatic_api/controllers/api_validation_imported_apis_controller.rb +74 -0
- data/lib/apimatic_api/controllers/apis_management_controller.rb +260 -0
- data/lib/apimatic_api/controllers/base_controller.rb +66 -0
- data/lib/apimatic_api/controllers/code_generation_external_apis_controller.rb +178 -0
- data/lib/apimatic_api/controllers/code_generation_imported_apis_controller.rb +136 -0
- data/lib/apimatic_api/controllers/docs_portal_management_controller.rb +198 -0
- data/lib/apimatic_api/controllers/transformation_controller.rb +174 -0
- data/lib/apimatic_api/exceptions/api_exception.rb +10 -0
- data/lib/apimatic_api/http/auth/custom_header_authentication.rb +42 -0
- data/lib/apimatic_api/http/http_call_back.rb +10 -0
- data/lib/apimatic_api/http/http_method_enum.rb +10 -0
- data/lib/apimatic_api/http/http_request.rb +10 -0
- data/lib/apimatic_api/http/http_response.rb +10 -0
- data/lib/apimatic_api/models/api_entity.rb +220 -0
- data/lib/apimatic_api/models/api_entity_code_generation.rb +131 -0
- data/lib/apimatic_api/models/api_entity_identifier.rb +48 -0
- data/lib/apimatic_api/models/api_validation_summary.rb +75 -0
- data/lib/apimatic_api/models/attributes.rb +48 -0
- data/lib/apimatic_api/models/auth_scope.rb +75 -0
- data/lib/apimatic_api/models/authentication.rb +112 -0
- data/lib/apimatic_api/models/base_model.rb +62 -0
- data/lib/apimatic_api/models/code_gen_settings.rb +541 -0
- data/lib/apimatic_api/models/code_generation.rb +122 -0
- data/lib/apimatic_api/models/docs_validation_summary.rb +75 -0
- data/lib/apimatic_api/models/endpoints_group.rb +57 -0
- data/lib/apimatic_api/models/environment.rb +79 -0
- data/lib/apimatic_api/models/export_formats.rb +60 -0
- data/lib/apimatic_api/models/field.rb +156 -0
- data/lib/apimatic_api/models/generate_on_prem_portal_via_build_input_request_body.rb +48 -0
- data/lib/apimatic_api/models/generate_sdk_via_file_request_body.rb +61 -0
- data/lib/apimatic_api/models/generate_sdk_via_url_request.rb +59 -0
- data/lib/apimatic_api/models/import_api_version_via_url_request.rb +64 -0
- data/lib/apimatic_api/models/import_api_via_file_request_body.rb +51 -0
- data/lib/apimatic_api/models/import_api_via_url_request.rb +49 -0
- data/lib/apimatic_api/models/import_new_api_version_via_file_request_body.rb +66 -0
- data/lib/apimatic_api/models/import_validation_summary.rb +75 -0
- data/lib/apimatic_api/models/inplace_api_import_binary_file.rb +51 -0
- data/lib/apimatic_api/models/inplace_import_api_via_url_request.rb +49 -0
- data/lib/apimatic_api/models/meta_data.rb +70 -0
- data/lib/apimatic_api/models/parameter.rb +165 -0
- data/lib/apimatic_api/models/paramter_format_details.rb +48 -0
- data/lib/apimatic_api/models/platforms.rb +39 -0
- data/lib/apimatic_api/models/platforms_template.rb +49 -0
- data/lib/apimatic_api/models/server.rb +69 -0
- data/lib/apimatic_api/models/server_configuration.rb +105 -0
- data/lib/apimatic_api/models/test_gen_settings.rb +70 -0
- data/lib/apimatic_api/models/transform_via_file_request_body.rb +61 -0
- data/lib/apimatic_api/models/transform_via_url_request.rb +60 -0
- data/lib/apimatic_api/models/transformation.rb +152 -0
- data/lib/apimatic_api/models/user_code_generation.rb +140 -0
- data/lib/apimatic_api/models/user_code_generation_requirements.rb +57 -0
- data/lib/apimatic_api/models/validate_api_via_file_request_body.rb +51 -0
- data/lib/apimatic_api/utilities/date_time_helper.rb +11 -0
- data/lib/apimatic_api/utilities/file_wrapper.rb +16 -0
- data/lib/apimatic_api.rb +86 -0
- data/test/controllers/controller_test_base.rb +29 -0
- data/test/controllers/test_api_validation_external_apis_controller.rb +144 -0
- data/test/controllers/test_api_validation_imported_apis_controller.rb +2971 -0
- data/test/controllers/test_code_generation_external_apis_controller.rb +32 -0
- data/test/controllers/test_docs_portal_management_controller.rb +94 -0
- data/test/controllers/test_transformation_controller.rb +32 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +187 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# Base model.
|
|
8
|
+
class BaseModel < CoreLibrary::BaseModel
|
|
9
|
+
# Returns a Hash representation of the current object.
|
|
10
|
+
def to_hash
|
|
11
|
+
# validating the model being serialized
|
|
12
|
+
self.class.validate(self) if self.class.respond_to?(:validate)
|
|
13
|
+
|
|
14
|
+
hash = {}
|
|
15
|
+
instance_variables.each do |name|
|
|
16
|
+
value = instance_variable_get(name)
|
|
17
|
+
name = name[1..]
|
|
18
|
+
key = self.class.names.key?(name) ? self.class.names[name] : name
|
|
19
|
+
optional_fields = self.class.optionals
|
|
20
|
+
nullable_fields = self.class.nullables
|
|
21
|
+
if value.nil?
|
|
22
|
+
next unless nullable_fields.include?(name)
|
|
23
|
+
|
|
24
|
+
if !optional_fields.include?(name) && !nullable_fields.include?(name)
|
|
25
|
+
raise ArgumentError,
|
|
26
|
+
"`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
hash[key] = nil
|
|
31
|
+
unless value.nil?
|
|
32
|
+
if respond_to?("to_custom_#{name}")
|
|
33
|
+
if (value.instance_of? Array) || (value.instance_of? Hash)
|
|
34
|
+
params = [hash, key]
|
|
35
|
+
hash[key] = send("to_custom_#{name}", *params)
|
|
36
|
+
else
|
|
37
|
+
hash[key] = send("to_custom_#{name}")
|
|
38
|
+
end
|
|
39
|
+
elsif respond_to?("to_union_type_#{name}")
|
|
40
|
+
hash[key] = send("to_union_type_#{name}")
|
|
41
|
+
elsif value.instance_of? Array
|
|
42
|
+
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
|
43
|
+
elsif value.instance_of? Hash
|
|
44
|
+
hash[key] = {}
|
|
45
|
+
value.each do |k, v|
|
|
46
|
+
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
|
47
|
+
end
|
|
48
|
+
else
|
|
49
|
+
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
hash
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns a JSON representation of the curent object.
|
|
57
|
+
def to_json(options = {})
|
|
58
|
+
hash = to_hash
|
|
59
|
+
hash.to_json(options)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# APIMatic’s code generation engine has various code generation configurations
|
|
8
|
+
# to customise the behaviour and outlook across the generated SDKS. This
|
|
9
|
+
# structure encapsulates all settings for CodeGeneration.
|
|
10
|
+
class CodeGenSettings < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# Generate asynchronous code for API Calls and deserialization
|
|
15
|
+
# @return [TrueClass | FalseClass]
|
|
16
|
+
attr_accessor :is_async
|
|
17
|
+
|
|
18
|
+
# Use HTTP Method prefixes for endpoint wrappers
|
|
19
|
+
# @return [TrueClass | FalseClass]
|
|
20
|
+
attr_accessor :use_http_method_prefix
|
|
21
|
+
|
|
22
|
+
# Use "Model" postfixes for generated class names
|
|
23
|
+
# @return [TrueClass | FalseClass]
|
|
24
|
+
attr_accessor :use_model_prefix
|
|
25
|
+
|
|
26
|
+
# Use "Enum" postfixes for enumerated types
|
|
27
|
+
# @return [TrueClass | FalseClass]
|
|
28
|
+
attr_accessor :use_enum_prefix
|
|
29
|
+
|
|
30
|
+
# Use "Enum" postfixes for enumerated types
|
|
31
|
+
# @return [TrueClass | FalseClass]
|
|
32
|
+
attr_accessor :use_constructors_for_config
|
|
33
|
+
|
|
34
|
+
# Use common SDK library to reduce code duplication
|
|
35
|
+
# @return [TrueClass | FalseClass]
|
|
36
|
+
attr_accessor :use_common_sdk_library
|
|
37
|
+
|
|
38
|
+
# Generates interfaces for controller classes in the generated SDKs
|
|
39
|
+
# @return [TrueClass | FalseClass]
|
|
40
|
+
attr_accessor :generate_interfaces
|
|
41
|
+
|
|
42
|
+
# Generate Appveyor configuration file
|
|
43
|
+
# @return [TrueClass | FalseClass]
|
|
44
|
+
attr_accessor :generate_appveyor_config
|
|
45
|
+
|
|
46
|
+
# Generate CircleCI configuration file
|
|
47
|
+
# @return [TrueClass | FalseClass]
|
|
48
|
+
attr_accessor :generate_circle_config
|
|
49
|
+
|
|
50
|
+
# Generate Jenkins configuration file
|
|
51
|
+
# @return [TrueClass | FalseClass]
|
|
52
|
+
attr_accessor :generate_jenkins_config
|
|
53
|
+
|
|
54
|
+
# Generate Travis CI configuration file
|
|
55
|
+
# @return [TrueClass | FalseClass]
|
|
56
|
+
attr_accessor :generate_travis_config
|
|
57
|
+
|
|
58
|
+
# Use "AndroidManifest.xml" for config variables in Android
|
|
59
|
+
# @return [TrueClass | FalseClass]
|
|
60
|
+
attr_accessor :android_use_app_manifest
|
|
61
|
+
|
|
62
|
+
# Use "App-Info.plist" file for config variables in iOS
|
|
63
|
+
# @return [TrueClass | FalseClass]
|
|
64
|
+
attr_accessor :ios_use_app_info_plist
|
|
65
|
+
|
|
66
|
+
# Generate "CoreData" schema and entity classes in iOS?
|
|
67
|
+
# @return [TrueClass | FalseClass]
|
|
68
|
+
attr_accessor :ios_generate_core_data
|
|
69
|
+
|
|
70
|
+
# Enable runscope
|
|
71
|
+
# @return [TrueClass | FalseClass]
|
|
72
|
+
attr_accessor :runscope_enabled
|
|
73
|
+
|
|
74
|
+
# Collect Parameters as arrays
|
|
75
|
+
# @return [TrueClass | FalseClass]
|
|
76
|
+
attr_accessor :collapse_params_to_array
|
|
77
|
+
|
|
78
|
+
# Attempts to preserve parameter order for endpoints
|
|
79
|
+
# @return [TrueClass | FalseClass]
|
|
80
|
+
attr_accessor :preserve_parameter_order
|
|
81
|
+
|
|
82
|
+
# Append JSON/XML accept and content-type headers
|
|
83
|
+
# @return [TrueClass | FalseClass]
|
|
84
|
+
attr_accessor :append_content_headers
|
|
85
|
+
|
|
86
|
+
# Append JSON/XML accept and content-type headers
|
|
87
|
+
# @return [TrueClass | FalseClass]
|
|
88
|
+
attr_accessor :model_serialization_is_json
|
|
89
|
+
|
|
90
|
+
# Return a null value on HTTP 404
|
|
91
|
+
# @return [TrueClass | FalseClass]
|
|
92
|
+
attr_accessor :nullify404
|
|
93
|
+
|
|
94
|
+
# Validate required parameters to be Not Null
|
|
95
|
+
# @return [TrueClass | FalseClass]
|
|
96
|
+
attr_accessor :validate_required_parameters
|
|
97
|
+
|
|
98
|
+
# Allow models to have additional runtime properties
|
|
99
|
+
# @return [TrueClass | FalseClass]
|
|
100
|
+
attr_accessor :enable_additional_model_properties
|
|
101
|
+
|
|
102
|
+
# Allow models to have additional runtime properties
|
|
103
|
+
# @return [TrueClass | FalseClass]
|
|
104
|
+
attr_accessor :java_use_properties_config
|
|
105
|
+
|
|
106
|
+
# Use "Controller" postfixes for generated controller classes
|
|
107
|
+
# @return [TrueClass | FalseClass]
|
|
108
|
+
attr_accessor :use_controller_prefix
|
|
109
|
+
|
|
110
|
+
# Use Exception Prefixes
|
|
111
|
+
# @return [TrueClass | FalseClass]
|
|
112
|
+
attr_accessor :use_exception_prefix
|
|
113
|
+
|
|
114
|
+
# Parameter Array format with index or without
|
|
115
|
+
# @return [String]
|
|
116
|
+
attr_accessor :parameter_array_format
|
|
117
|
+
|
|
118
|
+
# Configure the HTTP client for Objective C
|
|
119
|
+
# @return [String]
|
|
120
|
+
attr_accessor :obj_c_http_client
|
|
121
|
+
|
|
122
|
+
# Configure the HTTP client for C#
|
|
123
|
+
# @return [String]
|
|
124
|
+
attr_accessor :c_sharp_http_client
|
|
125
|
+
|
|
126
|
+
# Configure the HTTP client for Android
|
|
127
|
+
# @return [String]
|
|
128
|
+
attr_accessor :android_http_client
|
|
129
|
+
|
|
130
|
+
# Configure the HTTP client for node
|
|
131
|
+
# @return [String]
|
|
132
|
+
attr_accessor :node_http_client
|
|
133
|
+
|
|
134
|
+
# Configure the HTTP client for PHP
|
|
135
|
+
# @return [String]
|
|
136
|
+
attr_accessor :php_http_client
|
|
137
|
+
|
|
138
|
+
# Configure the HTTP client for PHP
|
|
139
|
+
# @return [Integer]
|
|
140
|
+
attr_accessor :body_serialization
|
|
141
|
+
|
|
142
|
+
# Specify type of array serialisation
|
|
143
|
+
# @return [String]
|
|
144
|
+
attr_accessor :array_serialization
|
|
145
|
+
|
|
146
|
+
# This option specifies the duration (in seconds) after which requests would
|
|
147
|
+
# timeout
|
|
148
|
+
# @return [Integer]
|
|
149
|
+
attr_accessor :timeout
|
|
150
|
+
|
|
151
|
+
# Enabling this generates code in the SDKs for logging events in the API
|
|
152
|
+
# cycle using a library.
|
|
153
|
+
# @return [TrueClass | FalseClass]
|
|
154
|
+
attr_accessor :enable_logging
|
|
155
|
+
|
|
156
|
+
# Enabling caching of responses (not available in all languages)
|
|
157
|
+
# @return [TrueClass | FalseClass]
|
|
158
|
+
attr_accessor :enable_http_cache
|
|
159
|
+
|
|
160
|
+
# Specify number of retries
|
|
161
|
+
# @return [Integer]
|
|
162
|
+
attr_accessor :retries
|
|
163
|
+
|
|
164
|
+
# Specify retry interval in case of failures
|
|
165
|
+
# @return [Integer]
|
|
166
|
+
attr_accessor :retry_interval
|
|
167
|
+
|
|
168
|
+
# Generate advanced read me files
|
|
169
|
+
# @return [TrueClass | FalseClass]
|
|
170
|
+
attr_accessor :generate_advanced_docs
|
|
171
|
+
|
|
172
|
+
# Store Timezone information for the generation
|
|
173
|
+
# @return [TrueClass | FalseClass]
|
|
174
|
+
attr_accessor :store_timezone_information
|
|
175
|
+
|
|
176
|
+
# Use "Controller" postfixes for generated controller classes
|
|
177
|
+
# @return [TrueClass | FalseClass]
|
|
178
|
+
attr_accessor :enable_php_composer_version_string
|
|
179
|
+
|
|
180
|
+
# Specify Security Protocols
|
|
181
|
+
# @return [Array[String]]
|
|
182
|
+
attr_accessor :security_protocols
|
|
183
|
+
|
|
184
|
+
# Use underscores before and after numbers for underscore case
|
|
185
|
+
# @return [TrueClass | FalseClass]
|
|
186
|
+
attr_accessor :underscore_numbers
|
|
187
|
+
|
|
188
|
+
# Allow usage of a Singleton Pattern
|
|
189
|
+
# @return [TrueClass | FalseClass]
|
|
190
|
+
attr_accessor :use_singleton_pattern
|
|
191
|
+
|
|
192
|
+
# Files/dependencies used for linting are not generated if this option is
|
|
193
|
+
# enabled
|
|
194
|
+
# @return [TrueClass | FalseClass]
|
|
195
|
+
attr_accessor :disable_linting
|
|
196
|
+
|
|
197
|
+
# Create a configuration option in SDKs to optionally skip certificate
|
|
198
|
+
# verification when establishing HTTPS connections.
|
|
199
|
+
# @return [TrueClass | FalseClass]
|
|
200
|
+
attr_accessor :allow_skipping_ssl_cert_verification
|
|
201
|
+
|
|
202
|
+
# Apply Customisations
|
|
203
|
+
# @return [Array[String]]
|
|
204
|
+
attr_accessor :apply_customizations
|
|
205
|
+
|
|
206
|
+
# Enabling this will stop splitting of words when converting identifiers
|
|
207
|
+
# from API specification to language-specific identifiers.
|
|
208
|
+
# @return [Array[String]]
|
|
209
|
+
attr_accessor :do_not_split_words
|
|
210
|
+
|
|
211
|
+
# Sorts resources such as endpoints, endpoint groups and models in generated
|
|
212
|
+
# documentation
|
|
213
|
+
# @return [TrueClass | FalseClass]
|
|
214
|
+
attr_accessor :sort_resources
|
|
215
|
+
|
|
216
|
+
# Enable a global user agent
|
|
217
|
+
# @return [TrueClass | FalseClass]
|
|
218
|
+
attr_accessor :enable_global_user_agent
|
|
219
|
+
|
|
220
|
+
# A mapping from model property names to API property names.
|
|
221
|
+
def self.names
|
|
222
|
+
@_hash = {} if @_hash.nil?
|
|
223
|
+
@_hash['is_async'] = 'isAsync'
|
|
224
|
+
@_hash['use_http_method_prefix'] = 'useHttpMethodPrefix'
|
|
225
|
+
@_hash['use_model_prefix'] = 'useModelPrefix'
|
|
226
|
+
@_hash['use_enum_prefix'] = 'useEnumPrefix'
|
|
227
|
+
@_hash['use_constructors_for_config'] = 'useConstructorsForConfig'
|
|
228
|
+
@_hash['use_common_sdk_library'] = 'useCommonSdkLibrary'
|
|
229
|
+
@_hash['generate_interfaces'] = 'generateInterfaces'
|
|
230
|
+
@_hash['generate_appveyor_config'] = 'generateAppveyorConfig'
|
|
231
|
+
@_hash['generate_circle_config'] = 'generateCircleConfig'
|
|
232
|
+
@_hash['generate_jenkins_config'] = 'generateJenkinsConfig'
|
|
233
|
+
@_hash['generate_travis_config'] = 'generateTravisConfig'
|
|
234
|
+
@_hash['android_use_app_manifest'] = 'androidUseAppManifest'
|
|
235
|
+
@_hash['ios_use_app_info_plist'] = 'iosUseAppInfoPlist'
|
|
236
|
+
@_hash['ios_generate_core_data'] = 'iosGenerateCoreData'
|
|
237
|
+
@_hash['runscope_enabled'] = 'runscopeEnabled'
|
|
238
|
+
@_hash['collapse_params_to_array'] = 'collapseParamsToArray'
|
|
239
|
+
@_hash['preserve_parameter_order'] = 'preserveParameterOrder'
|
|
240
|
+
@_hash['append_content_headers'] = 'appendContentHeaders'
|
|
241
|
+
@_hash['model_serialization_is_json'] = 'modelSerializationIsJSON'
|
|
242
|
+
@_hash['nullify404'] = 'nullify404'
|
|
243
|
+
@_hash['validate_required_parameters'] = 'validateRequiredParameters'
|
|
244
|
+
@_hash['enable_additional_model_properties'] =
|
|
245
|
+
'enableAdditionalModelProperties'
|
|
246
|
+
@_hash['java_use_properties_config'] = 'javaUsePropertiesConfig'
|
|
247
|
+
@_hash['use_controller_prefix'] = 'useControllerPrefix'
|
|
248
|
+
@_hash['use_exception_prefix'] = 'useExceptionPrefix'
|
|
249
|
+
@_hash['parameter_array_format'] = 'parameterArrayFormat'
|
|
250
|
+
@_hash['obj_c_http_client'] = 'objCHttpClient'
|
|
251
|
+
@_hash['c_sharp_http_client'] = 'cSharpHttpClient'
|
|
252
|
+
@_hash['android_http_client'] = 'androidHttpClient'
|
|
253
|
+
@_hash['node_http_client'] = 'nodeHttpClient'
|
|
254
|
+
@_hash['php_http_client'] = 'phpHttpClient'
|
|
255
|
+
@_hash['body_serialization'] = 'bodySerialization'
|
|
256
|
+
@_hash['array_serialization'] = 'arraySerialization'
|
|
257
|
+
@_hash['timeout'] = 'timeout'
|
|
258
|
+
@_hash['enable_logging'] = 'enableLogging'
|
|
259
|
+
@_hash['enable_http_cache'] = 'enableHttpCache'
|
|
260
|
+
@_hash['retries'] = 'retries'
|
|
261
|
+
@_hash['retry_interval'] = 'retryInterval'
|
|
262
|
+
@_hash['generate_advanced_docs'] = 'generateAdvancedDocs'
|
|
263
|
+
@_hash['store_timezone_information'] = 'storeTimezoneInformation'
|
|
264
|
+
@_hash['enable_php_composer_version_string'] =
|
|
265
|
+
'enablePhpComposerVersionString'
|
|
266
|
+
@_hash['security_protocols'] = 'securityProtocols'
|
|
267
|
+
@_hash['underscore_numbers'] = 'underscoreNumbers'
|
|
268
|
+
@_hash['use_singleton_pattern'] = 'useSingletonPattern'
|
|
269
|
+
@_hash['disable_linting'] = 'disableLinting'
|
|
270
|
+
@_hash['allow_skipping_ssl_cert_verification'] =
|
|
271
|
+
'allowSkippingSSLCertVerification'
|
|
272
|
+
@_hash['apply_customizations'] = 'applyCustomizations'
|
|
273
|
+
@_hash['do_not_split_words'] = 'doNotSplitWords'
|
|
274
|
+
@_hash['sort_resources'] = 'sortResources'
|
|
275
|
+
@_hash['enable_global_user_agent'] = 'enableGlobalUserAgent'
|
|
276
|
+
@_hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# An array for optional fields
|
|
280
|
+
def self.optionals
|
|
281
|
+
[]
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# An array for nullable fields
|
|
285
|
+
def self.nullables
|
|
286
|
+
[]
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
def initialize(is_async = nil,
|
|
290
|
+
use_http_method_prefix = nil,
|
|
291
|
+
use_model_prefix = nil,
|
|
292
|
+
use_enum_prefix = nil,
|
|
293
|
+
use_constructors_for_config = nil,
|
|
294
|
+
use_common_sdk_library = nil,
|
|
295
|
+
generate_interfaces = nil,
|
|
296
|
+
generate_appveyor_config = nil,
|
|
297
|
+
generate_circle_config = nil,
|
|
298
|
+
generate_jenkins_config = nil,
|
|
299
|
+
generate_travis_config = nil,
|
|
300
|
+
android_use_app_manifest = nil,
|
|
301
|
+
ios_use_app_info_plist = nil,
|
|
302
|
+
ios_generate_core_data = nil,
|
|
303
|
+
runscope_enabled = nil,
|
|
304
|
+
collapse_params_to_array = nil,
|
|
305
|
+
preserve_parameter_order = nil,
|
|
306
|
+
append_content_headers = nil,
|
|
307
|
+
model_serialization_is_json = nil,
|
|
308
|
+
nullify404 = nil,
|
|
309
|
+
validate_required_parameters = nil,
|
|
310
|
+
enable_additional_model_properties = nil,
|
|
311
|
+
java_use_properties_config = nil,
|
|
312
|
+
use_controller_prefix = nil,
|
|
313
|
+
use_exception_prefix = nil,
|
|
314
|
+
parameter_array_format = nil,
|
|
315
|
+
obj_c_http_client = nil,
|
|
316
|
+
c_sharp_http_client = nil,
|
|
317
|
+
android_http_client = nil,
|
|
318
|
+
node_http_client = nil,
|
|
319
|
+
php_http_client = nil,
|
|
320
|
+
body_serialization = nil,
|
|
321
|
+
array_serialization = nil,
|
|
322
|
+
timeout = nil,
|
|
323
|
+
enable_logging = nil,
|
|
324
|
+
enable_http_cache = nil,
|
|
325
|
+
retries = nil,
|
|
326
|
+
retry_interval = nil,
|
|
327
|
+
generate_advanced_docs = nil,
|
|
328
|
+
store_timezone_information = nil,
|
|
329
|
+
enable_php_composer_version_string = nil,
|
|
330
|
+
security_protocols = nil,
|
|
331
|
+
underscore_numbers = nil,
|
|
332
|
+
use_singleton_pattern = nil,
|
|
333
|
+
disable_linting = nil,
|
|
334
|
+
allow_skipping_ssl_cert_verification = nil,
|
|
335
|
+
apply_customizations = nil,
|
|
336
|
+
do_not_split_words = nil,
|
|
337
|
+
sort_resources = nil,
|
|
338
|
+
enable_global_user_agent = nil)
|
|
339
|
+
@is_async = is_async
|
|
340
|
+
@use_http_method_prefix = use_http_method_prefix
|
|
341
|
+
@use_model_prefix = use_model_prefix
|
|
342
|
+
@use_enum_prefix = use_enum_prefix
|
|
343
|
+
@use_constructors_for_config = use_constructors_for_config
|
|
344
|
+
@use_common_sdk_library = use_common_sdk_library
|
|
345
|
+
@generate_interfaces = generate_interfaces
|
|
346
|
+
@generate_appveyor_config = generate_appveyor_config
|
|
347
|
+
@generate_circle_config = generate_circle_config
|
|
348
|
+
@generate_jenkins_config = generate_jenkins_config
|
|
349
|
+
@generate_travis_config = generate_travis_config
|
|
350
|
+
@android_use_app_manifest = android_use_app_manifest
|
|
351
|
+
@ios_use_app_info_plist = ios_use_app_info_plist
|
|
352
|
+
@ios_generate_core_data = ios_generate_core_data
|
|
353
|
+
@runscope_enabled = runscope_enabled
|
|
354
|
+
@collapse_params_to_array = collapse_params_to_array
|
|
355
|
+
@preserve_parameter_order = preserve_parameter_order
|
|
356
|
+
@append_content_headers = append_content_headers
|
|
357
|
+
@model_serialization_is_json = model_serialization_is_json
|
|
358
|
+
@nullify404 = nullify404
|
|
359
|
+
@validate_required_parameters = validate_required_parameters
|
|
360
|
+
@enable_additional_model_properties = enable_additional_model_properties
|
|
361
|
+
@java_use_properties_config = java_use_properties_config
|
|
362
|
+
@use_controller_prefix = use_controller_prefix
|
|
363
|
+
@use_exception_prefix = use_exception_prefix
|
|
364
|
+
@parameter_array_format = parameter_array_format
|
|
365
|
+
@obj_c_http_client = obj_c_http_client
|
|
366
|
+
@c_sharp_http_client = c_sharp_http_client
|
|
367
|
+
@android_http_client = android_http_client
|
|
368
|
+
@node_http_client = node_http_client
|
|
369
|
+
@php_http_client = php_http_client
|
|
370
|
+
@body_serialization = body_serialization
|
|
371
|
+
@array_serialization = array_serialization
|
|
372
|
+
@timeout = timeout
|
|
373
|
+
@enable_logging = enable_logging
|
|
374
|
+
@enable_http_cache = enable_http_cache
|
|
375
|
+
@retries = retries
|
|
376
|
+
@retry_interval = retry_interval
|
|
377
|
+
@generate_advanced_docs = generate_advanced_docs
|
|
378
|
+
@store_timezone_information = store_timezone_information
|
|
379
|
+
@enable_php_composer_version_string = enable_php_composer_version_string
|
|
380
|
+
@security_protocols = security_protocols
|
|
381
|
+
@underscore_numbers = underscore_numbers
|
|
382
|
+
@use_singleton_pattern = use_singleton_pattern
|
|
383
|
+
@disable_linting = disable_linting
|
|
384
|
+
@allow_skipping_ssl_cert_verification = allow_skipping_ssl_cert_verification
|
|
385
|
+
@apply_customizations = apply_customizations
|
|
386
|
+
@do_not_split_words = do_not_split_words
|
|
387
|
+
@sort_resources = sort_resources
|
|
388
|
+
@enable_global_user_agent = enable_global_user_agent
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Creates an instance of the object from a hash.
|
|
392
|
+
def self.from_hash(hash)
|
|
393
|
+
return nil unless hash
|
|
394
|
+
|
|
395
|
+
# Extract variables from the hash.
|
|
396
|
+
is_async = hash.key?('isAsync') ? hash['isAsync'] : nil
|
|
397
|
+
use_http_method_prefix =
|
|
398
|
+
hash.key?('useHttpMethodPrefix') ? hash['useHttpMethodPrefix'] : nil
|
|
399
|
+
use_model_prefix =
|
|
400
|
+
hash.key?('useModelPrefix') ? hash['useModelPrefix'] : nil
|
|
401
|
+
use_enum_prefix = hash.key?('useEnumPrefix') ? hash['useEnumPrefix'] : nil
|
|
402
|
+
use_constructors_for_config =
|
|
403
|
+
hash.key?('useConstructorsForConfig') ? hash['useConstructorsForConfig'] : nil
|
|
404
|
+
use_common_sdk_library =
|
|
405
|
+
hash.key?('useCommonSdkLibrary') ? hash['useCommonSdkLibrary'] : nil
|
|
406
|
+
generate_interfaces =
|
|
407
|
+
hash.key?('generateInterfaces') ? hash['generateInterfaces'] : nil
|
|
408
|
+
generate_appveyor_config =
|
|
409
|
+
hash.key?('generateAppveyorConfig') ? hash['generateAppveyorConfig'] : nil
|
|
410
|
+
generate_circle_config =
|
|
411
|
+
hash.key?('generateCircleConfig') ? hash['generateCircleConfig'] : nil
|
|
412
|
+
generate_jenkins_config =
|
|
413
|
+
hash.key?('generateJenkinsConfig') ? hash['generateJenkinsConfig'] : nil
|
|
414
|
+
generate_travis_config =
|
|
415
|
+
hash.key?('generateTravisConfig') ? hash['generateTravisConfig'] : nil
|
|
416
|
+
android_use_app_manifest =
|
|
417
|
+
hash.key?('androidUseAppManifest') ? hash['androidUseAppManifest'] : nil
|
|
418
|
+
ios_use_app_info_plist =
|
|
419
|
+
hash.key?('iosUseAppInfoPlist') ? hash['iosUseAppInfoPlist'] : nil
|
|
420
|
+
ios_generate_core_data =
|
|
421
|
+
hash.key?('iosGenerateCoreData') ? hash['iosGenerateCoreData'] : nil
|
|
422
|
+
runscope_enabled =
|
|
423
|
+
hash.key?('runscopeEnabled') ? hash['runscopeEnabled'] : nil
|
|
424
|
+
collapse_params_to_array =
|
|
425
|
+
hash.key?('collapseParamsToArray') ? hash['collapseParamsToArray'] : nil
|
|
426
|
+
preserve_parameter_order =
|
|
427
|
+
hash.key?('preserveParameterOrder') ? hash['preserveParameterOrder'] : nil
|
|
428
|
+
append_content_headers =
|
|
429
|
+
hash.key?('appendContentHeaders') ? hash['appendContentHeaders'] : nil
|
|
430
|
+
model_serialization_is_json =
|
|
431
|
+
hash.key?('modelSerializationIsJSON') ? hash['modelSerializationIsJSON'] : nil
|
|
432
|
+
nullify404 = hash.key?('nullify404') ? hash['nullify404'] : nil
|
|
433
|
+
validate_required_parameters =
|
|
434
|
+
hash.key?('validateRequiredParameters') ? hash['validateRequiredParameters'] : nil
|
|
435
|
+
enable_additional_model_properties =
|
|
436
|
+
hash.key?('enableAdditionalModelProperties') ? hash['enableAdditionalModelProperties'] : nil
|
|
437
|
+
java_use_properties_config =
|
|
438
|
+
hash.key?('javaUsePropertiesConfig') ? hash['javaUsePropertiesConfig'] : nil
|
|
439
|
+
use_controller_prefix =
|
|
440
|
+
hash.key?('useControllerPrefix') ? hash['useControllerPrefix'] : nil
|
|
441
|
+
use_exception_prefix =
|
|
442
|
+
hash.key?('useExceptionPrefix') ? hash['useExceptionPrefix'] : nil
|
|
443
|
+
parameter_array_format =
|
|
444
|
+
hash.key?('parameterArrayFormat') ? hash['parameterArrayFormat'] : nil
|
|
445
|
+
obj_c_http_client =
|
|
446
|
+
hash.key?('objCHttpClient') ? hash['objCHttpClient'] : nil
|
|
447
|
+
c_sharp_http_client =
|
|
448
|
+
hash.key?('cSharpHttpClient') ? hash['cSharpHttpClient'] : nil
|
|
449
|
+
android_http_client =
|
|
450
|
+
hash.key?('androidHttpClient') ? hash['androidHttpClient'] : nil
|
|
451
|
+
node_http_client =
|
|
452
|
+
hash.key?('nodeHttpClient') ? hash['nodeHttpClient'] : nil
|
|
453
|
+
php_http_client = hash.key?('phpHttpClient') ? hash['phpHttpClient'] : nil
|
|
454
|
+
body_serialization =
|
|
455
|
+
hash.key?('bodySerialization') ? hash['bodySerialization'] : nil
|
|
456
|
+
array_serialization =
|
|
457
|
+
hash.key?('arraySerialization') ? hash['arraySerialization'] : nil
|
|
458
|
+
timeout = hash.key?('timeout') ? hash['timeout'] : nil
|
|
459
|
+
enable_logging = hash.key?('enableLogging') ? hash['enableLogging'] : nil
|
|
460
|
+
enable_http_cache =
|
|
461
|
+
hash.key?('enableHttpCache') ? hash['enableHttpCache'] : nil
|
|
462
|
+
retries = hash.key?('retries') ? hash['retries'] : nil
|
|
463
|
+
retry_interval = hash.key?('retryInterval') ? hash['retryInterval'] : nil
|
|
464
|
+
generate_advanced_docs =
|
|
465
|
+
hash.key?('generateAdvancedDocs') ? hash['generateAdvancedDocs'] : nil
|
|
466
|
+
store_timezone_information =
|
|
467
|
+
hash.key?('storeTimezoneInformation') ? hash['storeTimezoneInformation'] : nil
|
|
468
|
+
enable_php_composer_version_string =
|
|
469
|
+
hash.key?('enablePhpComposerVersionString') ? hash['enablePhpComposerVersionString'] : nil
|
|
470
|
+
security_protocols =
|
|
471
|
+
hash.key?('securityProtocols') ? hash['securityProtocols'] : nil
|
|
472
|
+
underscore_numbers =
|
|
473
|
+
hash.key?('underscoreNumbers') ? hash['underscoreNumbers'] : nil
|
|
474
|
+
use_singleton_pattern =
|
|
475
|
+
hash.key?('useSingletonPattern') ? hash['useSingletonPattern'] : nil
|
|
476
|
+
disable_linting =
|
|
477
|
+
hash.key?('disableLinting') ? hash['disableLinting'] : nil
|
|
478
|
+
allow_skipping_ssl_cert_verification =
|
|
479
|
+
hash.key?('allowSkippingSSLCertVerification') ? hash['allowSkippingSSLCertVerification'] : nil
|
|
480
|
+
apply_customizations =
|
|
481
|
+
hash.key?('applyCustomizations') ? hash['applyCustomizations'] : nil
|
|
482
|
+
do_not_split_words =
|
|
483
|
+
hash.key?('doNotSplitWords') ? hash['doNotSplitWords'] : nil
|
|
484
|
+
sort_resources = hash.key?('sortResources') ? hash['sortResources'] : nil
|
|
485
|
+
enable_global_user_agent =
|
|
486
|
+
hash.key?('enableGlobalUserAgent') ? hash['enableGlobalUserAgent'] : nil
|
|
487
|
+
|
|
488
|
+
# Create object from extracted values.
|
|
489
|
+
CodeGenSettings.new(is_async,
|
|
490
|
+
use_http_method_prefix,
|
|
491
|
+
use_model_prefix,
|
|
492
|
+
use_enum_prefix,
|
|
493
|
+
use_constructors_for_config,
|
|
494
|
+
use_common_sdk_library,
|
|
495
|
+
generate_interfaces,
|
|
496
|
+
generate_appveyor_config,
|
|
497
|
+
generate_circle_config,
|
|
498
|
+
generate_jenkins_config,
|
|
499
|
+
generate_travis_config,
|
|
500
|
+
android_use_app_manifest,
|
|
501
|
+
ios_use_app_info_plist,
|
|
502
|
+
ios_generate_core_data,
|
|
503
|
+
runscope_enabled,
|
|
504
|
+
collapse_params_to_array,
|
|
505
|
+
preserve_parameter_order,
|
|
506
|
+
append_content_headers,
|
|
507
|
+
model_serialization_is_json,
|
|
508
|
+
nullify404,
|
|
509
|
+
validate_required_parameters,
|
|
510
|
+
enable_additional_model_properties,
|
|
511
|
+
java_use_properties_config,
|
|
512
|
+
use_controller_prefix,
|
|
513
|
+
use_exception_prefix,
|
|
514
|
+
parameter_array_format,
|
|
515
|
+
obj_c_http_client,
|
|
516
|
+
c_sharp_http_client,
|
|
517
|
+
android_http_client,
|
|
518
|
+
node_http_client,
|
|
519
|
+
php_http_client,
|
|
520
|
+
body_serialization,
|
|
521
|
+
array_serialization,
|
|
522
|
+
timeout,
|
|
523
|
+
enable_logging,
|
|
524
|
+
enable_http_cache,
|
|
525
|
+
retries,
|
|
526
|
+
retry_interval,
|
|
527
|
+
generate_advanced_docs,
|
|
528
|
+
store_timezone_information,
|
|
529
|
+
enable_php_composer_version_string,
|
|
530
|
+
security_protocols,
|
|
531
|
+
underscore_numbers,
|
|
532
|
+
use_singleton_pattern,
|
|
533
|
+
disable_linting,
|
|
534
|
+
allow_skipping_ssl_cert_verification,
|
|
535
|
+
apply_customizations,
|
|
536
|
+
do_not_split_words,
|
|
537
|
+
sort_resources,
|
|
538
|
+
enable_global_user_agent)
|
|
539
|
+
end
|
|
540
|
+
end
|
|
541
|
+
end
|