Class: EmassClient::SystemRolesApi
- Inherits:
-
Object
- Object
- EmassClient::SystemRolesApi
- Defined in:
- lib/emass_client/api/system_roles_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_system_roles(opts = {}) ⇒ SystemRolesResponse
Get available roles Returns all available roles.
-
#get_system_roles_by_category_id(role_category, role, opts = {}) ⇒ SystemRolesCategoryResponse
Get system roles Returns the role(s) data matching parameters.
-
#get_system_roles_by_category_id_with_http_info(role_category, role, opts = {}) ⇒ Array<(SystemRolesCategoryResponse, Integer, Hash)>
Get system roles Returns the role(s) data matching parameters.
-
#get_system_roles_with_http_info(opts = {}) ⇒ Array<(SystemRolesResponse, Integer, Hash)>
Get available roles Returns all available roles.
-
#initialize(api_client = ApiClient.default) ⇒ SystemRolesApi
constructor
A new instance of SystemRolesApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SystemRolesApi
Returns a new instance of SystemRolesApi.
19 20 21 |
# File 'lib/emass_client/api/system_roles_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/emass_client/api/system_roles_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_system_roles(opts = {}) ⇒ SystemRolesResponse
Get available roles Returns all available roles
26 27 28 29 |
# File 'lib/emass_client/api/system_roles_api.rb', line 26 def get_system_roles(opts = {}) data, _status_code, _headers = get_system_roles_with_http_info(opts) data end |
#get_system_roles_by_category_id(role_category, role, opts = {}) ⇒ SystemRolesCategoryResponse
Get system roles Returns the role(s) data matching parameters.
87 88 89 90 |
# File 'lib/emass_client/api/system_roles_api.rb', line 87 def get_system_roles_by_category_id(role_category, role, opts = {}) data, _status_code, _headers = get_system_roles_by_category_id_with_http_info(role_category, role, opts) data end |
#get_system_roles_by_category_id_with_http_info(role_category, role, opts = {}) ⇒ Array<(SystemRolesCategoryResponse, Integer, Hash)>
Get system roles Returns the role(s) data matching parameters.
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/emass_client/api/system_roles_api.rb', line 100 def get_system_roles_by_category_id_with_http_info(role_category, role, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SystemRolesApi.get_system_roles_by_category_id ...' end # verify the required parameter 'role_category' is set if @api_client.config.client_side_validation && role_category.nil? fail ArgumentError, "Missing the required parameter 'role_category' when calling SystemRolesApi.get_system_roles_by_category_id" end # verify enum value allowable_values = ["CAC", "PAC", "Other", "unknown_default_open_api"] if @api_client.config.client_side_validation && !allowable_values.include?(role_category) fail ArgumentError, "invalid value for \"role_category\", must be one of #{allowable_values}" end # verify the required parameter 'role' is set if @api_client.config.client_side_validation && role.nil? fail ArgumentError, "Missing the required parameter 'role' when calling SystemRolesApi.get_system_roles_by_category_id" end # verify enum value allowable_values = ["AO", "Auditor", "Artifact Manager", "C&A Team", "IAO", "ISSO", "PM/IAM", "SCA", "User Rep", "Validator", "unknown_default_open_api"] if @api_client.config.client_side_validation && !allowable_values.include?(role) fail ArgumentError, "invalid value for \"role\", must be one of #{allowable_values}" end allowable_values = ["diacap", "rmf", "reporting", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'policy'] && !allowable_values.include?(opts[:'policy']) fail ArgumentError, "invalid value for \"policy\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/system-roles/{roleCategory}'.sub('{' + 'roleCategory' + '}', CGI.escape(role_category.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'role'] = role query_params[:'policy'] = opts[:'policy'] if !opts[:'policy'].nil? query_params[:'includeDecommissioned'] = opts[:'include_decommissioned'] if !opts[:'include_decommissioned'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SystemRolesCategoryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId'] = opts.merge( :operation => :"SystemRolesApi.get_system_roles_by_category_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SystemRolesApi#get_system_roles_by_category_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_system_roles_with_http_info(opts = {}) ⇒ Array<(SystemRolesResponse, Integer, Hash)>
Get available roles Returns all available roles
35 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 74 75 76 77 |
# File 'lib/emass_client/api/system_roles_api.rb', line 35 def get_system_roles_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SystemRolesApi.get_system_roles ...' end # resource path local_var_path = '/api/system-roles' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SystemRolesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId'] = opts.merge( :operation => :"SystemRolesApi.get_system_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SystemRolesApi#get_system_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |