Class: OCI::Jms::Models::Proxies
- Inherits:
-
Object
- Object
- OCI::Jms::Models::Proxies
- Defined in:
- lib/oci/jms/models/proxies.rb
Overview
List of proxy properties to be configured in net.properties file.
Instance Attribute Summary collapse
-
#ftp_proxy_host ⇒ String
Ftp host to be set in net.properties file.
-
#ftp_proxy_port ⇒ Integer
Ftp port number to be set in net.properties file.
-
#http_proxy_host ⇒ String
Http host to be set in net.properties file.
-
#http_proxy_port ⇒ Integer
Http port number to be set in net.properties file.
-
#https_proxy_host ⇒ String
Https host to be set in net.properties file.
-
#https_proxy_port ⇒ Integer
Https port number to be set in net.properties file.
-
#socks_proxy_host ⇒ String
Socks host to be set in net.properties file.
-
#socks_proxy_port ⇒ Integer
Socks port number to be set in net.properties file.
-
#use_system_proxies ⇒ BOOLEAN
Sets "java.net.useSystemProxies=true" in net.properties when they exist.
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 = {}) ⇒ Proxies
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.
Constructor Details
#initialize(attributes = {}) ⇒ Proxies
Initializes the object
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/oci/jms/models/proxies.rb', line 106 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.use_system_proxies = attributes[:'useSystemProxies'] unless attributes[:'useSystemProxies'].nil? self.use_system_proxies = false if use_system_proxies.nil? && !attributes.key?(:'useSystemProxies') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :useSystemProxies and :use_system_proxies' if attributes.key?(:'useSystemProxies') && attributes.key?(:'use_system_proxies') self.use_system_proxies = attributes[:'use_system_proxies'] unless attributes[:'use_system_proxies'].nil? self.use_system_proxies = false if use_system_proxies.nil? && !attributes.key?(:'useSystemProxies') && !attributes.key?(:'use_system_proxies') # rubocop:disable Style/StringLiterals self.http_proxy_host = attributes[:'httpProxyHost'] if attributes[:'httpProxyHost'] raise 'You cannot provide both :httpProxyHost and :http_proxy_host' if attributes.key?(:'httpProxyHost') && attributes.key?(:'http_proxy_host') self.http_proxy_host = attributes[:'http_proxy_host'] if attributes[:'http_proxy_host'] self.http_proxy_port = attributes[:'httpProxyPort'] if attributes[:'httpProxyPort'] raise 'You cannot provide both :httpProxyPort and :http_proxy_port' if attributes.key?(:'httpProxyPort') && attributes.key?(:'http_proxy_port') self.http_proxy_port = attributes[:'http_proxy_port'] if attributes[:'http_proxy_port'] self.https_proxy_host = attributes[:'httpsProxyHost'] if attributes[:'httpsProxyHost'] raise 'You cannot provide both :httpsProxyHost and :https_proxy_host' if attributes.key?(:'httpsProxyHost') && attributes.key?(:'https_proxy_host') self.https_proxy_host = attributes[:'https_proxy_host'] if attributes[:'https_proxy_host'] self.https_proxy_port = attributes[:'httpsProxyPort'] if attributes[:'httpsProxyPort'] raise 'You cannot provide both :httpsProxyPort and :https_proxy_port' if attributes.key?(:'httpsProxyPort') && attributes.key?(:'https_proxy_port') self.https_proxy_port = attributes[:'https_proxy_port'] if attributes[:'https_proxy_port'] self.ftp_proxy_host = attributes[:'ftpProxyHost'] if attributes[:'ftpProxyHost'] raise 'You cannot provide both :ftpProxyHost and :ftp_proxy_host' if attributes.key?(:'ftpProxyHost') && attributes.key?(:'ftp_proxy_host') self.ftp_proxy_host = attributes[:'ftp_proxy_host'] if attributes[:'ftp_proxy_host'] self.ftp_proxy_port = attributes[:'ftpProxyPort'] if attributes[:'ftpProxyPort'] raise 'You cannot provide both :ftpProxyPort and :ftp_proxy_port' if attributes.key?(:'ftpProxyPort') && attributes.key?(:'ftp_proxy_port') self.ftp_proxy_port = attributes[:'ftp_proxy_port'] if attributes[:'ftp_proxy_port'] self.socks_proxy_host = attributes[:'socksProxyHost'] if attributes[:'socksProxyHost'] raise 'You cannot provide both :socksProxyHost and :socks_proxy_host' if attributes.key?(:'socksProxyHost') && attributes.key?(:'socks_proxy_host') self.socks_proxy_host = attributes[:'socks_proxy_host'] if attributes[:'socks_proxy_host'] self.socks_proxy_port = attributes[:'socksProxyPort'] if attributes[:'socksProxyPort'] raise 'You cannot provide both :socksProxyPort and :socks_proxy_port' if attributes.key?(:'socksProxyPort') && attributes.key?(:'socks_proxy_port') self.socks_proxy_port = attributes[:'socks_proxy_port'] if attributes[:'socks_proxy_port'] end |
Instance Attribute Details
#ftp_proxy_host ⇒ String
Ftp host to be set in net.properties file.
40 41 42 |
# File 'lib/oci/jms/models/proxies.rb', line 40 def ftp_proxy_host @ftp_proxy_host end |
#ftp_proxy_port ⇒ Integer
Ftp port number to be set in net.properties file.
45 46 47 |
# File 'lib/oci/jms/models/proxies.rb', line 45 def ftp_proxy_port @ftp_proxy_port end |
#http_proxy_host ⇒ String
Http host to be set in net.properties file.
20 21 22 |
# File 'lib/oci/jms/models/proxies.rb', line 20 def http_proxy_host @http_proxy_host end |
#http_proxy_port ⇒ Integer
Http port number to be set in net.properties file.
25 26 27 |
# File 'lib/oci/jms/models/proxies.rb', line 25 def http_proxy_port @http_proxy_port end |
#https_proxy_host ⇒ String
Https host to be set in net.properties file.
30 31 32 |
# File 'lib/oci/jms/models/proxies.rb', line 30 def https_proxy_host @https_proxy_host end |
#https_proxy_port ⇒ Integer
Https port number to be set in net.properties file.
35 36 37 |
# File 'lib/oci/jms/models/proxies.rb', line 35 def https_proxy_port @https_proxy_port end |
#socks_proxy_host ⇒ String
Socks host to be set in net.properties file.
50 51 52 |
# File 'lib/oci/jms/models/proxies.rb', line 50 def socks_proxy_host @socks_proxy_host end |
#socks_proxy_port ⇒ Integer
Socks port number to be set in net.properties file.
55 56 57 |
# File 'lib/oci/jms/models/proxies.rb', line 55 def socks_proxy_port @socks_proxy_port end |
#use_system_proxies ⇒ BOOLEAN
Sets "java.net.useSystemProxies=true" in net.properties when they exist.
15 16 17 |
# File 'lib/oci/jms/models/proxies.rb', line 15 def use_system_proxies @use_system_proxies end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/jms/models/proxies.rb', line 58 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'use_system_proxies': :'useSystemProxies', 'http_proxy_host': :'httpProxyHost', 'http_proxy_port': :'httpProxyPort', 'https_proxy_host': :'httpsProxyHost', 'https_proxy_port': :'httpsProxyPort', 'ftp_proxy_host': :'ftpProxyHost', 'ftp_proxy_port': :'ftpProxyPort', 'socks_proxy_host': :'socksProxyHost', 'socks_proxy_port': :'socksProxyPort' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/jms/models/proxies.rb', line 75 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'use_system_proxies': :'BOOLEAN', 'http_proxy_host': :'String', 'http_proxy_port': :'Integer', 'https_proxy_host': :'String', 'https_proxy_port': :'Integer', 'ftp_proxy_host': :'String', 'ftp_proxy_port': :'Integer', 'socks_proxy_host': :'String', 'socks_proxy_port': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/oci/jms/models/proxies.rb', line 176 def ==(other) return true if equal?(other) self.class == other.class && use_system_proxies == other.use_system_proxies && http_proxy_host == other.http_proxy_host && http_proxy_port == other.http_proxy_port && https_proxy_host == other.https_proxy_host && https_proxy_port == other.https_proxy_port && ftp_proxy_host == other.ftp_proxy_host && ftp_proxy_port == other.ftp_proxy_port && socks_proxy_host == other.socks_proxy_host && socks_proxy_port == other.socks_proxy_port end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/jms/models/proxies.rb', line 214 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
194 195 196 |
# File 'lib/oci/jms/models/proxies.rb', line 194 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
203 204 205 |
# File 'lib/oci/jms/models/proxies.rb', line 203 def hash [use_system_proxies, http_proxy_host, http_proxy_port, https_proxy_host, https_proxy_port, ftp_proxy_host, ftp_proxy_port, socks_proxy_host, socks_proxy_port].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/jms/models/proxies.rb', line 247 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
241 242 243 |
# File 'lib/oci/jms/models/proxies.rb', line 241 def to_s to_hash.to_s end |