Class: SwaggerClient::ServiceApi
- Inherits:
-
Object
- Object
- SwaggerClient::ServiceApi
- Defined in:
- lib/puppet_x/modules/service/service_api.rb,
lib/puppet_x/swagger_client/api/service_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(url) ⇒ ServiceApi
constructor
A new instance of ServiceApi.
-
#services_get(authorization, opts = {}) ⇒ nil
FETCH Information of Service.
-
#services_get_with_http_info(authorization, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Service.
-
#services_post(authorization, service, opts = {}) ⇒ nil
ADD Information of Service.
-
#services_post_with_http_info(authorization, service, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
ADD Information of Service.
-
#services_web_application_name_delete(authorization, web_application_name, opts = {}) ⇒ nil
DELETE Information of Service.
-
#services_web_application_name_delete_with_http_info(authorization, web_application_name, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
DELETE Information of Service.
-
#services_web_application_name_get(authorization, web_application_name, opts = {}) ⇒ nil
FETCH Information of Service.
-
#services_web_application_name_get_with_http_info(authorization, web_application_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Service.
-
#services_web_application_name_put(authorization, web_application_name, service, opts = {}) ⇒ nil
EDIT Information of Service.
-
#services_web_application_name_put_with_http_info(authorization, web_application_name, service, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
EDIT Information of Service.
Constructor Details
#initialize(url) ⇒ ServiceApi
Returns a new instance of ServiceApi.
19 20 21 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 19 def initialize(url) @api_client = ApiClient.default(url) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#services_get(authorization, opts = {}) ⇒ nil
FETCH Information of Service
29 30 31 32 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 29 def services_get(, opts = {}) data, status_code, headers = services_get_with_http_info(, opts) [data, status_code, headers] end |
#services_get_with_http_info(authorization, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Service
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 40 def services_get_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceApi.services_get ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? raise ArgumentError, "Missing the required parameter 'authorization' when calling ServiceApi.services_get" end # resource path local_var_path = '/services' local_var_path += '?groups=Service' # query parameters query_params = {} query_params[:fields] = @api_client.build_collection_param(opts[:fields], :multi) unless opts[:fields].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:Authorization] = # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServiceApi#services_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#services_post(authorization, service, opts = {}) ⇒ nil
ADD Information of Service
86 87 88 89 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 86 def services_post(, service, opts = {}) data, status_code, headers = services_post_with_http_info(, service, opts) [data, status_code, headers] end |
#services_post_with_http_info(authorization, service, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
ADD Information of Service
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 131 132 133 134 135 136 137 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 97 def services_post_with_http_info(, service, _opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceApi.services_post ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? raise ArgumentError, "Missing the required parameter 'authorization' when calling ServiceApi.services_post" end # verify the required parameter 'service' is set if @api_client.config.client_side_validation && service.nil? raise ArgumentError, "Missing the required parameter 'service' when calling ServiceApi.services_post" end # resource path local_var_path = '/services' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:Authorization] = # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(service) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServiceApi#services_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#services_web_application_name_delete(authorization, web_application_name, opts = {}) ⇒ nil
DELETE Information of Service
145 146 147 148 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 145 def services_web_application_name_delete(, web_application_name, opts = {}) services_web_application_name_delete_with_http_info(, web_application_name, opts) nil end |
#services_web_application_name_delete_with_http_info(authorization, web_application_name, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
DELETE Information of Service
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 156 def services_web_application_name_delete_with_http_info(, web_application_name, _opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceApi.services_web_application_name_delete ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? raise ArgumentError, "Missing the required parameter 'authorization' when calling ServiceApi.services_web_application_name_delete" end # verify the required parameter 'web_application_name' is set if @api_client.config.client_side_validation && web_application_name.nil? raise ArgumentError, "Missing the required parameter 'web_application_name' when calling ServiceApi.services_web_application_name_delete" end # resource path local_var_path = '/services/{Web Application Name}'.sub('{' + 'Web Application Name' + '}', web_application_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:Authorization] = # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServiceApi#services_web_application_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#services_web_application_name_get(authorization, web_application_name, opts = {}) ⇒ nil
FETCH Information of Service
205 206 207 208 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 205 def services_web_application_name_get(, web_application_name, opts = {}) resp = services_web_application_name_get_with_http_info(, web_application_name, opts) resp end |
#services_web_application_name_get_with_http_info(authorization, web_application_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Service
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 217 def services_web_application_name_get_with_http_info(, web_application_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceApi.services_web_application_name_get ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? raise ArgumentError, "Missing the required parameter 'authorization' when calling ServiceApi.services_web_application_name_get" end # verify the required parameter 'web_application_name' is set if @api_client.config.client_side_validation && web_application_name.nil? raise ArgumentError, "Missing the required parameter 'web_application_name' when calling ServiceApi.services_web_application_name_get" end # resource path local_var_path = '/services/{Web Application Name}'.sub('{' + 'Web Application Name' + '}', web_application_name.to_s) local_var_path += '?groups=Service' # query parameters query_params = {} query_params[:fields] = @api_client.build_collection_param(opts[:fields], :multi) unless opts[:fields].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:Authorization] = # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServiceApi#services_web_application_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end # return data, status_code, headers response = { 'data' => data.to_s, 'status_code' => status_code.to_s } JSON[response] end |
#services_web_application_name_put(authorization, web_application_name, service, opts = {}) ⇒ nil
EDIT Information of Service
270 271 272 273 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 270 def services_web_application_name_put(, web_application_name, service, opts = {}) services_web_application_name_put_with_http_info(, web_application_name, service, opts) nil end |
#services_web_application_name_put_with_http_info(authorization, web_application_name, service, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
EDIT Information of Service
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/puppet_x/modules/service/service_api.rb', line 282 def services_web_application_name_put_with_http_info(, web_application_name, service, _opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceApi.services_web_application_name_put ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? raise ArgumentError, "Missing the required parameter 'authorization' when calling ServiceApi.services_web_application_name_put" end # verify the required parameter 'web_application_name' is set if @api_client.config.client_side_validation && web_application_name.nil? raise ArgumentError, "Missing the required parameter 'web_application_name' when calling ServiceApi.services_web_application_name_put" end # verify the required parameter 'service' is set if @api_client.config.client_side_validation && service.nil? raise ArgumentError, "Missing the required parameter 'service' when calling ServiceApi.services_web_application_name_put" end # resource path local_var_path = '/services/{Web Application Name}'.sub('{' + 'Web Application Name' + '}', web_application_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:Authorization] = # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(service) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServiceApi#services_web_application_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |