oraclebmc 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +220 -0
- data/lib/oraclebmc/api_client.rb +349 -0
- data/lib/oraclebmc/config.rb +80 -0
- data/lib/oraclebmc/config_file_loader.rb +85 -0
- data/lib/oraclebmc/core/blockstorage_client.rb +459 -0
- data/lib/oraclebmc/core/compute_client.rb +1053 -0
- data/lib/oraclebmc/core/core.rb +82 -0
- data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +179 -0
- data/lib/oraclebmc/core/models/attach_volume_details.rb +206 -0
- data/lib/oraclebmc/core/models/capture_console_history_details.rb +162 -0
- data/lib/oraclebmc/core/models/console_history.rb +252 -0
- data/lib/oraclebmc/core/models/cpe.rb +209 -0
- data/lib/oraclebmc/core/models/create_cpe_details.rb +187 -0
- data/lib/oraclebmc/core/models/create_dhcp_details.rb +195 -0
- data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +184 -0
- data/lib/oraclebmc/core/models/create_drg_details.rb +173 -0
- data/lib/oraclebmc/core/models/create_image_details.rb +188 -0
- data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +195 -0
- data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +210 -0
- data/lib/oraclebmc/core/models/create_route_table_details.rb +195 -0
- data/lib/oraclebmc/core/models/create_security_list_details.rb +206 -0
- data/lib/oraclebmc/core/models/create_subnet_details.rb +253 -0
- data/lib/oraclebmc/core/models/create_vcn_details.rb +187 -0
- data/lib/oraclebmc/core/models/create_volume_backup_details.rb +173 -0
- data/lib/oraclebmc/core/models/create_volume_details.rb +211 -0
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +203 -0
- data/lib/oraclebmc/core/models/dhcp_option.rb +171 -0
- data/lib/oraclebmc/core/models/dhcp_options.rb +246 -0
- data/lib/oraclebmc/core/models/drg.rb +224 -0
- data/lib/oraclebmc/core/models/drg_attachment.rb +246 -0
- data/lib/oraclebmc/core/models/egress_security_rule.rb +240 -0
- data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +254 -0
- data/lib/oraclebmc/core/models/icmp_options.rb +173 -0
- data/lib/oraclebmc/core/models/image.rb +282 -0
- data/lib/oraclebmc/core/models/ingress_security_rule.rb +240 -0
- data/lib/oraclebmc/core/models/instance.rb +326 -0
- data/lib/oraclebmc/core/models/internet_gateway.rb +248 -0
- data/lib/oraclebmc/core/models/ip_sec_connection.rb +261 -0
- data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +195 -0
- data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +198 -0
- data/lib/oraclebmc/core/models/launch_instance_details.rb +327 -0
- data/lib/oraclebmc/core/models/port_range.rb +175 -0
- data/lib/oraclebmc/core/models/route_rule.rb +177 -0
- data/lib/oraclebmc/core/models/route_table.rb +246 -0
- data/lib/oraclebmc/core/models/security_list.rb +257 -0
- data/lib/oraclebmc/core/models/shape.rb +164 -0
- data/lib/oraclebmc/core/models/subnet.rb +325 -0
- data/lib/oraclebmc/core/models/tcp_options.rb +177 -0
- data/lib/oraclebmc/core/models/tunnel_config.rb +193 -0
- data/lib/oraclebmc/core/models/tunnel_status.rb +218 -0
- data/lib/oraclebmc/core/models/udp_options.rb +177 -0
- data/lib/oraclebmc/core/models/update_cpe_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_dhcp_details.rb +172 -0
- data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_drg_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_image_details.rb +165 -0
- data/lib/oraclebmc/core/models/update_instance_details.rb +165 -0
- data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +173 -0
- data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_route_table_details.rb +173 -0
- data/lib/oraclebmc/core/models/update_security_list_details.rb +184 -0
- data/lib/oraclebmc/core/models/update_subnet_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_vcn_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_volume_backup_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_volume_details.rb +163 -0
- data/lib/oraclebmc/core/models/vcn.rb +272 -0
- data/lib/oraclebmc/core/models/vnic.rb +274 -0
- data/lib/oraclebmc/core/models/vnic_attachment.rb +271 -0
- data/lib/oraclebmc/core/models/volume.rb +249 -0
- data/lib/oraclebmc/core/models/volume_attachment.rb +284 -0
- data/lib/oraclebmc/core/models/volume_backup.rb +273 -0
- data/lib/oraclebmc/core/util.rb +1 -0
- data/lib/oraclebmc/core/virtual_network_client.rb +2263 -0
- data/lib/oraclebmc/errors.rb +62 -0
- data/lib/oraclebmc/global_context.rb +21 -0
- data/lib/oraclebmc/identity/identity.rb +38 -0
- data/lib/oraclebmc/identity/identity_client.rb +1462 -0
- data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +173 -0
- data/lib/oraclebmc/identity/models/api_key.rb +251 -0
- data/lib/oraclebmc/identity/models/availability_domain.rb +173 -0
- data/lib/oraclebmc/identity/models/compartment.rb +251 -0
- data/lib/oraclebmc/identity/models/create_api_key_details.rb +162 -0
- data/lib/oraclebmc/identity/models/create_compartment_details.rb +187 -0
- data/lib/oraclebmc/identity/models/create_group_details.rb +186 -0
- data/lib/oraclebmc/identity/models/create_policy_details.rb +215 -0
- data/lib/oraclebmc/identity/models/create_swift_password_details.rb +163 -0
- data/lib/oraclebmc/identity/models/create_user_details.rb +186 -0
- data/lib/oraclebmc/identity/models/group.rb +251 -0
- data/lib/oraclebmc/identity/models/policy.rb +277 -0
- data/lib/oraclebmc/identity/models/swift_password.rb +266 -0
- data/lib/oraclebmc/identity/models/ui_password.rb +227 -0
- data/lib/oraclebmc/identity/models/update_compartment_details.rb +162 -0
- data/lib/oraclebmc/identity/models/update_group_details.rb +162 -0
- data/lib/oraclebmc/identity/models/update_policy_details.rb +190 -0
- data/lib/oraclebmc/identity/models/update_state_details.rb +163 -0
- data/lib/oraclebmc/identity/models/update_swift_password_details.rb +162 -0
- data/lib/oraclebmc/identity/models/update_user_details.rb +162 -0
- data/lib/oraclebmc/identity/models/user.rb +257 -0
- data/lib/oraclebmc/identity/models/user_group_membership.rb +249 -0
- data/lib/oraclebmc/identity/util.rb +1 -0
- data/lib/oraclebmc/load_balancer/load_balancer.rb +45 -0
- data/lib/oraclebmc/load_balancer/load_balancer_client.rb +1218 -0
- data/lib/oraclebmc/load_balancer/models/backend.rb +262 -0
- data/lib/oraclebmc/load_balancer/models/backend_details.rb +248 -0
- data/lib/oraclebmc/load_balancer/models/backend_set.rb +211 -0
- data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +197 -0
- data/lib/oraclebmc/load_balancer/models/certificate.rb +209 -0
- data/lib/oraclebmc/load_balancer/models/certificate_details.rb +245 -0
- data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +248 -0
- data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +210 -0
- data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +245 -0
- data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +216 -0
- data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +233 -0
- data/lib/oraclebmc/load_balancer/models/health_checker.rb +265 -0
- data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +264 -0
- data/lib/oraclebmc/load_balancer/models/ip_address.rb +165 -0
- data/lib/oraclebmc/load_balancer/models/listener.rb +216 -0
- data/lib/oraclebmc/load_balancer/models/listener_details.rb +202 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer.rb +296 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +162 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +162 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +162 -0
- data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +195 -0
- data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +195 -0
- data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +220 -0
- data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +197 -0
- data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +263 -0
- data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +202 -0
- data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +165 -0
- data/lib/oraclebmc/load_balancer/models/work_request.rb +269 -0
- data/lib/oraclebmc/load_balancer/models/work_request_error.rb +185 -0
- data/lib/oraclebmc/load_balancer/util.rb +55 -0
- data/lib/oraclebmc/regions.rb +41 -0
- data/lib/oraclebmc/response.rb +86 -0
- data/lib/oraclebmc/signer.rb +119 -0
- data/lib/oraclebmc/version.rb +5 -0
- data/lib/oraclebmc/waiter.rb +111 -0
- data/lib/oraclebmc.rb +20 -0
- metadata +265 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OracleBMC
|
|
6
|
+
class LoadBalancer::Models::UpdateHealthCheckerDetails
|
|
7
|
+
# The protocol the health check must use; either HTTP or TCP.
|
|
8
|
+
#
|
|
9
|
+
# Example: `HTTP`
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
attr_accessor :protocol
|
|
13
|
+
|
|
14
|
+
# The path against which to run the health check.
|
|
15
|
+
#
|
|
16
|
+
# Example: `/healthcheck`
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :url_path
|
|
20
|
+
|
|
21
|
+
# The backend server port against which to run the health check.
|
|
22
|
+
#
|
|
23
|
+
# Example: `8080`
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :port
|
|
27
|
+
|
|
28
|
+
# The status code a healthy backend server should return.
|
|
29
|
+
#
|
|
30
|
+
# Example: `200`
|
|
31
|
+
#
|
|
32
|
+
# @return [Integer]
|
|
33
|
+
attr_accessor :return_code
|
|
34
|
+
|
|
35
|
+
# The number of retries to attempt before a backend server is considered \"unhealthy\".
|
|
36
|
+
#
|
|
37
|
+
# Example: `3`
|
|
38
|
+
#
|
|
39
|
+
# @return [Integer]
|
|
40
|
+
attr_accessor :retries
|
|
41
|
+
|
|
42
|
+
# The maximum timeout in milliseconds before a retry.
|
|
43
|
+
#
|
|
44
|
+
# Example: `6000`
|
|
45
|
+
#
|
|
46
|
+
# @return [Integer]
|
|
47
|
+
attr_accessor :timeout_in_millis
|
|
48
|
+
|
|
49
|
+
# The interval between health checks, in milliseconds.
|
|
50
|
+
#
|
|
51
|
+
# Example: `30000`
|
|
52
|
+
#
|
|
53
|
+
# @return [Integer]
|
|
54
|
+
attr_accessor :interval_in_millis
|
|
55
|
+
|
|
56
|
+
# A regular expression for parsing the response body from the backend server.
|
|
57
|
+
#
|
|
58
|
+
# Example: `^(500|40[1348])$`
|
|
59
|
+
#
|
|
60
|
+
# @return [String]
|
|
61
|
+
attr_accessor :response_body_regex
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
return unless attributes.is_a?(Hash)
|
|
68
|
+
|
|
69
|
+
# convert string to symbol for hash key
|
|
70
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
if attributes[:'protocol']
|
|
74
|
+
self.protocol = attributes[:'protocol']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes[:'urlPath']
|
|
78
|
+
self.url_path = attributes[:'urlPath']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes[:'port']
|
|
82
|
+
self.port = attributes[:'port']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes[:'returnCode']
|
|
86
|
+
self.return_code = attributes[:'returnCode']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes[:'retries']
|
|
90
|
+
self.retries = attributes[:'retries']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes[:'timeoutInMillis']
|
|
94
|
+
self.timeout_in_millis = attributes[:'timeoutInMillis']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes[:'intervalInMillis']
|
|
98
|
+
self.interval_in_millis = attributes[:'intervalInMillis']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes[:'responseBodyRegex']
|
|
102
|
+
self.response_body_regex = attributes[:'responseBodyRegex']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Checks equality by comparing each attribute.
|
|
108
|
+
# @param [Object] other_object to be compared
|
|
109
|
+
def ==(other_object)
|
|
110
|
+
return true if self.equal?(other_object)
|
|
111
|
+
self.class == other_object.class &&
|
|
112
|
+
protocol == other_object.protocol &&
|
|
113
|
+
url_path == other_object.url_path &&
|
|
114
|
+
port == other_object.port &&
|
|
115
|
+
return_code == other_object.return_code &&
|
|
116
|
+
retries == other_object.retries &&
|
|
117
|
+
timeout_in_millis == other_object.timeout_in_millis &&
|
|
118
|
+
interval_in_millis == other_object.interval_in_millis &&
|
|
119
|
+
response_body_regex == other_object.response_body_regex
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param [Object] other_object to be compared
|
|
124
|
+
def eql?(other_object)
|
|
125
|
+
self == other_object
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Calculates hash code according to all attributes.
|
|
129
|
+
# @return [Fixnum] Hash code
|
|
130
|
+
def hash
|
|
131
|
+
[protocol, url_path, port, return_code, retries, timeout_in_millis, interval_in_millis, response_body_regex].hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Builds the object from hash
|
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
|
+
# @return [Object] Returns the model itself
|
|
137
|
+
def build_from_hash(attributes)
|
|
138
|
+
return nil unless attributes.is_a?(Hash)
|
|
139
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
140
|
+
if type =~ /^Array<(.*)>/i
|
|
141
|
+
# check to ensure the input is an array given that the the attribute
|
|
142
|
+
# is documented as an array but the input is not
|
|
143
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
144
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
145
|
+
end
|
|
146
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
147
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
148
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
self
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Returns the string representation of the object
|
|
155
|
+
# @return [String] String presentation of the object
|
|
156
|
+
def to_s
|
|
157
|
+
to_hash.to_s
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the object in the form of hash
|
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = self.send(attr)
|
|
166
|
+
next if value.nil?
|
|
167
|
+
hash[param] = _to_hash(value)
|
|
168
|
+
end
|
|
169
|
+
hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
private
|
|
173
|
+
|
|
174
|
+
# Outputs non-array value in the form of hash
|
|
175
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
176
|
+
# @param [Object] value Any valid value
|
|
177
|
+
# @return [Hash] Returns the value in the form of hash
|
|
178
|
+
def _to_hash(value)
|
|
179
|
+
if value.is_a?(Array)
|
|
180
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
181
|
+
elsif value.is_a?(Hash)
|
|
182
|
+
{}.tap do |hash|
|
|
183
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
184
|
+
end
|
|
185
|
+
elsif value.respond_to? :to_hash
|
|
186
|
+
value.to_hash
|
|
187
|
+
else
|
|
188
|
+
value
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Deserializes the data based on type
|
|
193
|
+
# @param [String] type Data type
|
|
194
|
+
# @param [String] value Value to be deserialized
|
|
195
|
+
# @return [Object] Deserialized data
|
|
196
|
+
def _deserialize(type, value)
|
|
197
|
+
case type.to_sym
|
|
198
|
+
when :DateTime
|
|
199
|
+
DateTime.parse(value)
|
|
200
|
+
when :Date
|
|
201
|
+
Date.parse(value)
|
|
202
|
+
when :String
|
|
203
|
+
value.to_s
|
|
204
|
+
when :Integer
|
|
205
|
+
value.to_i
|
|
206
|
+
when :Float
|
|
207
|
+
value.to_f
|
|
208
|
+
when :BOOLEAN
|
|
209
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
210
|
+
true
|
|
211
|
+
else
|
|
212
|
+
false
|
|
213
|
+
end
|
|
214
|
+
when :Object
|
|
215
|
+
# generic object (usually a Hash), return directly
|
|
216
|
+
value
|
|
217
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
218
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
219
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
220
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
221
|
+
k_type = Regexp.last_match[:k_type]
|
|
222
|
+
v_type = Regexp.last_match[:v_type]
|
|
223
|
+
{}.tap do |hash|
|
|
224
|
+
value.each do |k, v|
|
|
225
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
else # model
|
|
229
|
+
temp_model = OracleBMC.const_get(type.to_s).new
|
|
230
|
+
temp_model.build_from_hash(value)
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
236
|
+
def self.attribute_map
|
|
237
|
+
{
|
|
238
|
+
:'protocol' => :'protocol',
|
|
239
|
+
:'url_path' => :'urlPath',
|
|
240
|
+
:'port' => :'port',
|
|
241
|
+
:'return_code' => :'returnCode',
|
|
242
|
+
:'retries' => :'retries',
|
|
243
|
+
:'timeout_in_millis' => :'timeoutInMillis',
|
|
244
|
+
:'interval_in_millis' => :'intervalInMillis',
|
|
245
|
+
:'response_body_regex' => :'responseBodyRegex'
|
|
246
|
+
}
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Attribute type mapping.
|
|
250
|
+
def self.swagger_types
|
|
251
|
+
{
|
|
252
|
+
:'protocol' => :'String',
|
|
253
|
+
:'url_path' => :'String',
|
|
254
|
+
:'port' => :'Integer',
|
|
255
|
+
:'return_code' => :'Integer',
|
|
256
|
+
:'retries' => :'Integer',
|
|
257
|
+
:'timeout_in_millis' => :'Integer',
|
|
258
|
+
:'interval_in_millis' => :'Integer',
|
|
259
|
+
:'response_body_regex' => :'String'
|
|
260
|
+
}
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OracleBMC
|
|
6
|
+
class LoadBalancer::Models::UpdateListenerDetails
|
|
7
|
+
# The name of the associated backend set.
|
|
8
|
+
# @return [String]
|
|
9
|
+
attr_accessor :default_backend_set_name
|
|
10
|
+
|
|
11
|
+
# The communication port for the listener.
|
|
12
|
+
#
|
|
13
|
+
# Example: `80`
|
|
14
|
+
#
|
|
15
|
+
# @return [Integer]
|
|
16
|
+
attr_accessor :port
|
|
17
|
+
|
|
18
|
+
# The protocol on which the listener accepts connection requests.
|
|
19
|
+
# To get a list of valid protocols, use the {#list_protocols list_protocols}
|
|
20
|
+
# operation.
|
|
21
|
+
#
|
|
22
|
+
# Example: `HTTP`
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :protocol
|
|
26
|
+
|
|
27
|
+
# @return [OracleBMC::LoadBalancer::Models::SSLConfigurationDetails]
|
|
28
|
+
attr_accessor :ssl_configuration
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Initializes the object
|
|
32
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
33
|
+
def initialize(attributes = {})
|
|
34
|
+
return unless attributes.is_a?(Hash)
|
|
35
|
+
|
|
36
|
+
# convert string to symbol for hash key
|
|
37
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
if attributes[:'defaultBackendSetName']
|
|
41
|
+
self.default_backend_set_name = attributes[:'defaultBackendSetName']
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
if attributes[:'port']
|
|
45
|
+
self.port = attributes[:'port']
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
if attributes[:'protocol']
|
|
49
|
+
self.protocol = attributes[:'protocol']
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
if attributes[:'sslConfiguration']
|
|
53
|
+
self.ssl_configuration = attributes[:'sslConfiguration']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Checks equality by comparing each attribute.
|
|
59
|
+
# @param [Object] other_object to be compared
|
|
60
|
+
def ==(other_object)
|
|
61
|
+
return true if self.equal?(other_object)
|
|
62
|
+
self.class == other_object.class &&
|
|
63
|
+
default_backend_set_name == other_object.default_backend_set_name &&
|
|
64
|
+
port == other_object.port &&
|
|
65
|
+
protocol == other_object.protocol &&
|
|
66
|
+
ssl_configuration == other_object.ssl_configuration
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @see the `==` method
|
|
70
|
+
# @param [Object] other_object to be compared
|
|
71
|
+
def eql?(other_object)
|
|
72
|
+
self == other_object
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Calculates hash code according to all attributes.
|
|
76
|
+
# @return [Fixnum] Hash code
|
|
77
|
+
def hash
|
|
78
|
+
[default_backend_set_name, port, protocol, ssl_configuration].hash
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Builds the object from hash
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
# @return [Object] Returns the model itself
|
|
84
|
+
def build_from_hash(attributes)
|
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
|
86
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
87
|
+
if type =~ /^Array<(.*)>/i
|
|
88
|
+
# check to ensure the input is an array given that the the attribute
|
|
89
|
+
# is documented as an array but the input is not
|
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
92
|
+
end
|
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
94
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
self
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Returns the string representation of the object
|
|
102
|
+
# @return [String] String presentation of the object
|
|
103
|
+
def to_s
|
|
104
|
+
to_hash.to_s
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Returns the object in the form of hash
|
|
108
|
+
# @return [Hash] Returns the object in the form of hash
|
|
109
|
+
def to_hash
|
|
110
|
+
hash = {}
|
|
111
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
112
|
+
value = self.send(attr)
|
|
113
|
+
next if value.nil?
|
|
114
|
+
hash[param] = _to_hash(value)
|
|
115
|
+
end
|
|
116
|
+
hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
private
|
|
120
|
+
|
|
121
|
+
# Outputs non-array value in the form of hash
|
|
122
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
123
|
+
# @param [Object] value Any valid value
|
|
124
|
+
# @return [Hash] Returns the value in the form of hash
|
|
125
|
+
def _to_hash(value)
|
|
126
|
+
if value.is_a?(Array)
|
|
127
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
128
|
+
elsif value.is_a?(Hash)
|
|
129
|
+
{}.tap do |hash|
|
|
130
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
131
|
+
end
|
|
132
|
+
elsif value.respond_to? :to_hash
|
|
133
|
+
value.to_hash
|
|
134
|
+
else
|
|
135
|
+
value
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param [String] type Data type
|
|
141
|
+
# @param [String] value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def _deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :DateTime
|
|
146
|
+
DateTime.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :BOOLEAN
|
|
156
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
temp_model = OracleBMC.const_get(type.to_s).new
|
|
177
|
+
temp_model.build_from_hash(value)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
183
|
+
def self.attribute_map
|
|
184
|
+
{
|
|
185
|
+
:'default_backend_set_name' => :'defaultBackendSetName',
|
|
186
|
+
:'port' => :'port',
|
|
187
|
+
:'protocol' => :'protocol',
|
|
188
|
+
:'ssl_configuration' => :'sslConfiguration'
|
|
189
|
+
}
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Attribute type mapping.
|
|
193
|
+
def self.swagger_types
|
|
194
|
+
{
|
|
195
|
+
:'default_backend_set_name' => :'String',
|
|
196
|
+
:'port' => :'Integer',
|
|
197
|
+
:'protocol' => :'String',
|
|
198
|
+
:'ssl_configuration' => :'OracleBMC::LoadBalancer::Models::SSLConfigurationDetails'
|
|
199
|
+
}
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OracleBMC
|
|
6
|
+
class LoadBalancer::Models::UpdateLoadBalancerDetails
|
|
7
|
+
# The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable.
|
|
8
|
+
#
|
|
9
|
+
# Example: `My load balancer`
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
attr_accessor :display_name
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Initializes the object
|
|
16
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
17
|
+
def initialize(attributes = {})
|
|
18
|
+
return unless attributes.is_a?(Hash)
|
|
19
|
+
|
|
20
|
+
# convert string to symbol for hash key
|
|
21
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
if attributes[:'displayName']
|
|
25
|
+
self.display_name = attributes[:'displayName']
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Checks equality by comparing each attribute.
|
|
31
|
+
# @param [Object] other_object to be compared
|
|
32
|
+
def ==(other_object)
|
|
33
|
+
return true if self.equal?(other_object)
|
|
34
|
+
self.class == other_object.class &&
|
|
35
|
+
display_name == other_object.display_name
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @see the `==` method
|
|
39
|
+
# @param [Object] other_object to be compared
|
|
40
|
+
def eql?(other_object)
|
|
41
|
+
self == other_object
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Calculates hash code according to all attributes.
|
|
45
|
+
# @return [Fixnum] Hash code
|
|
46
|
+
def hash
|
|
47
|
+
[display_name].hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Builds the object from hash
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
# @return [Object] Returns the model itself
|
|
53
|
+
def build_from_hash(attributes)
|
|
54
|
+
return nil unless attributes.is_a?(Hash)
|
|
55
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
56
|
+
if type =~ /^Array<(.*)>/i
|
|
57
|
+
# check to ensure the input is an array given that the the attribute
|
|
58
|
+
# is documented as an array but the input is not
|
|
59
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
60
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
61
|
+
end
|
|
62
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
63
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
64
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
self
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns the string representation of the object
|
|
71
|
+
# @return [String] String presentation of the object
|
|
72
|
+
def to_s
|
|
73
|
+
to_hash.to_s
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns the object in the form of hash
|
|
77
|
+
# @return [Hash] Returns the object in the form of hash
|
|
78
|
+
def to_hash
|
|
79
|
+
hash = {}
|
|
80
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
81
|
+
value = self.send(attr)
|
|
82
|
+
next if value.nil?
|
|
83
|
+
hash[param] = _to_hash(value)
|
|
84
|
+
end
|
|
85
|
+
hash
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
private
|
|
89
|
+
|
|
90
|
+
# Outputs non-array value in the form of hash
|
|
91
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
92
|
+
# @param [Object] value Any valid value
|
|
93
|
+
# @return [Hash] Returns the value in the form of hash
|
|
94
|
+
def _to_hash(value)
|
|
95
|
+
if value.is_a?(Array)
|
|
96
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
97
|
+
elsif value.is_a?(Hash)
|
|
98
|
+
{}.tap do |hash|
|
|
99
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
100
|
+
end
|
|
101
|
+
elsif value.respond_to? :to_hash
|
|
102
|
+
value.to_hash
|
|
103
|
+
else
|
|
104
|
+
value
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Deserializes the data based on type
|
|
109
|
+
# @param [String] type Data type
|
|
110
|
+
# @param [String] value Value to be deserialized
|
|
111
|
+
# @return [Object] Deserialized data
|
|
112
|
+
def _deserialize(type, value)
|
|
113
|
+
case type.to_sym
|
|
114
|
+
when :DateTime
|
|
115
|
+
DateTime.parse(value)
|
|
116
|
+
when :Date
|
|
117
|
+
Date.parse(value)
|
|
118
|
+
when :String
|
|
119
|
+
value.to_s
|
|
120
|
+
when :Integer
|
|
121
|
+
value.to_i
|
|
122
|
+
when :Float
|
|
123
|
+
value.to_f
|
|
124
|
+
when :BOOLEAN
|
|
125
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
126
|
+
true
|
|
127
|
+
else
|
|
128
|
+
false
|
|
129
|
+
end
|
|
130
|
+
when :Object
|
|
131
|
+
# generic object (usually a Hash), return directly
|
|
132
|
+
value
|
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
136
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
|
139
|
+
{}.tap do |hash|
|
|
140
|
+
value.each do |k, v|
|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
else # model
|
|
145
|
+
temp_model = OracleBMC.const_get(type.to_s).new
|
|
146
|
+
temp_model.build_from_hash(value)
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
152
|
+
def self.attribute_map
|
|
153
|
+
{
|
|
154
|
+
:'display_name' => :'displayName'
|
|
155
|
+
}
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Attribute type mapping.
|
|
159
|
+
def self.swagger_types
|
|
160
|
+
{
|
|
161
|
+
:'display_name' => :'String'
|
|
162
|
+
}
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|