Class: SwaggerClient::ContentRuleApi

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_x/modules/rule_group/rule_group_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ ContentRuleApi

Returns a new instance of ContentRuleApi.



15
16
17
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 15

def initialize(url)
  @api_client = ApiClient.default(url)
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#content_rules_get(authorization, web_application_name, opts = {}) ⇒ nil

FETCH Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

Returns:

  • (nil)


26
27
28
29
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 26

def content_rules_get(authorization, web_application_name, opts = {})
  data, status_code, headers = content_rules_get_with_http_info(authorization, web_application_name, opts)
  [data, status_code, headers]
end

#content_rules_get_with_http_info(authorization, web_application_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

FETCH Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
74
75
76
77
78
79
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 38

def content_rules_get_with_http_info(authorization, web_application_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentRuleApi.content_rules_get ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    raise ArgumentError, "Missing the required parameter 'authorization' when calling ContentRuleApi.content_rules_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 ContentRuleApi.content_rules_get"
  end
  # resource path
  local_var_path = '/services/{Web Application Name}/content-rules'.sub('{' + 'Web Application Name' + '}', web_application_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] = 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: ContentRuleApi#content_rules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#content_rules_post(authorization, web_application_name, rule_group, opts = {}) ⇒ nil

ADD Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group

    Body Parameter of Rule Group

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


88
89
90
91
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 88

def content_rules_post(authorization, web_application_name, rule_group, opts = {})
  data, status_code, headers = content_rules_post_with_http_info(authorization, web_application_name, rule_group, opts)
  [data, status_code, headers]
end

#content_rules_post_with_http_info(authorization, web_application_name, rule_group, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

ADD Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group

    Body Parameter of Rule Group

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
138
139
140
141
142
143
144
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 100

def content_rules_post_with_http_info(authorization, web_application_name, rule_group, _opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentRuleApi.content_rules_post ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    raise ArgumentError, "Missing the required parameter 'authorization' when calling ContentRuleApi.content_rules_post"
  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 ContentRuleApi.content_rules_post"
  end
  # verify the required parameter 'rule_group' is set
  if @api_client.config.client_side_validation && rule_group.nil?
    raise ArgumentError, "Missing the required parameter 'rule_group' when calling ContentRuleApi.content_rules_post"
  end
  # resource path
  local_var_path = '/services/{Web Application Name}/content-rules'.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] = authorization

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(rule_group)
  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: ContentRuleApi#content_rules_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#content_rules_rule_group_name_delete(authorization, web_application_name, rule_group_name, opts = {}) ⇒ nil

DELETE Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group_name

    Rule Group Name of Rule Group

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


153
154
155
156
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 153

def content_rules_rule_group_name_delete(authorization, web_application_name, rule_group_name, opts = {})
  data, status_code, headers = content_rules_rule_group_name_delete_with_http_info(authorization, web_application_name, rule_group_name, opts)
  [data, status_code, headers]
end

#content_rules_rule_group_name_delete_with_http_info(authorization, web_application_name, rule_group_name, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

DELETE Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group_name

    Rule Group Name of Rule Group

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 165

def content_rules_rule_group_name_delete_with_http_info(authorization, web_application_name, rule_group_name, _opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentRuleApi.content_rules_rule_group_name_delete ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    raise ArgumentError, "Missing the required parameter 'authorization' when calling ContentRuleApi.content_rules_rule_group_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 ContentRuleApi.content_rules_rule_group_name_delete"
  end
  # verify the required parameter 'rule_group_name' is set
  if @api_client.config.client_side_validation && rule_group_name.nil?
    raise ArgumentError, "Missing the required parameter 'rule_group_name' when calling ContentRuleApi.content_rules_rule_group_name_delete"
  end
  # resource path
  local_var_path = '/services/{Web Application Name}/content-rules/{Rule Group Name}'.sub('{' + 'Web Application Name' + '}', web_application_name.to_s).sub('{' + 'Rule Group Name' + '}', rule_group_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] = 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: ContentRuleApi#content_rules_rule_group_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#content_rules_rule_group_name_get(authorization, web_application_name, rule_group_name, opts = {}) ⇒ nil

FETCH Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group_name

    Rule Group Name of Rule Group

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

Returns:

  • (nil)


219
220
221
222
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 219

def content_rules_rule_group_name_get(authorization, web_application_name, rule_group_name, opts = {})
  data, status_code, headers = content_rules_rule_group_name_get_with_http_info(authorization, web_application_name, rule_group_name, opts)
  [data, status_code, headers]
end

#content_rules_rule_group_name_get_with_http_info(authorization, web_application_name, rule_group_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

FETCH Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group_name

    Rule Group Name of Rule Group

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 232

def content_rules_rule_group_name_get_with_http_info(authorization, web_application_name, rule_group_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentRuleApi.content_rules_rule_group_name_get ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    raise ArgumentError, "Missing the required parameter 'authorization' when calling ContentRuleApi.content_rules_rule_group_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 ContentRuleApi.content_rules_rule_group_name_get"
  end
  # verify the required parameter 'rule_group_name' is set
  if @api_client.config.client_side_validation && rule_group_name.nil?
    raise ArgumentError, "Missing the required parameter 'rule_group_name' when calling ContentRuleApi.content_rules_rule_group_name_get"
  end
  # resource path
  local_var_path = '/services/{Web Application Name}/content-rules/{Rule Group Name}'.sub('{' + 'Web Application Name' + '}', web_application_name.to_s).sub('{' + 'Rule Group Name' + '}', rule_group_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] = 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: ContentRuleApi#content_rules_rule_group_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#content_rules_rule_group_name_put(authorization, web_application_name, rule_group_name, rule_group, opts = {}) ⇒ nil

EDIT Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group_name

    Rule Group Name of Rule Group

  • rule_group

    Body Parameter of Rule Group

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


287
288
289
290
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 287

def content_rules_rule_group_name_put(authorization, web_application_name, rule_group_name, rule_group, opts = {})
  data, status_code, headers = content_rules_rule_group_name_put_with_http_info(authorization, web_application_name, rule_group_name, rule_group, opts)
  [data, status_code, headers]
end

#content_rules_rule_group_name_put_with_http_info(authorization, web_application_name, rule_group_name, rule_group, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

EDIT Information of Rule Group

Parameters:

  • authorization

    Login token

  • web_application_name

    Web Application Name of Rule Group

  • rule_group_name

    Rule Group Name of Rule Group

  • rule_group

    Body Parameter of Rule Group

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/puppet_x/modules/rule_group/rule_group_api.rb', line 300

def content_rules_rule_group_name_put_with_http_info(authorization, web_application_name, rule_group_name, rule_group, _opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentRuleApi.content_rules_rule_group_name_put ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    raise ArgumentError, "Missing the required parameter 'authorization' when calling ContentRuleApi.content_rules_rule_group_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 ContentRuleApi.content_rules_rule_group_name_put"
  end
  # verify the required parameter 'rule_group_name' is set
  if @api_client.config.client_side_validation && rule_group_name.nil?
    raise ArgumentError, "Missing the required parameter 'rule_group_name' when calling ContentRuleApi.content_rules_rule_group_name_put"
  end
  # verify the required parameter 'rule_group' is set
  if @api_client.config.client_side_validation && rule_group.nil?
    raise ArgumentError, "Missing the required parameter 'rule_group' when calling ContentRuleApi.content_rules_rule_group_name_put"
  end
  # resource path
  local_var_path = '/services/{Web Application Name}/content-rules/{Rule Group Name}'.sub('{' + 'Web Application Name' + '}', web_application_name.to_s).sub('{' + 'Rule Group Name' + '}', rule_group_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] = authorization

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(rule_group)
  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: ContentRuleApi#content_rules_rule_group_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end