smplkit 3.0.33 → 3.0.34
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/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarder_types_api.rb +142 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder.rb +1 -1
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type.rb +8 -8
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_attributes.rb +325 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_header.rb +193 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_http_configuration.rb +235 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_list_response.rb +193 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_placeholder.rb +213 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_resource.rb +203 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_response.rb +165 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_transform.rb +193 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +9 -0
- data/lib/smplkit/_generated/audit/spec/api/forwarder_types_api_spec.rb +58 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_attributes_spec.rb +78 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_header_spec.rb +42 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_http_configuration_spec.rb +54 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_list_response_spec.rb +42 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_placeholder_spec.rb +60 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_resource_spec.rb +48 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_response_spec.rb +36 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_type_transform_spec.rb +42 -0
- data/lib/smplkit/audit/models.rb +7 -7
- metadata +19 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 128a7c5f9091b8007c311817f08d6bc4644a76c1dcf1bb1d9191be83e07b3585
|
|
4
|
+
data.tar.gz: 365e17071a095bca5cab3e93ad0f5320176cca3f7e9e8b99ff94147b82f5f499
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee3111c976ab077606fa16ba65713ea07c6c91b3120272637f4189dec3c1632f71f0f8caeb9ff63d63ae75e9fc5d8923b3ce7114a3f0e7bf1b5be711a490e55d
|
|
7
|
+
data.tar.gz: 7b83e652fd638225d291e5272e779617174239d8fc64ff9821c72e6f2ae76ed2caeadff24c014604f2f3e567d2744af5674541ed609297e95d4742bcfbe07880
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Audit API
|
|
3
|
+
|
|
4
|
+
#Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SmplkitGeneratedClient::Audit
|
|
16
|
+
class ForwarderTypesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get Forwarder Type
|
|
23
|
+
# Fetch a single forwarder type from the catalog.
|
|
24
|
+
# @param id [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [ForwarderTypeResponse]
|
|
27
|
+
def get_forwarder_type_api_v1_forwarder_types_id_get(id, opts = {})
|
|
28
|
+
data, _status_code, _headers = get_forwarder_type_api_v1_forwarder_types_id_get_with_http_info(id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get Forwarder Type
|
|
33
|
+
# Fetch a single forwarder type from the catalog.
|
|
34
|
+
# @param id [String]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(ForwarderTypeResponse, Integer, Hash)>] ForwarderTypeResponse data, response status code and response headers
|
|
37
|
+
def get_forwarder_type_api_v1_forwarder_types_id_get_with_http_info(id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ForwarderTypesApi.get_forwarder_type_api_v1_forwarder_types_id_get ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ForwarderTypesApi.get_forwarder_type_api_v1_forwarder_types_id_get"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api/v1/forwarder_types/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
55
|
+
|
|
56
|
+
# form parameters
|
|
57
|
+
form_params = opts[:form_params] || {}
|
|
58
|
+
|
|
59
|
+
# http body (model)
|
|
60
|
+
post_body = opts[:debug_body]
|
|
61
|
+
|
|
62
|
+
# return_type
|
|
63
|
+
return_type = opts[:debug_return_type] || 'ForwarderTypeResponse'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || []
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"ForwarderTypesApi.get_forwarder_type_api_v1_forwarder_types_id_get",
|
|
70
|
+
:header_params => header_params,
|
|
71
|
+
:query_params => query_params,
|
|
72
|
+
:form_params => form_params,
|
|
73
|
+
:body => post_body,
|
|
74
|
+
:auth_names => auth_names,
|
|
75
|
+
:return_type => return_type
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: ForwarderTypesApi#get_forwarder_type_api_v1_forwarder_types_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# List Forwarder Types
|
|
86
|
+
# List all forwarder types in the catalog. Returns every branded HTTP forwarder type defined in `forwarder_types/*.yaml` plus the synthetic `http` (Custom HTTP) entry. The response drives the console's create-forwarder UX, the docs vendor-reference page, and audit's own server-side template validation.
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @return [ForwarderTypeListResponse]
|
|
89
|
+
def list_forwarder_types_api_v1_forwarder_types_get(opts = {})
|
|
90
|
+
data, _status_code, _headers = list_forwarder_types_api_v1_forwarder_types_get_with_http_info(opts)
|
|
91
|
+
data
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# List Forwarder Types
|
|
95
|
+
# List all forwarder types in the catalog. Returns every branded HTTP forwarder type defined in `forwarder_types/*.yaml` plus the synthetic `http` (Custom HTTP) entry. The response drives the console's create-forwarder UX, the docs vendor-reference page, and audit's own server-side template validation.
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Array<(ForwarderTypeListResponse, Integer, Hash)>] ForwarderTypeListResponse data, response status code and response headers
|
|
98
|
+
def list_forwarder_types_api_v1_forwarder_types_get_with_http_info(opts = {})
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: ForwarderTypesApi.list_forwarder_types_api_v1_forwarder_types_get ...'
|
|
101
|
+
end
|
|
102
|
+
# resource path
|
|
103
|
+
local_var_path = '/api/v1/forwarder_types'
|
|
104
|
+
|
|
105
|
+
# query parameters
|
|
106
|
+
query_params = opts[:query_params] || {}
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = opts[:header_params] || {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
112
|
+
|
|
113
|
+
# form parameters
|
|
114
|
+
form_params = opts[:form_params] || {}
|
|
115
|
+
|
|
116
|
+
# http body (model)
|
|
117
|
+
post_body = opts[:debug_body]
|
|
118
|
+
|
|
119
|
+
# return_type
|
|
120
|
+
return_type = opts[:debug_return_type] || 'ForwarderTypeListResponse'
|
|
121
|
+
|
|
122
|
+
# auth_names
|
|
123
|
+
auth_names = opts[:debug_auth_names] || []
|
|
124
|
+
|
|
125
|
+
new_options = opts.merge(
|
|
126
|
+
:operation => :"ForwarderTypesApi.list_forwarder_types_api_v1_forwarder_types_get",
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => return_type
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
136
|
+
if @api_client.config.debugging
|
|
137
|
+
@api_client.config.logger.debug "API called: ForwarderTypesApi#list_forwarder_types_api_v1_forwarder_types_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
|
+
end
|
|
139
|
+
return data, status_code, headers
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
@@ -37,7 +37,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
37
37
|
# Template applied to each event before delivery. The shape depends on ``transform_type``: for `JSONATA`, a string containing a JSONata expression. Omit to deliver the event JSON unchanged.
|
|
38
38
|
attr_accessor :transform
|
|
39
39
|
|
|
40
|
-
# Transport-specific delivery configuration. Shape is discriminated by ``forwarder_type``; today all destination types use ``HttpConfiguration``.
|
|
40
|
+
# Transport-specific delivery configuration. Shape is discriminated by ``forwarder_type``; today all destination types use ``HttpConfiguration``. Branded vendor types (everything except `http`) constrain the configuration against a per-vendor template — see `GET /api/v1/forwarder_types` for the URL pattern, fixed headers, and customer-supplied placeholders for each type.
|
|
41
41
|
attr_accessor :configuration
|
|
42
42
|
|
|
43
43
|
# When the forwarder was created.
|
|
@@ -15,16 +15,16 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Audit
|
|
17
17
|
class ForwarderType
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
NEW_RELIC = "
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
DATADOG = "datadog".freeze
|
|
19
|
+
ELASTIC = "elastic".freeze
|
|
20
|
+
HONEYCOMB = "honeycomb".freeze
|
|
21
|
+
HTTP = "http".freeze
|
|
22
|
+
NEW_RELIC = "new_relic".freeze
|
|
23
|
+
SPLUNK_HEC = "splunk_hec".freeze
|
|
24
|
+
SUMO_LOGIC = "sumo_logic".freeze
|
|
25
25
|
|
|
26
26
|
def self.all_vars
|
|
27
|
-
@all_vars ||= [
|
|
27
|
+
@all_vars ||= [DATADOG, ELASTIC, HONEYCOMB, HTTP, NEW_RELIC, SPLUNK_HEC, SUMO_LOGIC].freeze
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
# Builds the enum from string
|
data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type_attributes.rb
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Audit API
|
|
3
|
+
|
|
4
|
+
#Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Audit
|
|
17
|
+
# The catalog entry's attributes — one branded forwarder type or the synthetic Custom HTTP entry.
|
|
18
|
+
class ForwarderTypeAttributes < ApiModelBase
|
|
19
|
+
# Human-readable label shown in the type-picker.
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Absolute URL to the icon asset, served by audit at `/api/v1/forwarder_types/{id}/icon`.
|
|
23
|
+
attr_accessor :icon
|
|
24
|
+
|
|
25
|
+
# Transport family — today only `HTTP`. New base types will add their own configuration shape and runtime handler.
|
|
26
|
+
attr_accessor :base_type
|
|
27
|
+
|
|
28
|
+
# Link to the vendor's own documentation for this destination.
|
|
29
|
+
attr_accessor :docs_url
|
|
30
|
+
|
|
31
|
+
# True for the synthetic `http` Custom HTTP entry, which has no vendor template — the customer supplies URL, headers, and transform from scratch. False for branded types.
|
|
32
|
+
attr_accessor :is_custom
|
|
33
|
+
|
|
34
|
+
# Delivery template. Shape depends on `base_type`.
|
|
35
|
+
attr_accessor :configuration
|
|
36
|
+
|
|
37
|
+
# UI metadata keyed by placeholder name. Each `{name}` token appearing in `configuration` (URL, header value) has a matching entry here describing how to prompt for it.
|
|
38
|
+
attr_accessor :placeholders
|
|
39
|
+
|
|
40
|
+
# Default transform shipped with the type, or `null` if none.
|
|
41
|
+
attr_accessor :transform
|
|
42
|
+
|
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
|
+
def self.attribute_map
|
|
45
|
+
{
|
|
46
|
+
:'name' => :'name',
|
|
47
|
+
:'icon' => :'icon',
|
|
48
|
+
:'base_type' => :'base_type',
|
|
49
|
+
:'docs_url' => :'docs_url',
|
|
50
|
+
:'is_custom' => :'is_custom',
|
|
51
|
+
:'configuration' => :'configuration',
|
|
52
|
+
:'placeholders' => :'placeholders',
|
|
53
|
+
:'transform' => :'transform'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns attribute mapping this model knows about
|
|
58
|
+
def self.acceptable_attribute_map
|
|
59
|
+
attribute_map
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns all the JSON keys this model knows about
|
|
63
|
+
def self.acceptable_attributes
|
|
64
|
+
acceptable_attribute_map.values
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Attribute type mapping.
|
|
68
|
+
def self.openapi_types
|
|
69
|
+
{
|
|
70
|
+
:'name' => :'String',
|
|
71
|
+
:'icon' => :'String',
|
|
72
|
+
:'base_type' => :'String',
|
|
73
|
+
:'docs_url' => :'String',
|
|
74
|
+
:'is_custom' => :'Boolean',
|
|
75
|
+
:'configuration' => :'ForwarderTypeHttpConfiguration',
|
|
76
|
+
:'placeholders' => :'Hash<String, ForwarderTypePlaceholder>',
|
|
77
|
+
:'transform' => :'ForwarderTypeTransform'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# List of attributes with nullable: true
|
|
82
|
+
def self.openapi_nullable
|
|
83
|
+
Set.new([
|
|
84
|
+
:'docs_url',
|
|
85
|
+
:'transform'
|
|
86
|
+
])
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Initializes the object
|
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
|
+
def initialize(attributes = {})
|
|
92
|
+
if (!attributes.is_a?(Hash))
|
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ForwarderTypeAttributes` initialize method"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
97
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
99
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
100
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ForwarderTypeAttributes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
101
|
+
end
|
|
102
|
+
h[k.to_sym] = v
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'name')
|
|
106
|
+
self.name = attributes[:'name']
|
|
107
|
+
else
|
|
108
|
+
self.name = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'icon')
|
|
112
|
+
self.icon = attributes[:'icon']
|
|
113
|
+
else
|
|
114
|
+
self.icon = nil
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'base_type')
|
|
118
|
+
self.base_type = attributes[:'base_type']
|
|
119
|
+
else
|
|
120
|
+
self.base_type = nil
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'docs_url')
|
|
124
|
+
self.docs_url = attributes[:'docs_url']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'is_custom')
|
|
128
|
+
self.is_custom = attributes[:'is_custom']
|
|
129
|
+
else
|
|
130
|
+
self.is_custom = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'configuration')
|
|
134
|
+
self.configuration = attributes[:'configuration']
|
|
135
|
+
else
|
|
136
|
+
self.configuration = nil
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'placeholders')
|
|
140
|
+
if (value = attributes[:'placeholders']).is_a?(Hash)
|
|
141
|
+
self.placeholders = value
|
|
142
|
+
end
|
|
143
|
+
else
|
|
144
|
+
self.placeholders = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'transform')
|
|
148
|
+
self.transform = attributes[:'transform']
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
153
|
+
# @return Array for valid properties with the reasons
|
|
154
|
+
def list_invalid_properties
|
|
155
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
156
|
+
invalid_properties = Array.new
|
|
157
|
+
if @name.nil?
|
|
158
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if @icon.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "icon", icon cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if @base_type.nil?
|
|
166
|
+
invalid_properties.push('invalid value for "base_type", base_type cannot be nil.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if @is_custom.nil?
|
|
170
|
+
invalid_properties.push('invalid value for "is_custom", is_custom cannot be nil.')
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if @configuration.nil?
|
|
174
|
+
invalid_properties.push('invalid value for "configuration", configuration cannot be nil.')
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if @placeholders.nil?
|
|
178
|
+
invalid_properties.push('invalid value for "placeholders", placeholders cannot be nil.')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
invalid_properties
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Check to see if the all the properties in the model are valid
|
|
185
|
+
# @return true if the model is valid
|
|
186
|
+
def valid?
|
|
187
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
188
|
+
return false if @name.nil?
|
|
189
|
+
return false if @icon.nil?
|
|
190
|
+
return false if @base_type.nil?
|
|
191
|
+
return false if @is_custom.nil?
|
|
192
|
+
return false if @configuration.nil?
|
|
193
|
+
return false if @placeholders.nil?
|
|
194
|
+
true
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Custom attribute writer method with validation
|
|
198
|
+
# @param [Object] name Value to be assigned
|
|
199
|
+
def name=(name)
|
|
200
|
+
if name.nil?
|
|
201
|
+
fail ArgumentError, 'name cannot be nil'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
@name = name
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Custom attribute writer method with validation
|
|
208
|
+
# @param [Object] icon Value to be assigned
|
|
209
|
+
def icon=(icon)
|
|
210
|
+
if icon.nil?
|
|
211
|
+
fail ArgumentError, 'icon cannot be nil'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@icon = icon
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] base_type Value to be assigned
|
|
219
|
+
def base_type=(base_type)
|
|
220
|
+
if base_type.nil?
|
|
221
|
+
fail ArgumentError, 'base_type cannot be nil'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
@base_type = base_type
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Custom attribute writer method with validation
|
|
228
|
+
# @param [Object] is_custom Value to be assigned
|
|
229
|
+
def is_custom=(is_custom)
|
|
230
|
+
if is_custom.nil?
|
|
231
|
+
fail ArgumentError, 'is_custom cannot be nil'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@is_custom = is_custom
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] configuration Value to be assigned
|
|
239
|
+
def configuration=(configuration)
|
|
240
|
+
if configuration.nil?
|
|
241
|
+
fail ArgumentError, 'configuration cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
@configuration = configuration
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Custom attribute writer method with validation
|
|
248
|
+
# @param [Object] placeholders Value to be assigned
|
|
249
|
+
def placeholders=(placeholders)
|
|
250
|
+
if placeholders.nil?
|
|
251
|
+
fail ArgumentError, 'placeholders cannot be nil'
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
@placeholders = placeholders
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Checks equality by comparing each attribute.
|
|
258
|
+
# @param [Object] Object to be compared
|
|
259
|
+
def ==(o)
|
|
260
|
+
return true if self.equal?(o)
|
|
261
|
+
self.class == o.class &&
|
|
262
|
+
name == o.name &&
|
|
263
|
+
icon == o.icon &&
|
|
264
|
+
base_type == o.base_type &&
|
|
265
|
+
docs_url == o.docs_url &&
|
|
266
|
+
is_custom == o.is_custom &&
|
|
267
|
+
configuration == o.configuration &&
|
|
268
|
+
placeholders == o.placeholders &&
|
|
269
|
+
transform == o.transform
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# @see the `==` method
|
|
273
|
+
# @param [Object] Object to be compared
|
|
274
|
+
def eql?(o)
|
|
275
|
+
self == o
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Calculates hash code according to all attributes.
|
|
279
|
+
# @return [Integer] Hash code
|
|
280
|
+
def hash
|
|
281
|
+
[name, icon, base_type, docs_url, is_custom, configuration, placeholders, transform].hash
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Builds the object from hash
|
|
285
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
286
|
+
# @return [Object] Returns the model itself
|
|
287
|
+
def self.build_from_hash(attributes)
|
|
288
|
+
return nil unless attributes.is_a?(Hash)
|
|
289
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
290
|
+
transformed_hash = {}
|
|
291
|
+
openapi_types.each_pair do |key, type|
|
|
292
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
293
|
+
transformed_hash["#{key}"] = nil
|
|
294
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
295
|
+
# check to ensure the input is an array given that the attribute
|
|
296
|
+
# is documented as an array but the input is not
|
|
297
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
298
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
299
|
+
end
|
|
300
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
301
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
new(transformed_hash)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Returns the object in the form of hash
|
|
308
|
+
# @return [Hash] Returns the object in the form of hash
|
|
309
|
+
def to_hash
|
|
310
|
+
hash = {}
|
|
311
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
312
|
+
value = self.send(attr)
|
|
313
|
+
if value.nil?
|
|
314
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
315
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
hash[param] = _to_hash(value)
|
|
319
|
+
end
|
|
320
|
+
hash
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
end
|