Class: OCI::Apigateway::Models::HTTPBackend
- Inherits:
- 
      ApiSpecificationRouteBackend
      
        - Object
- ApiSpecificationRouteBackend
- OCI::Apigateway::Models::HTTPBackend
 
- Defined in:
- lib/oci/apigateway/models/http_backend.rb
Overview
Send the request to an HTTP backend.
Constant Summary
Constants inherited from ApiSpecificationRouteBackend
ApiSpecificationRouteBackend::TYPE_ENUM
Instance Attribute Summary collapse
- 
  
    
      #connect_timeout_in_seconds  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Defines a timeout for establishing a connection with a proxied server. 
- 
  
    
      #is_ssl_verify_disabled  ⇒ BOOLEAN 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Defines whether or not to uphold SSL verification. 
- 
  
    
      #read_timeout_in_seconds  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Defines a timeout for reading a response from the proxied server. 
- 
  
    
      #send_timeout_in_seconds  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Defines a timeout for transmitting a request to the proxied server. 
- 
  
    
      #url  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    This attribute is required. 
Attributes inherited from ApiSpecificationRouteBackend
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute mapping from ruby-style variable name to JSON key. 
- 
  
    
      .swagger_types  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute type mapping. 
Instance Method Summary collapse
- 
  
    
      #==(other)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Checks equality by comparing each attribute. 
- 
  
    
      #build_from_hash(attributes)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Builds the object from hash. 
- #eql?(other) ⇒ Boolean
- 
  
    
      #hash  ⇒ Fixnum 
    
    
  
  
  
  
  
  
  
  
  
    Calculates hash code according to all attributes. 
- 
  
    
      #initialize(attributes = {})  ⇒ HTTPBackend 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initializes the object. 
- 
  
    
      #to_hash  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    Returns the object in the form of hash. 
- 
  
    
      #to_s  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Returns the string representation of the object. 
Methods inherited from ApiSpecificationRouteBackend
Constructor Details
#initialize(attributes = {}) ⇒ HTTPBackend
Initializes the object
| 76 77 78 79 80 81 82 83 84 85 86 87 88 89 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 | # File 'lib/oci/apigateway/models/http_backend.rb', line 76 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'HTTP_BACKEND' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.url = attributes[:'url'] if attributes[:'url'] self.connect_timeout_in_seconds = attributes[:'connectTimeoutInSeconds'] if attributes[:'connectTimeoutInSeconds'] self.connect_timeout_in_seconds = 60.0 if connect_timeout_in_seconds.nil? && !attributes.key?(:'connectTimeoutInSeconds') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :connectTimeoutInSeconds and :connect_timeout_in_seconds' if attributes.key?(:'connectTimeoutInSeconds') && attributes.key?(:'connect_timeout_in_seconds') self.connect_timeout_in_seconds = attributes[:'connect_timeout_in_seconds'] if attributes[:'connect_timeout_in_seconds'] self.connect_timeout_in_seconds = 60.0 if connect_timeout_in_seconds.nil? && !attributes.key?(:'connectTimeoutInSeconds') && !attributes.key?(:'connect_timeout_in_seconds') # rubocop:disable Style/StringLiterals self.read_timeout_in_seconds = attributes[:'readTimeoutInSeconds'] if attributes[:'readTimeoutInSeconds'] self.read_timeout_in_seconds = 10.0 if read_timeout_in_seconds.nil? && !attributes.key?(:'readTimeoutInSeconds') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :readTimeoutInSeconds and :read_timeout_in_seconds' if attributes.key?(:'readTimeoutInSeconds') && attributes.key?(:'read_timeout_in_seconds') self.read_timeout_in_seconds = attributes[:'read_timeout_in_seconds'] if attributes[:'read_timeout_in_seconds'] self.read_timeout_in_seconds = 10.0 if read_timeout_in_seconds.nil? && !attributes.key?(:'readTimeoutInSeconds') && !attributes.key?(:'read_timeout_in_seconds') # rubocop:disable Style/StringLiterals self.send_timeout_in_seconds = attributes[:'sendTimeoutInSeconds'] if attributes[:'sendTimeoutInSeconds'] self.send_timeout_in_seconds = 10.0 if send_timeout_in_seconds.nil? && !attributes.key?(:'sendTimeoutInSeconds') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :sendTimeoutInSeconds and :send_timeout_in_seconds' if attributes.key?(:'sendTimeoutInSeconds') && attributes.key?(:'send_timeout_in_seconds') self.send_timeout_in_seconds = attributes[:'send_timeout_in_seconds'] if attributes[:'send_timeout_in_seconds'] self.send_timeout_in_seconds = 10.0 if send_timeout_in_seconds.nil? && !attributes.key?(:'sendTimeoutInSeconds') && !attributes.key?(:'send_timeout_in_seconds') # rubocop:disable Style/StringLiterals self.is_ssl_verify_disabled = attributes[:'isSslVerifyDisabled'] unless attributes[:'isSslVerifyDisabled'].nil? self.is_ssl_verify_disabled = false if is_ssl_verify_disabled.nil? && !attributes.key?(:'isSslVerifyDisabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSslVerifyDisabled and :is_ssl_verify_disabled' if attributes.key?(:'isSslVerifyDisabled') && attributes.key?(:'is_ssl_verify_disabled') self.is_ssl_verify_disabled = attributes[:'is_ssl_verify_disabled'] unless attributes[:'is_ssl_verify_disabled'].nil? self.is_ssl_verify_disabled = false if is_ssl_verify_disabled.nil? && !attributes.key?(:'isSslVerifyDisabled') && !attributes.key?(:'is_ssl_verify_disabled') # rubocop:disable Style/StringLiterals end | 
Instance Attribute Details
#connect_timeout_in_seconds ⇒ Float
Defines a timeout for establishing a connection with a proxied server.
| 20 21 22 | # File 'lib/oci/apigateway/models/http_backend.rb', line 20 def connect_timeout_in_seconds @connect_timeout_in_seconds end | 
#is_ssl_verify_disabled ⇒ BOOLEAN
Defines whether or not to uphold SSL verification.
| 35 36 37 | # File 'lib/oci/apigateway/models/http_backend.rb', line 35 def is_ssl_verify_disabled @is_ssl_verify_disabled end | 
#read_timeout_in_seconds ⇒ Float
Defines a timeout for reading a response from the proxied server.
| 25 26 27 | # File 'lib/oci/apigateway/models/http_backend.rb', line 25 def read_timeout_in_seconds @read_timeout_in_seconds end | 
#send_timeout_in_seconds ⇒ Float
Defines a timeout for transmitting a request to the proxied server.
| 30 31 32 | # File 'lib/oci/apigateway/models/http_backend.rb', line 30 def send_timeout_in_seconds @send_timeout_in_seconds end | 
#url ⇒ String
This attribute is required.
| 15 16 17 | # File 'lib/oci/apigateway/models/http_backend.rb', line 15 def url @url end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 38 39 40 41 42 43 44 45 46 47 48 49 | # File 'lib/oci/apigateway/models/http_backend.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'url': :'url', 'connect_timeout_in_seconds': :'connectTimeoutInSeconds', 'read_timeout_in_seconds': :'readTimeoutInSeconds', 'send_timeout_in_seconds': :'sendTimeoutInSeconds', 'is_ssl_verify_disabled': :'isSslVerifyDisabled' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 52 53 54 55 56 57 58 59 60 61 62 63 | # File 'lib/oci/apigateway/models/http_backend.rb', line 52 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'url': :'String', 'connect_timeout_in_seconds': :'Float', 'read_timeout_in_seconds': :'Float', 'send_timeout_in_seconds': :'Float', 'is_ssl_verify_disabled': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 128 129 130 131 132 133 134 135 136 137 138 | # File 'lib/oci/apigateway/models/http_backend.rb', line 128 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && url == other.url && connect_timeout_in_seconds == other.connect_timeout_in_seconds && read_timeout_in_seconds == other.read_timeout_in_seconds && send_timeout_in_seconds == other.send_timeout_in_seconds && is_ssl_verify_disabled == other.is_ssl_verify_disabled end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | # File 'lib/oci/apigateway/models/http_backend.rb', line 163 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end | 
#eql?(other) ⇒ Boolean
| 143 144 145 | # File 'lib/oci/apigateway/models/http_backend.rb', line 143 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 152 153 154 | # File 'lib/oci/apigateway/models/http_backend.rb', line 152 def hash [type, url, connect_timeout_in_seconds, read_timeout_in_seconds, send_timeout_in_seconds, is_ssl_verify_disabled].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 196 197 198 199 200 201 202 203 204 205 | # File 'lib/oci/apigateway/models/http_backend.rb', line 196 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end | 
#to_s ⇒ String
Returns the string representation of the object
| 190 191 192 | # File 'lib/oci/apigateway/models/http_backend.rb', line 190 def to_s to_hash.to_s end |