Class: MockServer::ControlApi
- Inherits:
-
Object
- Object
- MockServer::ControlApi
- Defined in:
- lib/mockserver-client/api/control_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#bind_put(ports, opts = {}) ⇒ Ports
bind additional listening ports only supported on Netty version.
-
#bind_put_with_http_info(ports, opts = {}) ⇒ Array<(Ports, Fixnum, Hash)>
bind additional listening ports only supported on Netty version.
-
#clear_put(opts = {}) ⇒ nil
clears expectations and recorded requests that match the request matcher.
-
#clear_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
clears expectations and recorded requests that match the request matcher.
-
#initialize(api_client = ApiClient.default) ⇒ ControlApi
constructor
A new instance of ControlApi.
-
#reset_put(opts = {}) ⇒ nil
clears all expectations and recorded requests.
-
#reset_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
clears all expectations and recorded requests.
-
#retrieve_put(opts = {}) ⇒ Object
retrieve recorded requests, active expectations, recorded expectations or log messages.
-
#retrieve_put_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
retrieve recorded requests, active expectations, recorded expectations or log messages.
-
#status_put(opts = {}) ⇒ Ports
return listening ports.
-
#status_put_with_http_info(opts = {}) ⇒ Array<(Ports, Fixnum, Hash)>
return listening ports.
-
#stop_put(opts = {}) ⇒ nil
stop running process only supported on Netty version.
-
#stop_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
stop running process only supported on Netty version.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ControlApi
Returns a new instance of ControlApi.
19 20 21 |
# File 'lib/mockserver-client/api/control_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/mockserver-client/api/control_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#bind_put(ports, opts = {}) ⇒ Ports
bind additional listening ports only supported on Netty version
27 28 29 30 |
# File 'lib/mockserver-client/api/control_api.rb', line 27 def bind_put(ports, opts = {}) data, _status_code, _headers = bind_put_with_http_info(ports, opts) data end |
#bind_put_with_http_info(ports, opts = {}) ⇒ Array<(Ports, Fixnum, Hash)>
bind additional listening ports only supported on Netty version
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 |
# File 'lib/mockserver-client/api/control_api.rb', line 37 def bind_put_with_http_info(ports, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ControlApi.bind_put ...' end # verify the required parameter 'ports' is set if @api_client.config.client_side_validation && ports.nil? fail ArgumentError, "Missing the required parameter 'ports' when calling ControlApi.bind_put" end # resource path local_var_path = 'mockserver/bind' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(ports) 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, :return_type => 'Ports') if @api_client.config.debugging @api_client.config.logger.debug "API called: ControlApi#bind_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clear_put(opts = {}) ⇒ nil
clears expectations and recorded requests that match the request matcher
81 82 83 84 |
# File 'lib/mockserver-client/api/control_api.rb', line 81 def clear_put(opts = {}) clear_put_with_http_info(opts) nil end |
#clear_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
clears expectations and recorded requests that match the request matcher
90 91 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 |
# File 'lib/mockserver-client/api/control_api.rb', line 90 def clear_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ControlApi.clear_put ...' end # resource path local_var_path = 'mockserver/clear' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'http_request']) 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: ControlApi#clear_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reset_put(opts = {}) ⇒ nil
clears all expectations and recorded requests
126 127 128 129 |
# File 'lib/mockserver-client/api/control_api.rb', line 126 def reset_put(opts = {}) reset_put_with_http_info(opts) nil end |
#reset_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
clears all expectations and recorded requests
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 |
# File 'lib/mockserver-client/api/control_api.rb', line 134 def reset_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ControlApi.reset_put ...' end # resource path local_var_path = 'mockserver/reset' # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil 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: ControlApi#reset_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_put(opts = {}) ⇒ Object
retrieve recorded requests, active expectations, recorded expectations or log messages
171 172 173 174 |
# File 'lib/mockserver-client/api/control_api.rb', line 171 def retrieve_put(opts = {}) data, _status_code, _headers = retrieve_put_with_http_info(opts) data end |
#retrieve_put_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
retrieve recorded requests, active expectations, recorded expectations or log messages
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/mockserver-client/api/control_api.rb', line 182 def retrieve_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ControlApi.retrieve_put ...' end if @api_client.config.client_side_validation && opts[:'format'] && !['java', 'json'].include?(opts[:'format']) fail ArgumentError, 'invalid value for "format", must be one of java, json' end if @api_client.config.client_side_validation && opts[:'type'] && !['logs', 'requests', 'recorded_expectations', 'active_expectations'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of logs, requests, recorded_expectations, active_expectations' end # resource path local_var_path = 'mockserver/retrieve' # query parameters query_params = {} query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/java', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'http_request']) 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, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ControlApi#retrieve_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#status_put(opts = {}) ⇒ Ports
return listening ports
229 230 231 232 |
# File 'lib/mockserver-client/api/control_api.rb', line 229 def status_put(opts = {}) data, _status_code, _headers = status_put_with_http_info(opts) data end |
#status_put_with_http_info(opts = {}) ⇒ Array<(Ports, Fixnum, Hash)>
return listening ports
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 |
# File 'lib/mockserver-client/api/control_api.rb', line 237 def status_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ControlApi.status_put ...' end # resource path local_var_path = 'mockserver/status' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil 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, :return_type => 'Ports') if @api_client.config.debugging @api_client.config.logger.debug "API called: ControlApi#status_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#stop_put(opts = {}) ⇒ nil
stop running process only supported on Netty version
275 276 277 278 |
# File 'lib/mockserver-client/api/control_api.rb', line 275 def stop_put(opts = {}) stop_put_with_http_info(opts) nil end |
#stop_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
stop running process only supported on Netty version
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 |
# File 'lib/mockserver-client/api/control_api.rb', line 284 def stop_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ControlApi.stop_put ...' end # resource path local_var_path = 'mockserver/stop' # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil 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: ControlApi#stop_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |