=begin #IronFunctions #The open source serverless platform. OpenAPI spec version: 0.1.29 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.2.3 =end require "uri" module OracleFunctions class RoutesApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Get route list by app name. # This will list routes for a particular app. # @param app Name of app for this set of routes. # @param [Hash] opts the optional parameters # @return [RoutesWrapper] def apps_app_routes_get(app, opts = {}) data, _status_code, _headers = apps_app_routes_get_with_http_info(app, opts) return data end # Get route list by app name. # This will list routes for a particular app. # @param app Name of app for this set of routes. # @param [Hash] opts the optional parameters # @return [Array<(RoutesWrapper, Fixnum, Hash)>] RoutesWrapper data, response status code and response headers def apps_app_routes_get_with_http_info(app, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_get ..." end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_get" end # resource path local_var_path = "/apps/{app}/routes".sub('{' + 'app' + '}', app.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']) # 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 = 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, :return_type => 'RoutesWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create new Route # Create a new route in an app, if app doesn't exists, it creates the app # @param app name of the app. # @param body One route to post. # @param [Hash] opts the optional parameters # @return [RouteWrapper] def apps_app_routes_post(app, body, opts = {}) data, _status_code, _headers = apps_app_routes_post_with_http_info(app, body, opts) return data end # Create new Route # Create a new route in an app, if app doesn't exists, it creates the app # @param app name of the app. # @param body One route to post. # @param [Hash] opts the optional parameters # @return [Array<(RouteWrapper, Fixnum, Hash)>] RouteWrapper data, response status code and response headers def apps_app_routes_post_with_http_info(app, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_post ..." end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling RoutesApi.apps_app_routes_post" end # resource path local_var_path = "/apps/{app}/routes".sub('{' + 'app' + '}', app.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']) # 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(body) 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, :return_type => 'RouteWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes the route # Deletes the route. # @param app Name of app for this set of routes. # @param route Route name # @param [Hash] opts the optional parameters # @return [nil] def apps_app_routes_route_delete(app, route, opts = {}) apps_app_routes_route_delete_with_http_info(app, route, opts) return nil end # Deletes the route # Deletes the route. # @param app Name of app for this set of routes. # @param route Route name # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def apps_app_routes_route_delete_with_http_info(app, route, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_route_delete ..." end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_route_delete" end # verify the required parameter 'route' is set if @api_client.config.client_side_validation && route.nil? fail ArgumentError, "Missing the required parameter 'route' when calling RoutesApi.apps_app_routes_route_delete" end # resource path local_var_path = "/apps/{app}/routes/{route}".sub('{' + 'app' + '}', app.to_s).sub('{' + 'route' + '}', route.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']) # 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 = 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: RoutesApi#apps_app_routes_route_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets route by name # Gets a route by name. # @param app Name of app for this set of routes. # @param route Route name # @param [Hash] opts the optional parameters # @return [RouteWrapper] def apps_app_routes_route_get(app, route, opts = {}) data, _status_code, _headers = apps_app_routes_route_get_with_http_info(app, route, opts) return data end # Gets route by name # Gets a route by name. # @param app Name of app for this set of routes. # @param route Route name # @param [Hash] opts the optional parameters # @return [Array<(RouteWrapper, Fixnum, Hash)>] RouteWrapper data, response status code and response headers def apps_app_routes_route_get_with_http_info(app, route, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_route_get ..." end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_route_get" end # verify the required parameter 'route' is set if @api_client.config.client_side_validation && route.nil? fail ArgumentError, "Missing the required parameter 'route' when calling RoutesApi.apps_app_routes_route_get" end # resource path local_var_path = "/apps/{app}/routes/{route}".sub('{' + 'app' + '}', app.to_s).sub('{' + 'route' + '}', route.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']) # 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 = 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, :return_type => 'RouteWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_route_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a Route # Update a route # @param app name of the app. # @param route route path. # @param body One route to post. # @param [Hash] opts the optional parameters # @return [RouteWrapper] def apps_app_routes_route_patch(app, route, body, opts = {}) data, _status_code, _headers = apps_app_routes_route_patch_with_http_info(app, route, body, opts) return data end # Update a Route # Update a route # @param app name of the app. # @param route route path. # @param body One route to post. # @param [Hash] opts the optional parameters # @return [Array<(RouteWrapper, Fixnum, Hash)>] RouteWrapper data, response status code and response headers def apps_app_routes_route_patch_with_http_info(app, route, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_route_patch ..." end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_route_patch" end # verify the required parameter 'route' is set if @api_client.config.client_side_validation && route.nil? fail ArgumentError, "Missing the required parameter 'route' when calling RoutesApi.apps_app_routes_route_patch" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling RoutesApi.apps_app_routes_route_patch" end # resource path local_var_path = "/apps/{app}/routes/{route}".sub('{' + 'app' + '}', app.to_s).sub('{' + 'route' + '}', route.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']) # 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(body) auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RouteWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_route_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end