Class: SwaggerClient::SecurityPolicyApi
- Inherits:
-
Object
- Object
- SwaggerClient::SecurityPolicyApi
- Defined in:
- lib/puppet_x/modules/security_policy/security_policy_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(url) ⇒ SecurityPolicyApi
constructor
A new instance of SecurityPolicyApi.
-
#security_policies_get(authorization, opts = {}) ⇒ nil
FETCH Information of Security Policy.
-
#security_policies_get_with_http_info(authorization, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Security Policy.
-
#security_policies_policy_name_delete(authorization, policy_name, opts = {}) ⇒ nil
DELETE Information of Security Policy.
-
#security_policies_policy_name_delete_with_http_info(authorization, policy_name, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
DELETE Information of Security Policy.
-
#security_policies_policy_name_get(authorization, policy_name, opts = {}) ⇒ nil
FETCH Information of Security Policy.
-
#security_policies_policy_name_get_with_http_info(authorization, policy_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Security Policy.
-
#security_policies_policy_name_put(authorization, policy_name, security_policy, opts = {}) ⇒ nil
EDIT Information of Security Policy.
-
#security_policies_policy_name_put_with_http_info(authorization, policy_name, security_policy, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
EDIT Information of Security Policy.
-
#security_policies_post(authorization, security_policy, opts = {}) ⇒ nil
ADD Information of Security Policy.
-
#security_policies_post_with_http_info(authorization, security_policy, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
ADD Information of Security Policy.
Constructor Details
#initialize(url) ⇒ SecurityPolicyApi
Returns a new instance of SecurityPolicyApi.
15 16 17 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 15 def initialize(url) @api_client = ApiClient.default(url) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
13 14 15 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 13 def api_client @api_client end |
Instance Method Details
#security_policies_get(authorization, opts = {}) ⇒ nil
FETCH Information of Security Policy
25 26 27 28 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 25 def security_policies_get(, opts = {}) data, status_code, headers = security_policies_get_with_http_info(, opts) [data, status_code, headers] end |
#security_policies_get_with_http_info(authorization, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Security Policy
36 37 38 39 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 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 36 def security_policies_get_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityPolicyApi.security_policies_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 SecurityPolicyApi.security_policies_get" end # resource path local_var_path = '/security-policies' # 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: SecurityPolicyApi#security_policies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#security_policies_policy_name_delete(authorization, policy_name, opts = {}) ⇒ nil
DELETE Information of Security Policy
81 82 83 84 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 81 def security_policies_policy_name_delete(, policy_name, opts = {}) data, status_code, headers = security_policies_policy_name_delete_with_http_info(, policy_name, opts) [data, status_code, headers] end |
#security_policies_policy_name_delete_with_http_info(authorization, policy_name, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
DELETE Information of Security Policy
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 131 132 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 92 def security_policies_policy_name_delete_with_http_info(, policy_name, _opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityPolicyApi.security_policies_policy_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 SecurityPolicyApi.security_policies_policy_name_delete" end # verify the required parameter 'policy_name' is set if @api_client.config.client_side_validation && policy_name.nil? raise ArgumentError, "Missing the required parameter 'policy_name' when calling SecurityPolicyApi.security_policies_policy_name_delete" end # resource path local_var_path = '/security-policies/{Policy Name}'.sub('{' + 'Policy Name' + '}', policy_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: SecurityPolicyApi#security_policies_policy_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#security_policies_policy_name_get(authorization, policy_name, opts = {}) ⇒ nil
FETCH Information of Security Policy
141 142 143 144 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 141 def security_policies_policy_name_get(, policy_name, opts = {}) data, status_code, headers = security_policies_policy_name_get_with_http_info(, policy_name, opts) [data, status_code, headers] end |
#security_policies_policy_name_get_with_http_info(authorization, policy_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of Security Policy
153 154 155 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 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 153 def security_policies_policy_name_get_with_http_info(, policy_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityPolicyApi.security_policies_policy_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 SecurityPolicyApi.security_policies_policy_name_get" end # verify the required parameter 'policy_name' is set if @api_client.config.client_side_validation && policy_name.nil? raise ArgumentError, "Missing the required parameter 'policy_name' when calling SecurityPolicyApi.security_policies_policy_name_get" end # resource path local_var_path = '/security-policies/{Policy Name}'.sub('{' + 'Policy Name' + '}', policy_name.to_s) # 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: SecurityPolicyApi#security_policies_policy_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#security_policies_policy_name_put(authorization, policy_name, security_policy, opts = {}) ⇒ nil
EDIT Information of Security Policy
203 204 205 206 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 203 def security_policies_policy_name_put(, policy_name, security_policy, opts = {}) data, status_code, headers = security_policies_policy_name_put_with_http_info(, policy_name, security_policy, opts) [data, status_code, headers] end |
#security_policies_policy_name_put_with_http_info(authorization, policy_name, security_policy, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
EDIT Information of Security Policy
215 216 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 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 215 def security_policies_policy_name_put_with_http_info(, policy_name, security_policy, _opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityPolicyApi.security_policies_policy_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 SecurityPolicyApi.security_policies_policy_name_put" end # verify the required parameter 'policy_name' is set if @api_client.config.client_side_validation && policy_name.nil? raise ArgumentError, "Missing the required parameter 'policy_name' when calling SecurityPolicyApi.security_policies_policy_name_put" end # verify the required parameter 'security_policy' is set if @api_client.config.client_side_validation && security_policy.nil? raise ArgumentError, "Missing the required parameter 'security_policy' when calling SecurityPolicyApi.security_policies_policy_name_put" end # resource path local_var_path = '/security-policies/{Policy Name}'.sub('{' + 'Policy Name' + '}', policy_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(security_policy) 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: SecurityPolicyApi#security_policies_policy_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#security_policies_post(authorization, security_policy, opts = {}) ⇒ nil
ADD Information of Security Policy
267 268 269 270 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 267 def security_policies_post(, security_policy, opts = {}) data, status_code, headers = security_policies_post_with_http_info(, security_policy, opts) [data, status_code, headers] end |
#security_policies_post_with_http_info(authorization, security_policy, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
ADD Information of Security Policy
278 279 280 281 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 |
# File 'lib/puppet_x/modules/security_policy/security_policy_api.rb', line 278 def security_policies_post_with_http_info(, security_policy, _opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityPolicyApi.security_policies_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 SecurityPolicyApi.security_policies_post" end # verify the required parameter 'security_policy' is set if @api_client.config.client_side_validation && security_policy.nil? raise ArgumentError, "Missing the required parameter 'security_policy' when calling SecurityPolicyApi.security_policies_post" end # resource path local_var_path = '/security-policies' # 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(security_policy) 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: SecurityPolicyApi#security_policies_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |