sdksio-apimatic-sdk 3.0.0 → 3.0.1
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 +4 -4
- data/LICENSE +1 -1
- data/README.md +165 -77
- data/bin/console +15 -0
- data/lib/apimatic_api/api_helper.rb +10 -10
- data/lib/apimatic_api/client.rb +108 -96
- data/lib/apimatic_api/configuration.rb +198 -125
- data/lib/apimatic_api/controllers/api_validation_external_apis_controller.rb +90 -84
- data/lib/apimatic_api/controllers/api_validation_v2_external_apis_controller.rb +89 -0
- data/lib/apimatic_api/controllers/base_controller.rb +55 -66
- data/lib/apimatic_api/controllers/code_generation_external_apis_controller.rb +201 -178
- data/lib/apimatic_api/controllers/docs_portal_generation_async_controller.rb +110 -0
- data/lib/apimatic_api/controllers/docs_portal_management_controller.rb +56 -198
- data/lib/apimatic_api/controllers/sdk_generation_async_controller.rb +112 -0
- data/lib/apimatic_api/controllers/transformation_controller.rb +180 -174
- data/lib/apimatic_api/exceptions/api_exception.rb +21 -10
- data/lib/apimatic_api/exceptions/bad_request_response_sdk_exception.rb +46 -0
- data/lib/apimatic_api/exceptions/internal_server_error_response_exception.rb +46 -0
- data/lib/apimatic_api/exceptions/problem_details_exception.rb +74 -0
- data/lib/apimatic_api/exceptions/unauthorized_response_exception.rb +46 -0
- data/lib/apimatic_api/http/api_response.rb +19 -0
- data/lib/apimatic_api/http/auth/custom_header_authentication.rb +48 -38
- data/lib/apimatic_api/http/http_call_back.rb +10 -10
- data/lib/apimatic_api/http/http_method_enum.rb +10 -10
- data/lib/apimatic_api/http/http_request.rb +10 -10
- data/lib/apimatic_api/http/http_response.rb +10 -10
- data/lib/apimatic_api/http/proxy_settings.rb +22 -0
- data/lib/apimatic_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/apimatic_api/logging/sdk_logger.rb +17 -0
- data/lib/apimatic_api/models/accept.rb +26 -0
- data/lib/apimatic_api/models/api_validation_summary.rb +100 -75
- data/lib/apimatic_api/models/base_model.rb +110 -62
- data/lib/apimatic_api/models/content_type.rb +26 -0
- data/lib/apimatic_api/models/export_formats.rb +85 -60
- data/lib/apimatic_api/models/generate_sdk_via_url_request.rb +85 -59
- data/lib/apimatic_api/models/line_info.rb +105 -0
- data/lib/apimatic_api/models/links.rb +82 -0
- data/lib/apimatic_api/models/platforms.rb +57 -39
- data/lib/apimatic_api/models/portal_generation_async_response.rb +68 -0
- data/lib/apimatic_api/models/portal_generation_status_response.rb +70 -0
- data/lib/apimatic_api/models/sdk_generation_async_response.rb +68 -0
- data/lib/apimatic_api/models/sdk_generation_status_response.rb +70 -0
- data/lib/apimatic_api/models/sdk_languages.rb +56 -0
- data/lib/apimatic_api/models/status.rb +48 -0
- data/lib/apimatic_api/models/transform_via_url_request.rb +85 -60
- data/lib/apimatic_api/models/transformation.rb +180 -152
- data/lib/apimatic_api/models/user_code_generation.rb +167 -140
- data/lib/apimatic_api/models/validate_api_result.rb +82 -0
- data/lib/apimatic_api/models/validation_entry.rb +143 -0
- data/lib/apimatic_api/models/validation_summary.rb +145 -0
- data/lib/apimatic_api/utilities/date_time_helper.rb +11 -11
- data/lib/apimatic_api/utilities/file_wrapper.rb +28 -16
- data/lib/apimatic_api.rb +79 -86
- metadata +39 -89
- data/lib/apimatic_api/controllers/api_validation_imported_apis_controller.rb +0 -74
- data/lib/apimatic_api/controllers/apis_management_controller.rb +0 -260
- data/lib/apimatic_api/controllers/code_generation_imported_apis_controller.rb +0 -136
- data/lib/apimatic_api/models/api_entity.rb +0 -220
- data/lib/apimatic_api/models/api_entity_code_generation.rb +0 -131
- data/lib/apimatic_api/models/api_entity_identifier.rb +0 -48
- data/lib/apimatic_api/models/attributes.rb +0 -48
- data/lib/apimatic_api/models/auth_scope.rb +0 -75
- data/lib/apimatic_api/models/authentication.rb +0 -112
- data/lib/apimatic_api/models/code_gen_settings.rb +0 -541
- data/lib/apimatic_api/models/code_generation.rb +0 -122
- data/lib/apimatic_api/models/docs_validation_summary.rb +0 -75
- data/lib/apimatic_api/models/endpoints_group.rb +0 -57
- data/lib/apimatic_api/models/environment.rb +0 -79
- data/lib/apimatic_api/models/field.rb +0 -156
- data/lib/apimatic_api/models/generate_on_prem_portal_via_build_input_request_body.rb +0 -48
- data/lib/apimatic_api/models/generate_sdk_via_file_request_body.rb +0 -61
- data/lib/apimatic_api/models/import_api_version_via_url_request.rb +0 -64
- data/lib/apimatic_api/models/import_api_via_file_request_body.rb +0 -51
- data/lib/apimatic_api/models/import_api_via_url_request.rb +0 -49
- data/lib/apimatic_api/models/import_new_api_version_via_file_request_body.rb +0 -66
- data/lib/apimatic_api/models/import_validation_summary.rb +0 -75
- data/lib/apimatic_api/models/inplace_api_import_binary_file.rb +0 -51
- data/lib/apimatic_api/models/inplace_import_api_via_url_request.rb +0 -49
- data/lib/apimatic_api/models/meta_data.rb +0 -70
- data/lib/apimatic_api/models/parameter.rb +0 -165
- data/lib/apimatic_api/models/paramter_format_details.rb +0 -48
- data/lib/apimatic_api/models/platforms_template.rb +0 -49
- data/lib/apimatic_api/models/server.rb +0 -69
- data/lib/apimatic_api/models/server_configuration.rb +0 -105
- data/lib/apimatic_api/models/test_gen_settings.rb +0 -70
- data/lib/apimatic_api/models/transform_via_file_request_body.rb +0 -61
- data/lib/apimatic_api/models/user_code_generation_requirements.rb +0 -57
- data/lib/apimatic_api/models/validate_api_via_file_request_body.rb +0 -51
- data/test/controllers/controller_test_base.rb +0 -29
- data/test/controllers/test_api_validation_external_apis_controller.rb +0 -144
- data/test/controllers/test_api_validation_imported_apis_controller.rb +0 -2971
- data/test/controllers/test_code_generation_external_apis_controller.rb +0 -32
- data/test/controllers/test_docs_portal_management_controller.rb +0 -94
- data/test/controllers/test_transformation_controller.rb +0 -32
- data/test/http_response_catcher.rb +0 -19
|
@@ -1,152 +1,180 @@
|
|
|
1
|
-
# apimatic_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by APIMATIC
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
module ApimaticApi
|
|
7
|
-
# Transformation structure encapsulates all the details of a Transformation.
|
|
8
|
-
class Transformation < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# Unique Transformation Identifier
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_accessor :id
|
|
15
|
-
|
|
16
|
-
# Transformation Date and Time
|
|
17
|
-
# @return [String]
|
|
18
|
-
attr_accessor :transformed_on
|
|
19
|
-
|
|
20
|
-
# Unique User Identifier
|
|
21
|
-
# @return [String]
|
|
22
|
-
attr_accessor :user_id
|
|
23
|
-
|
|
24
|
-
# API Specification file to be transformed
|
|
25
|
-
# @return [String]
|
|
26
|
-
attr_accessor :inputted_file
|
|
27
|
-
|
|
28
|
-
# API Specification file transformed to desired format
|
|
29
|
-
# @return [String]
|
|
30
|
-
attr_accessor :generated_file
|
|
31
|
-
|
|
32
|
-
# Desired Specification format
|
|
33
|
-
# @return [String]
|
|
34
|
-
attr_accessor :export_format
|
|
35
|
-
|
|
36
|
-
# Source of Transformation
|
|
37
|
-
# @return [String]
|
|
38
|
-
attr_accessor :transformation_source
|
|
39
|
-
|
|
40
|
-
# Via File or URL
|
|
41
|
-
# @return [String]
|
|
42
|
-
attr_accessor :transformation_input
|
|
43
|
-
|
|
44
|
-
# CodeGen Engine Version
|
|
45
|
-
# @return [String]
|
|
46
|
-
attr_accessor :code_gen_version
|
|
47
|
-
|
|
48
|
-
# Successful Transformation Flag
|
|
49
|
-
# @return [TrueClass | FalseClass]
|
|
50
|
-
attr_accessor :success
|
|
51
|
-
|
|
52
|
-
# Successful Transformation Flag
|
|
53
|
-
# @return [ApiValidationSummary]
|
|
54
|
-
attr_accessor :import_summary
|
|
55
|
-
|
|
56
|
-
# Successful Transformation Flag
|
|
57
|
-
# @return [ApiValidationSummary]
|
|
58
|
-
attr_accessor :api_validation_summary
|
|
59
|
-
|
|
60
|
-
# A mapping from model property names to API property names.
|
|
61
|
-
def self.names
|
|
62
|
-
@_hash = {} if @_hash.nil?
|
|
63
|
-
@_hash['id'] = 'id'
|
|
64
|
-
@_hash['transformed_on'] = 'transformedOn'
|
|
65
|
-
@_hash['user_id'] = 'userId'
|
|
66
|
-
@_hash['inputted_file'] = 'inputtedFile'
|
|
67
|
-
@_hash['generated_file'] = 'generatedFile'
|
|
68
|
-
@_hash['export_format'] = 'exportFormat'
|
|
69
|
-
@_hash['transformation_source'] = 'transformationSource'
|
|
70
|
-
@_hash['transformation_input'] = 'transformationInput'
|
|
71
|
-
@_hash['code_gen_version'] = 'codeGenVersion'
|
|
72
|
-
@_hash['success'] = 'success'
|
|
73
|
-
@_hash['import_summary'] = 'importSummary'
|
|
74
|
-
@_hash['api_validation_summary'] = 'apiValidationSummary'
|
|
75
|
-
@_hash
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# An array for optional fields
|
|
79
|
-
def self.optionals
|
|
80
|
-
[]
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# An array for nullable fields
|
|
84
|
-
def self.nullables
|
|
85
|
-
[]
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
def initialize(id
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
@
|
|
101
|
-
@
|
|
102
|
-
@
|
|
103
|
-
@
|
|
104
|
-
@
|
|
105
|
-
@
|
|
106
|
-
@
|
|
107
|
-
@
|
|
108
|
-
@
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
hash
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# Transformation structure encapsulates all the details of a Transformation.
|
|
8
|
+
class Transformation < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique Transformation Identifier
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# Transformation Date and Time
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :transformed_on
|
|
19
|
+
|
|
20
|
+
# Unique User Identifier
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :user_id
|
|
23
|
+
|
|
24
|
+
# API Specification file to be transformed
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :inputted_file
|
|
27
|
+
|
|
28
|
+
# API Specification file transformed to desired format
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :generated_file
|
|
31
|
+
|
|
32
|
+
# Desired Specification format
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :export_format
|
|
35
|
+
|
|
36
|
+
# Source of Transformation
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :transformation_source
|
|
39
|
+
|
|
40
|
+
# Via File or URL
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :transformation_input
|
|
43
|
+
|
|
44
|
+
# CodeGen Engine Version
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :code_gen_version
|
|
47
|
+
|
|
48
|
+
# Successful Transformation Flag
|
|
49
|
+
# @return [TrueClass | FalseClass]
|
|
50
|
+
attr_accessor :success
|
|
51
|
+
|
|
52
|
+
# Successful Transformation Flag
|
|
53
|
+
# @return [ApiValidationSummary]
|
|
54
|
+
attr_accessor :import_summary
|
|
55
|
+
|
|
56
|
+
# Successful Transformation Flag
|
|
57
|
+
# @return [ApiValidationSummary]
|
|
58
|
+
attr_accessor :api_validation_summary
|
|
59
|
+
|
|
60
|
+
# A mapping from model property names to API property names.
|
|
61
|
+
def self.names
|
|
62
|
+
@_hash = {} if @_hash.nil?
|
|
63
|
+
@_hash['id'] = 'id'
|
|
64
|
+
@_hash['transformed_on'] = 'transformedOn'
|
|
65
|
+
@_hash['user_id'] = 'userId'
|
|
66
|
+
@_hash['inputted_file'] = 'inputtedFile'
|
|
67
|
+
@_hash['generated_file'] = 'generatedFile'
|
|
68
|
+
@_hash['export_format'] = 'exportFormat'
|
|
69
|
+
@_hash['transformation_source'] = 'transformationSource'
|
|
70
|
+
@_hash['transformation_input'] = 'transformationInput'
|
|
71
|
+
@_hash['code_gen_version'] = 'codeGenVersion'
|
|
72
|
+
@_hash['success'] = 'success'
|
|
73
|
+
@_hash['import_summary'] = 'importSummary'
|
|
74
|
+
@_hash['api_validation_summary'] = 'apiValidationSummary'
|
|
75
|
+
@_hash
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# An array for optional fields
|
|
79
|
+
def self.optionals
|
|
80
|
+
[]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# An array for nullable fields
|
|
84
|
+
def self.nullables
|
|
85
|
+
[]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def initialize(id:, transformed_on:, user_id:, inputted_file:,
|
|
89
|
+
generated_file:, export_format:, transformation_source:,
|
|
90
|
+
transformation_input:, code_gen_version:, success:,
|
|
91
|
+
import_summary:, api_validation_summary:,
|
|
92
|
+
additional_properties: nil)
|
|
93
|
+
# Add additional model properties to the instance
|
|
94
|
+
additional_properties = {} if additional_properties.nil?
|
|
95
|
+
|
|
96
|
+
@id = id
|
|
97
|
+
@transformed_on = transformed_on
|
|
98
|
+
@user_id = user_id
|
|
99
|
+
@inputted_file = inputted_file
|
|
100
|
+
@generated_file = generated_file
|
|
101
|
+
@export_format = export_format
|
|
102
|
+
@transformation_source = transformation_source
|
|
103
|
+
@transformation_input = transformation_input
|
|
104
|
+
@code_gen_version = code_gen_version
|
|
105
|
+
@success = success
|
|
106
|
+
@import_summary = import_summary
|
|
107
|
+
@api_validation_summary = api_validation_summary
|
|
108
|
+
@additional_properties = additional_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Creates an instance of the object from a hash.
|
|
112
|
+
def self.from_hash(hash)
|
|
113
|
+
return nil unless hash
|
|
114
|
+
|
|
115
|
+
# Extract variables from the hash.
|
|
116
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
117
|
+
transformed_on = hash.key?('transformedOn') ? hash['transformedOn'] : nil
|
|
118
|
+
user_id = hash.key?('userId') ? hash['userId'] : nil
|
|
119
|
+
inputted_file = hash.key?('inputtedFile') ? hash['inputtedFile'] : nil
|
|
120
|
+
generated_file = hash.key?('generatedFile') ? hash['generatedFile'] : nil
|
|
121
|
+
export_format = hash.key?('exportFormat') ? hash['exportFormat'] : nil
|
|
122
|
+
transformation_source =
|
|
123
|
+
hash.key?('transformationSource') ? hash['transformationSource'] : nil
|
|
124
|
+
transformation_input =
|
|
125
|
+
hash.key?('transformationInput') ? hash['transformationInput'] : nil
|
|
126
|
+
code_gen_version =
|
|
127
|
+
hash.key?('codeGenVersion') ? hash['codeGenVersion'] : nil
|
|
128
|
+
success = hash.key?('success') ? hash['success'] : nil
|
|
129
|
+
import_summary = ApiValidationSummary.from_hash(hash['importSummary']) if
|
|
130
|
+
hash['importSummary']
|
|
131
|
+
api_validation_summary = ApiValidationSummary.from_hash(hash['apiValidationSummary']) if
|
|
132
|
+
hash['apiValidationSummary']
|
|
133
|
+
|
|
134
|
+
# Create a new hash for additional properties, removing known properties.
|
|
135
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
136
|
+
|
|
137
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
138
|
+
new_hash, proc { |value| value }
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
# Create object from extracted values.
|
|
142
|
+
Transformation.new(id: id,
|
|
143
|
+
transformed_on: transformed_on,
|
|
144
|
+
user_id: user_id,
|
|
145
|
+
inputted_file: inputted_file,
|
|
146
|
+
generated_file: generated_file,
|
|
147
|
+
export_format: export_format,
|
|
148
|
+
transformation_source: transformation_source,
|
|
149
|
+
transformation_input: transformation_input,
|
|
150
|
+
code_gen_version: code_gen_version,
|
|
151
|
+
success: success,
|
|
152
|
+
import_summary: import_summary,
|
|
153
|
+
api_validation_summary: api_validation_summary,
|
|
154
|
+
additional_properties: additional_properties)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Provides a human-readable string representation of the object.
|
|
158
|
+
def to_s
|
|
159
|
+
class_name = self.class.name.split('::').last
|
|
160
|
+
"<#{class_name} id: #{@id}, transformed_on: #{@transformed_on}, user_id: #{@user_id},"\
|
|
161
|
+
" inputted_file: #{@inputted_file}, generated_file: #{@generated_file}, export_format:"\
|
|
162
|
+
" #{@export_format}, transformation_source: #{@transformation_source}, transformation_input:"\
|
|
163
|
+
" #{@transformation_input}, code_gen_version: #{@code_gen_version}, success: #{@success},"\
|
|
164
|
+
" import_summary: #{@import_summary}, api_validation_summary: #{@api_validation_summary},"\
|
|
165
|
+
" additional_properties: #{@additional_properties}>"
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
169
|
+
def inspect
|
|
170
|
+
class_name = self.class.name.split('::').last
|
|
171
|
+
"<#{class_name} id: #{@id.inspect}, transformed_on: #{@transformed_on.inspect}, user_id:"\
|
|
172
|
+
" #{@user_id.inspect}, inputted_file: #{@inputted_file.inspect}, generated_file:"\
|
|
173
|
+
" #{@generated_file.inspect}, export_format: #{@export_format.inspect},"\
|
|
174
|
+
" transformation_source: #{@transformation_source.inspect}, transformation_input:"\
|
|
175
|
+
" #{@transformation_input.inspect}, code_gen_version: #{@code_gen_version.inspect}, success:"\
|
|
176
|
+
" #{@success.inspect}, import_summary: #{@import_summary.inspect}, api_validation_summary:"\
|
|
177
|
+
" #{@api_validation_summary.inspect}, additional_properties: #{@additional_properties}>"
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -1,140 +1,167 @@
|
|
|
1
|
-
# apimatic_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by APIMATIC
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
require 'date'
|
|
7
|
-
module ApimaticApi
|
|
8
|
-
# The Code Generation structure encapsulates all the the details of an SDK
|
|
9
|
-
# generation performed by a user.
|
|
10
|
-
class UserCodeGeneration < BaseModel
|
|
11
|
-
SKIP = Object.new
|
|
12
|
-
private_constant :SKIP
|
|
13
|
-
|
|
14
|
-
# Unique Code Generation Identifier
|
|
15
|
-
# @return [String]
|
|
16
|
-
attr_accessor :id
|
|
17
|
-
|
|
18
|
-
# The structure contains platforms that APIMatic CodeGen can generate SDKs
|
|
19
|
-
# and Docs in.
|
|
20
|
-
# @return [Platforms]
|
|
21
|
-
attr_accessor :template
|
|
22
|
-
|
|
23
|
-
# The generated SDK
|
|
24
|
-
# @return [String]
|
|
25
|
-
attr_accessor :generated_file
|
|
26
|
-
|
|
27
|
-
# Generation Date and Time
|
|
28
|
-
# @return [DateTime]
|
|
29
|
-
attr_accessor :generated_on
|
|
30
|
-
|
|
31
|
-
# The md5 hash of the API Description
|
|
32
|
-
# @return [String]
|
|
33
|
-
attr_accessor :hash_code
|
|
34
|
-
|
|
35
|
-
# Generation Source
|
|
36
|
-
# @return [String]
|
|
37
|
-
attr_accessor :code_generation_source
|
|
38
|
-
|
|
39
|
-
# Generation Version
|
|
40
|
-
# @return [String]
|
|
41
|
-
attr_accessor :code_gen_version
|
|
42
|
-
|
|
43
|
-
# Generation Status
|
|
44
|
-
# @return [TrueClass | FalseClass]
|
|
45
|
-
attr_accessor :success
|
|
46
|
-
|
|
47
|
-
# Unique User Identifier
|
|
48
|
-
# @return [String]
|
|
49
|
-
attr_accessor :user_id
|
|
50
|
-
|
|
51
|
-
# API Specification file in a supported format
|
|
52
|
-
# @return [String]
|
|
53
|
-
attr_accessor :input_file
|
|
54
|
-
|
|
55
|
-
# A mapping from model property names to API property names.
|
|
56
|
-
def self.names
|
|
57
|
-
@_hash = {} if @_hash.nil?
|
|
58
|
-
@_hash['id'] = 'id'
|
|
59
|
-
@_hash['template'] = 'template'
|
|
60
|
-
@_hash['generated_file'] = 'generatedFile'
|
|
61
|
-
@_hash['generated_on'] = 'generatedOn'
|
|
62
|
-
@_hash['hash_code'] = 'hashCode'
|
|
63
|
-
@_hash['code_generation_source'] = 'codeGenerationSource'
|
|
64
|
-
@_hash['code_gen_version'] = 'codeGenVersion'
|
|
65
|
-
@_hash['success'] = 'success'
|
|
66
|
-
@_hash['user_id'] = 'userId'
|
|
67
|
-
@_hash['input_file'] = 'inputFile'
|
|
68
|
-
@_hash
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# An array for optional fields
|
|
72
|
-
def self.optionals
|
|
73
|
-
[]
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
# An array for nullable fields
|
|
77
|
-
def self.nullables
|
|
78
|
-
[]
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def initialize(id
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
@
|
|
92
|
-
@
|
|
93
|
-
@
|
|
94
|
-
@
|
|
95
|
-
@
|
|
96
|
-
@
|
|
97
|
-
@
|
|
98
|
-
@
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
hash.key?('
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
end
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module ApimaticApi
|
|
8
|
+
# The Code Generation structure encapsulates all the the details of an SDK
|
|
9
|
+
# generation performed by a user.
|
|
10
|
+
class UserCodeGeneration < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# Unique Code Generation Identifier
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# The structure contains platforms that APIMatic CodeGen can generate SDKs
|
|
19
|
+
# and Docs in.
|
|
20
|
+
# @return [Platforms]
|
|
21
|
+
attr_accessor :template
|
|
22
|
+
|
|
23
|
+
# The generated SDK
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :generated_file
|
|
26
|
+
|
|
27
|
+
# Generation Date and Time
|
|
28
|
+
# @return [DateTime]
|
|
29
|
+
attr_accessor :generated_on
|
|
30
|
+
|
|
31
|
+
# The md5 hash of the API Description
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :hash_code
|
|
34
|
+
|
|
35
|
+
# Generation Source
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :code_generation_source
|
|
38
|
+
|
|
39
|
+
# Generation Version
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :code_gen_version
|
|
42
|
+
|
|
43
|
+
# Generation Status
|
|
44
|
+
# @return [TrueClass | FalseClass]
|
|
45
|
+
attr_accessor :success
|
|
46
|
+
|
|
47
|
+
# Unique User Identifier
|
|
48
|
+
# @return [String]
|
|
49
|
+
attr_accessor :user_id
|
|
50
|
+
|
|
51
|
+
# API Specification file in a supported format
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :input_file
|
|
54
|
+
|
|
55
|
+
# A mapping from model property names to API property names.
|
|
56
|
+
def self.names
|
|
57
|
+
@_hash = {} if @_hash.nil?
|
|
58
|
+
@_hash['id'] = 'id'
|
|
59
|
+
@_hash['template'] = 'template'
|
|
60
|
+
@_hash['generated_file'] = 'generatedFile'
|
|
61
|
+
@_hash['generated_on'] = 'generatedOn'
|
|
62
|
+
@_hash['hash_code'] = 'hashCode'
|
|
63
|
+
@_hash['code_generation_source'] = 'codeGenerationSource'
|
|
64
|
+
@_hash['code_gen_version'] = 'codeGenVersion'
|
|
65
|
+
@_hash['success'] = 'success'
|
|
66
|
+
@_hash['user_id'] = 'userId'
|
|
67
|
+
@_hash['input_file'] = 'inputFile'
|
|
68
|
+
@_hash
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# An array for optional fields
|
|
72
|
+
def self.optionals
|
|
73
|
+
[]
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# An array for nullable fields
|
|
77
|
+
def self.nullables
|
|
78
|
+
[]
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def initialize(id:, template: Platforms::CS_NET_STANDARD_LIB,
|
|
82
|
+
generated_file:, generated_on:, hash_code:,
|
|
83
|
+
code_generation_source:, code_gen_version:, success:,
|
|
84
|
+
user_id:, input_file:, additional_properties: nil)
|
|
85
|
+
# Add additional model properties to the instance
|
|
86
|
+
additional_properties = {} if additional_properties.nil?
|
|
87
|
+
|
|
88
|
+
@id = id
|
|
89
|
+
@template = template
|
|
90
|
+
@generated_file = generated_file
|
|
91
|
+
@generated_on = generated_on
|
|
92
|
+
@hash_code = hash_code
|
|
93
|
+
@code_generation_source = code_generation_source
|
|
94
|
+
@code_gen_version = code_gen_version
|
|
95
|
+
@success = success
|
|
96
|
+
@user_id = user_id
|
|
97
|
+
@input_file = input_file
|
|
98
|
+
@additional_properties = additional_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Creates an instance of the object from a hash.
|
|
102
|
+
def self.from_hash(hash)
|
|
103
|
+
return nil unless hash
|
|
104
|
+
|
|
105
|
+
# Extract variables from the hash.
|
|
106
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
107
|
+
template = hash['template'] ||= Platforms::CS_NET_STANDARD_LIB
|
|
108
|
+
generated_file = hash.key?('generatedFile') ? hash['generatedFile'] : nil
|
|
109
|
+
generated_on = if hash.key?('generatedOn')
|
|
110
|
+
(DateTimeHelper.from_rfc3339(hash['generatedOn']) if hash['generatedOn'])
|
|
111
|
+
end
|
|
112
|
+
hash_code = hash.key?('hashCode') ? hash['hashCode'] : nil
|
|
113
|
+
code_generation_source =
|
|
114
|
+
hash.key?('codeGenerationSource') ? hash['codeGenerationSource'] : nil
|
|
115
|
+
code_gen_version =
|
|
116
|
+
hash.key?('codeGenVersion') ? hash['codeGenVersion'] : nil
|
|
117
|
+
success = hash.key?('success') ? hash['success'] : nil
|
|
118
|
+
user_id = hash.key?('userId') ? hash['userId'] : nil
|
|
119
|
+
input_file = hash.key?('inputFile') ? hash['inputFile'] : nil
|
|
120
|
+
|
|
121
|
+
# Create a new hash for additional properties, removing known properties.
|
|
122
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
123
|
+
|
|
124
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
125
|
+
new_hash, proc { |value| value }
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
# Create object from extracted values.
|
|
129
|
+
UserCodeGeneration.new(id: id,
|
|
130
|
+
template: template,
|
|
131
|
+
generated_file: generated_file,
|
|
132
|
+
generated_on: generated_on,
|
|
133
|
+
hash_code: hash_code,
|
|
134
|
+
code_generation_source: code_generation_source,
|
|
135
|
+
code_gen_version: code_gen_version,
|
|
136
|
+
success: success,
|
|
137
|
+
user_id: user_id,
|
|
138
|
+
input_file: input_file,
|
|
139
|
+
additional_properties: additional_properties)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def to_custom_generated_on
|
|
143
|
+
DateTimeHelper.to_rfc3339(generated_on)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Provides a human-readable string representation of the object.
|
|
147
|
+
def to_s
|
|
148
|
+
class_name = self.class.name.split('::').last
|
|
149
|
+
"<#{class_name} id: #{@id}, template: #{@template}, generated_file: #{@generated_file},"\
|
|
150
|
+
" generated_on: #{@generated_on}, hash_code: #{@hash_code}, code_generation_source:"\
|
|
151
|
+
" #{@code_generation_source}, code_gen_version: #{@code_gen_version}, success: #{@success},"\
|
|
152
|
+
" user_id: #{@user_id}, input_file: #{@input_file}, additional_properties:"\
|
|
153
|
+
" #{@additional_properties}>"
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
157
|
+
def inspect
|
|
158
|
+
class_name = self.class.name.split('::').last
|
|
159
|
+
"<#{class_name} id: #{@id.inspect}, template: #{@template.inspect}, generated_file:"\
|
|
160
|
+
" #{@generated_file.inspect}, generated_on: #{@generated_on.inspect}, hash_code:"\
|
|
161
|
+
" #{@hash_code.inspect}, code_generation_source: #{@code_generation_source.inspect},"\
|
|
162
|
+
" code_gen_version: #{@code_gen_version.inspect}, success: #{@success.inspect}, user_id:"\
|
|
163
|
+
" #{@user_id.inspect}, input_file: #{@input_file.inspect}, additional_properties:"\
|
|
164
|
+
" #{@additional_properties}>"
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|