oci 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +262 -0
- data/lib/oci.rb +25 -0
- data/lib/oci/api_client.rb +389 -0
- data/lib/oci/config.rb +118 -0
- data/lib/oci/config_file_loader.rb +96 -0
- data/lib/oci/core/blockstorage_client.rb +462 -0
- data/lib/oci/core/compute_client.rb +1415 -0
- data/lib/oci/core/core.rb +114 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +137 -0
- data/lib/oci/core/models/attach_vnic_details.rb +144 -0
- data/lib/oci/core/models/attach_volume_details.rb +165 -0
- data/lib/oci/core/models/capture_console_history_details.rb +120 -0
- data/lib/oci/core/models/console_history.rb +213 -0
- data/lib/oci/core/models/cpe.rb +169 -0
- data/lib/oci/core/models/create_cpe_details.rb +145 -0
- data/lib/oci/core/models/create_cross_connect_details.rb +204 -0
- data/lib/oci/core/models/create_cross_connect_group_details.rb +133 -0
- data/lib/oci/core/models/create_dhcp_details.rb +153 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +142 -0
- data/lib/oci/core/models/create_drg_details.rb +131 -0
- data/lib/oci/core/models/create_image_details.rb +159 -0
- data/lib/oci/core/models/create_instance_console_connection_details.rb +131 -0
- data/lib/oci/core/models/create_internet_gateway_details.rb +153 -0
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +168 -0
- data/lib/oci/core/models/create_private_ip_details.rb +173 -0
- data/lib/oci/core/models/create_route_table_details.rb +153 -0
- data/lib/oci/core/models/create_security_list_details.rb +164 -0
- data/lib/oci/core/models/create_subnet_details.rb +257 -0
- data/lib/oci/core/models/create_vcn_details.rb +171 -0
- data/lib/oci/core/models/create_virtual_circuit_details.rb +260 -0
- data/lib/oci/core/models/create_vnic_details.rb +214 -0
- data/lib/oci/core/models/create_volume_backup_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +170 -0
- data/lib/oci/core/models/cross_connect.rb +235 -0
- data/lib/oci/core/models/cross_connect_group.rb +187 -0
- data/lib/oci/core/models/cross_connect_location.rb +134 -0
- data/lib/oci/core/models/cross_connect_mapping.rb +190 -0
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +137 -0
- data/lib/oci/core/models/cross_connect_status.rb +200 -0
- data/lib/oci/core/models/dhcp_dns_option.rb +171 -0
- data/lib/oci/core/models/dhcp_option.rb +135 -0
- data/lib/oci/core/models/dhcp_options.rb +208 -0
- data/lib/oci/core/models/dhcp_search_domain_option.rb +141 -0
- data/lib/oci/core/models/drg.rb +186 -0
- data/lib/oci/core/models/drg_attachment.rb +208 -0
- data/lib/oci/core/models/egress_security_rule.rb +198 -0
- data/lib/oci/core/models/export_image_details.rb +134 -0
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +130 -0
- data/lib/oci/core/models/fast_connect_provider_service.rb +145 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +212 -0
- data/lib/oci/core/models/icmp_options.rb +131 -0
- data/lib/oci/core/models/image.rb +245 -0
- data/lib/oci/core/models/image_source_details.rb +134 -0
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +128 -0
- data/lib/oci/core/models/ingress_security_rule.rb +198 -0
- data/lib/oci/core/models/instance.rb +307 -0
- data/lib/oci/core/models/instance_console_connection.rb +193 -0
- data/lib/oci/core/models/instance_credentials.rb +131 -0
- data/lib/oci/core/models/internet_gateway.rb +210 -0
- data/lib/oci/core/models/ip_sec_connection.rb +223 -0
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +153 -0
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +156 -0
- data/lib/oci/core/models/launch_instance_details.rb +336 -0
- data/lib/oci/core/models/letter_of_authority.rb +194 -0
- data/lib/oci/core/models/port_range.rb +133 -0
- data/lib/oci/core/models/private_ip.rb +248 -0
- data/lib/oci/core/models/route_rule.rb +135 -0
- data/lib/oci/core/models/route_table.rb +208 -0
- data/lib/oci/core/models/security_list.rb +219 -0
- data/lib/oci/core/models/shape.rb +122 -0
- data/lib/oci/core/models/subnet.rb +351 -0
- data/lib/oci/core/models/tcp_options.rb +135 -0
- data/lib/oci/core/models/tunnel_config.rb +151 -0
- data/lib/oci/core/models/tunnel_status.rb +178 -0
- data/lib/oci/core/models/udp_options.rb +135 -0
- data/lib/oci/core/models/update_cpe_details.rb +122 -0
- data/lib/oci/core/models/update_cross_connect_details.rb +138 -0
- data/lib/oci/core/models/update_cross_connect_group_details.rb +122 -0
- data/lib/oci/core/models/update_dhcp_details.rb +132 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +122 -0
- data/lib/oci/core/models/update_drg_details.rb +122 -0
- data/lib/oci/core/models/update_image_details.rb +124 -0
- data/lib/oci/core/models/update_instance_details.rb +124 -0
- data/lib/oci/core/models/update_internet_gateway_details.rb +133 -0
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +122 -0
- data/lib/oci/core/models/update_private_ip_details.rb +157 -0
- data/lib/oci/core/models/update_route_table_details.rb +133 -0
- data/lib/oci/core/models/update_security_list_details.rb +144 -0
- data/lib/oci/core/models/update_subnet_details.rb +122 -0
- data/lib/oci/core/models/update_vcn_details.rb +122 -0
- data/lib/oci/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oci/core/models/update_vnic_details.rb +144 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +122 -0
- data/lib/oci/core/models/update_volume_details.rb +122 -0
- data/lib/oci/core/models/vcn.rb +276 -0
- data/lib/oci/core/models/virtual_circuit.rb +395 -0
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +137 -0
- data/lib/oci/core/models/vnic.rb +287 -0
- data/lib/oci/core/models/vnic_attachment.rb +250 -0
- data/lib/oci/core/models/volume.rb +210 -0
- data/lib/oci/core/models/volume_attachment.rb +246 -0
- data/lib/oci/core/models/volume_backup.rb +235 -0
- data/lib/oci/core/util.rb +1 -0
- data/lib/oci/core/virtual_network_client.rb +3421 -0
- data/lib/oci/errors.rb +78 -0
- data/lib/oci/global_context.rb +20 -0
- data/lib/oci/identity/identity.rb +55 -0
- data/lib/oci/identity/identity_client.rb +2148 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +131 -0
- data/lib/oci/identity/models/api_key.rb +211 -0
- data/lib/oci/identity/models/availability_domain.rb +131 -0
- data/lib/oci/identity/models/compartment.rb +211 -0
- data/lib/oci/identity/models/create_api_key_details.rb +120 -0
- data/lib/oci/identity/models/create_compartment_details.rb +145 -0
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +121 -0
- data/lib/oci/identity/models/create_group_details.rb +144 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +215 -0
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +133 -0
- data/lib/oci/identity/models/create_policy_details.rb +173 -0
- data/lib/oci/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +154 -0
- data/lib/oci/identity/models/create_swift_password_details.rb +121 -0
- data/lib/oci/identity/models/create_user_details.rb +144 -0
- data/lib/oci/identity/models/customer_secret_key.rb +225 -0
- data/lib/oci/identity/models/customer_secret_key_summary.rb +213 -0
- data/lib/oci/identity/models/group.rb +211 -0
- data/lib/oci/identity/models/identity_provider.rb +261 -0
- data/lib/oci/identity/models/idp_group_mapping.rb +220 -0
- data/lib/oci/identity/models/policy.rb +237 -0
- data/lib/oci/identity/models/region.rb +143 -0
- data/lib/oci/identity/models/region_subscription.rb +180 -0
- data/lib/oci/identity/models/saml2_identity_provider.rb +180 -0
- data/lib/oci/identity/models/swift_password.rb +226 -0
- data/lib/oci/identity/models/tenancy.rb +159 -0
- data/lib/oci/identity/models/ui_password.rb +187 -0
- data/lib/oci/identity/models/update_compartment_details.rb +132 -0
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +120 -0
- data/lib/oci/identity/models/update_group_details.rb +120 -0
- data/lib/oci/identity/models/update_identity_provider_details.rb +160 -0
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +131 -0
- data/lib/oci/identity/models/update_policy_details.rb +148 -0
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +145 -0
- data/lib/oci/identity/models/update_state_details.rb +121 -0
- data/lib/oci/identity/models/update_swift_password_details.rb +120 -0
- data/lib/oci/identity/models/update_user_details.rb +120 -0
- data/lib/oci/identity/models/user.rb +217 -0
- data/lib/oci/identity/models/user_group_membership.rb +209 -0
- data/lib/oci/identity/util.rb +1 -0
- data/lib/oci/internal/internal.rb +10 -0
- data/lib/oci/internal/util.rb +69 -0
- data/lib/oci/load_balancer/load_balancer.rb +51 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +1449 -0
- data/lib/oci/load_balancer/models/backend.rb +220 -0
- data/lib/oci/load_balancer/models/backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/backend_health.rb +158 -0
- data/lib/oci/load_balancer/models/backend_set.rb +182 -0
- data/lib/oci/load_balancer/models/backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/backend_set_health.rb +207 -0
- data/lib/oci/load_balancer/models/certificate.rb +169 -0
- data/lib/oci/load_balancer/models/certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +181 -0
- data/lib/oci/load_balancer/models/create_certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +175 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +220 -0
- data/lib/oci/load_balancer/models/health_check_result.rb +183 -0
- data/lib/oci/load_balancer/models/health_checker.rb +224 -0
- data/lib/oci/load_balancer/models/health_checker_details.rb +223 -0
- data/lib/oci/load_balancer/models/ip_address.rb +139 -0
- data/lib/oci/load_balancer/models/listener.rb +174 -0
- data/lib/oci/load_balancer/models/listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/load_balancer.rb +280 -0
- data/lib/oci/load_balancer/models/load_balancer_health.rb +215 -0
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +168 -0
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +120 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +141 -0
- data/lib/oci/load_balancer/models/ssl_configuration.rb +155 -0
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +155 -0
- data/lib/oci/load_balancer/models/update_backend_details.rb +178 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +222 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +124 -0
- data/lib/oci/load_balancer/models/work_request.rb +229 -0
- data/lib/oci/load_balancer/models/work_request_error.rb +145 -0
- data/lib/oci/load_balancer/util.rb +58 -0
- data/lib/oci/object_storage/models/bucket.rb +216 -0
- data/lib/oci/object_storage/models/bucket_summary.rb +175 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +133 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +131 -0
- data/lib/oci/object_storage/models/create_bucket_details.rb +173 -0
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +166 -0
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +171 -0
- data/lib/oci/object_storage/models/list_objects.rb +146 -0
- data/lib/oci/object_storage/models/multipart_upload.rb +164 -0
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +153 -0
- data/lib/oci/object_storage/models/object_summary.rb +153 -0
- data/lib/oci/object_storage/models/preauthenticated_request.rb +207 -0
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +196 -0
- data/lib/oci/object_storage/models/update_bucket_details.rb +171 -0
- data/lib/oci/object_storage/object_storage.rb +30 -0
- data/lib/oci/object_storage/object_storage_client.rb +1185 -0
- data/lib/oci/object_storage/util.rb +1 -0
- data/lib/oci/regions.rb +43 -0
- data/lib/oci/response.rb +80 -0
- data/lib/oci/response_headers.rb +144 -0
- data/lib/oci/signer.rb +157 -0
- data/lib/oci/version.rb +5 -0
- data/lib/oci/waiter.rb +101 -0
- data/lib/oraclebmc.rb +3 -0
- metadata +375 -0
@@ -0,0 +1,137 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Core::Models::VirtualCircuitBandwidthShape
|
7
|
+
# The bandwidth in Mbps.
|
8
|
+
#
|
9
|
+
# Example: `10000`
|
10
|
+
#
|
11
|
+
# @return [Integer]
|
12
|
+
attr_accessor :bandwidth_in_mbps
|
13
|
+
|
14
|
+
# The name of the bandwidth shape.
|
15
|
+
#
|
16
|
+
# Example: `10 Gbps`
|
17
|
+
#
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
|
22
|
+
# Initializes the object
|
23
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
24
|
+
def initialize(attributes = {})
|
25
|
+
return unless attributes.is_a?(Hash)
|
26
|
+
|
27
|
+
# convert string to symbol for hash key
|
28
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
29
|
+
|
30
|
+
if attributes[:'bandwidthInMbps']
|
31
|
+
self.bandwidth_in_mbps = attributes[:'bandwidthInMbps']
|
32
|
+
end
|
33
|
+
|
34
|
+
if attributes[:'name']
|
35
|
+
self.name = attributes[:'name']
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
# Checks equality by comparing each attribute.
|
41
|
+
# @param [Object] other_object to be compared
|
42
|
+
def ==(other_object)
|
43
|
+
return true if self.equal?(other_object)
|
44
|
+
self.class == other_object.class &&
|
45
|
+
bandwidth_in_mbps == other_object.bandwidth_in_mbps &&
|
46
|
+
name == other_object.name
|
47
|
+
end
|
48
|
+
|
49
|
+
# @see the `==` method
|
50
|
+
# @param [Object] other_object to be compared
|
51
|
+
def eql?(other_object)
|
52
|
+
self == other_object
|
53
|
+
end
|
54
|
+
|
55
|
+
# Calculates hash code according to all attributes.
|
56
|
+
# @return [Fixnum] Hash code
|
57
|
+
def hash
|
58
|
+
[bandwidth_in_mbps, name].hash
|
59
|
+
end
|
60
|
+
|
61
|
+
# Builds the object from hash
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
# @return [Object] Returns the model itself
|
64
|
+
def build_from_hash(attributes)
|
65
|
+
return nil unless attributes.is_a?(Hash)
|
66
|
+
self.class.swagger_types.each_pair do |key, type|
|
67
|
+
if type =~ /^Array<(.*)>/i
|
68
|
+
# check to ensure the input is an array given that the the attribute
|
69
|
+
# is documented as an array but the input is not
|
70
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
71
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
72
|
+
end
|
73
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
74
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
75
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
76
|
+
end
|
77
|
+
|
78
|
+
self
|
79
|
+
end
|
80
|
+
|
81
|
+
# Returns the string representation of the object
|
82
|
+
# @return [String] String presentation of the object
|
83
|
+
def to_s
|
84
|
+
to_hash.to_s
|
85
|
+
end
|
86
|
+
|
87
|
+
# Returns the object in the form of hash
|
88
|
+
# @return [Hash] Returns the object in the form of hash
|
89
|
+
def to_hash
|
90
|
+
hash = {}
|
91
|
+
self.class.attribute_map.each_pair do |attr, param|
|
92
|
+
value = self.send(attr)
|
93
|
+
next if value.nil?
|
94
|
+
hash[param] = _to_hash(value)
|
95
|
+
end
|
96
|
+
hash
|
97
|
+
end
|
98
|
+
|
99
|
+
private
|
100
|
+
|
101
|
+
# Outputs non-array value in the form of hash
|
102
|
+
# For object, use to_hash. Otherwise, just return the value
|
103
|
+
# @param [Object] value Any valid value
|
104
|
+
# @return [Hash] Returns the value in the form of hash
|
105
|
+
def _to_hash(value)
|
106
|
+
if value.is_a?(Array)
|
107
|
+
value.compact.map{ |v| _to_hash(v) }
|
108
|
+
elsif value.is_a?(Hash)
|
109
|
+
{}.tap do |hash|
|
110
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
111
|
+
end
|
112
|
+
elsif value.respond_to? :to_hash
|
113
|
+
value.to_hash
|
114
|
+
else
|
115
|
+
value
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
122
|
+
def self.attribute_map
|
123
|
+
{
|
124
|
+
:'bandwidth_in_mbps' => :'bandwidthInMbps',
|
125
|
+
:'name' => :'name'
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
# Attribute type mapping.
|
130
|
+
def self.swagger_types
|
131
|
+
{
|
132
|
+
:'bandwidth_in_mbps' => :'Integer',
|
133
|
+
:'name' => :'String'
|
134
|
+
}
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,287 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Core::Models::Vnic
|
7
|
+
|
8
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING',
|
9
|
+
LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE',
|
10
|
+
LIFECYCLE_STATE_TERMINATING = 'TERMINATING',
|
11
|
+
LIFECYCLE_STATE_TERMINATED = 'TERMINATED',
|
12
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
13
|
+
|
14
|
+
# The VNIC's Availability Domain.
|
15
|
+
#
|
16
|
+
# Example: `Uocm:PHX-AD-1`
|
17
|
+
#
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :availability_domain
|
20
|
+
|
21
|
+
# The OCID of the compartment containing the VNIC.
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :compartment_id
|
24
|
+
|
25
|
+
# A user-friendly name. Does not have to be unique.
|
26
|
+
# Avoid entering confidential information.
|
27
|
+
#
|
28
|
+
# @return [String]
|
29
|
+
attr_accessor :display_name
|
30
|
+
|
31
|
+
# The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname
|
32
|
+
# portion of the primary private IP's fully qualified domain name (FQDN)
|
33
|
+
# (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`).
|
34
|
+
# Must be unique across all VNICs in the subnet and comply with
|
35
|
+
# [RFC 952](https://tools.ietf.org/html/rfc952) and
|
36
|
+
# [RFC 1123](https://tools.ietf.org/html/rfc1123).
|
37
|
+
#
|
38
|
+
# For more information, see
|
39
|
+
# [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
|
40
|
+
#
|
41
|
+
# Example: `bminstance-1`
|
42
|
+
#
|
43
|
+
# @return [String]
|
44
|
+
attr_accessor :hostname_label
|
45
|
+
|
46
|
+
# The OCID of the VNIC.
|
47
|
+
# @return [String]
|
48
|
+
attr_accessor :id
|
49
|
+
|
50
|
+
# Whether the VNIC is the primary VNIC (the VNIC that is automatically created
|
51
|
+
# and attached during instance launch).
|
52
|
+
#
|
53
|
+
# @return [BOOLEAN]
|
54
|
+
attr_accessor :is_primary
|
55
|
+
|
56
|
+
# The current state of the VNIC.
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :lifecycle_state
|
59
|
+
|
60
|
+
# The MAC address of the VNIC.
|
61
|
+
#
|
62
|
+
# Example: `00:00:17:B6:4D:DD`
|
63
|
+
#
|
64
|
+
# @return [String]
|
65
|
+
attr_accessor :mac_address
|
66
|
+
|
67
|
+
# The private IP address of the primary `privateIp` object on the VNIC.
|
68
|
+
# The address is within the CIDR of the VNIC's subnet.
|
69
|
+
#
|
70
|
+
# Example: `10.0.3.3`
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
attr_accessor :private_ip
|
74
|
+
|
75
|
+
# The public IP address of the VNIC, if one is assigned.
|
76
|
+
#
|
77
|
+
# @return [String]
|
78
|
+
attr_accessor :public_ip
|
79
|
+
|
80
|
+
# The OCID of the subnet the VNIC is in.
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :subnet_id
|
83
|
+
|
84
|
+
# The date and time the VNIC was created, in the format defined by RFC3339.
|
85
|
+
#
|
86
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
87
|
+
#
|
88
|
+
# @return [DateTime]
|
89
|
+
attr_accessor :time_created
|
90
|
+
|
91
|
+
|
92
|
+
# Initializes the object
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
+
def initialize(attributes = {})
|
95
|
+
return unless attributes.is_a?(Hash)
|
96
|
+
|
97
|
+
# convert string to symbol for hash key
|
98
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
99
|
+
|
100
|
+
if attributes[:'availabilityDomain']
|
101
|
+
self.availability_domain = attributes[:'availabilityDomain']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes[:'compartmentId']
|
105
|
+
self.compartment_id = attributes[:'compartmentId']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes[:'displayName']
|
109
|
+
self.display_name = attributes[:'displayName']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes[:'hostnameLabel']
|
113
|
+
self.hostname_label = attributes[:'hostnameLabel']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes[:'id']
|
117
|
+
self.id = attributes[:'id']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes[:'isPrimary']
|
121
|
+
self.is_primary = attributes[:'isPrimary']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes[:'lifecycleState']
|
125
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes[:'macAddress']
|
129
|
+
self.mac_address = attributes[:'macAddress']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes[:'privateIp']
|
133
|
+
self.private_ip = attributes[:'privateIp']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes[:'publicIp']
|
137
|
+
self.public_ip = attributes[:'publicIp']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes[:'subnetId']
|
141
|
+
self.subnet_id = attributes[:'subnetId']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes[:'timeCreated']
|
145
|
+
self.time_created = attributes[:'timeCreated']
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
|
150
|
+
# Custom attribute writer method checking allowed values (enum).
|
151
|
+
# @param [Object] lifecycle_state Object to be assigned
|
152
|
+
def lifecycle_state=(lifecycle_state)
|
153
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
154
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
155
|
+
else
|
156
|
+
@lifecycle_state = lifecycle_state
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Checks equality by comparing each attribute.
|
161
|
+
# @param [Object] other_object to be compared
|
162
|
+
def ==(other_object)
|
163
|
+
return true if self.equal?(other_object)
|
164
|
+
self.class == other_object.class &&
|
165
|
+
availability_domain == other_object.availability_domain &&
|
166
|
+
compartment_id == other_object.compartment_id &&
|
167
|
+
display_name == other_object.display_name &&
|
168
|
+
hostname_label == other_object.hostname_label &&
|
169
|
+
id == other_object.id &&
|
170
|
+
is_primary == other_object.is_primary &&
|
171
|
+
lifecycle_state == other_object.lifecycle_state &&
|
172
|
+
mac_address == other_object.mac_address &&
|
173
|
+
private_ip == other_object.private_ip &&
|
174
|
+
public_ip == other_object.public_ip &&
|
175
|
+
subnet_id == other_object.subnet_id &&
|
176
|
+
time_created == other_object.time_created
|
177
|
+
end
|
178
|
+
|
179
|
+
# @see the `==` method
|
180
|
+
# @param [Object] other_object to be compared
|
181
|
+
def eql?(other_object)
|
182
|
+
self == other_object
|
183
|
+
end
|
184
|
+
|
185
|
+
# Calculates hash code according to all attributes.
|
186
|
+
# @return [Fixnum] Hash code
|
187
|
+
def hash
|
188
|
+
[availability_domain, compartment_id, display_name, hostname_label, id, is_primary, lifecycle_state, mac_address, private_ip, public_ip, subnet_id, time_created].hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Builds the object from hash
|
192
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
193
|
+
# @return [Object] Returns the model itself
|
194
|
+
def build_from_hash(attributes)
|
195
|
+
return nil unless attributes.is_a?(Hash)
|
196
|
+
self.class.swagger_types.each_pair do |key, type|
|
197
|
+
if type =~ /^Array<(.*)>/i
|
198
|
+
# check to ensure the input is an array given that the the attribute
|
199
|
+
# is documented as an array but the input is not
|
200
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
201
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
202
|
+
end
|
203
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
204
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
205
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
206
|
+
end
|
207
|
+
|
208
|
+
self
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the object in the form of hash
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_hash
|
220
|
+
hash = {}
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
222
|
+
value = self.send(attr)
|
223
|
+
next if value.nil?
|
224
|
+
hash[param] = _to_hash(value)
|
225
|
+
end
|
226
|
+
hash
|
227
|
+
end
|
228
|
+
|
229
|
+
private
|
230
|
+
|
231
|
+
# Outputs non-array value in the form of hash
|
232
|
+
# For object, use to_hash. Otherwise, just return the value
|
233
|
+
# @param [Object] value Any valid value
|
234
|
+
# @return [Hash] Returns the value in the form of hash
|
235
|
+
def _to_hash(value)
|
236
|
+
if value.is_a?(Array)
|
237
|
+
value.compact.map{ |v| _to_hash(v) }
|
238
|
+
elsif value.is_a?(Hash)
|
239
|
+
{}.tap do |hash|
|
240
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
241
|
+
end
|
242
|
+
elsif value.respond_to? :to_hash
|
243
|
+
value.to_hash
|
244
|
+
else
|
245
|
+
value
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
252
|
+
def self.attribute_map
|
253
|
+
{
|
254
|
+
:'availability_domain' => :'availabilityDomain',
|
255
|
+
:'compartment_id' => :'compartmentId',
|
256
|
+
:'display_name' => :'displayName',
|
257
|
+
:'hostname_label' => :'hostnameLabel',
|
258
|
+
:'id' => :'id',
|
259
|
+
:'is_primary' => :'isPrimary',
|
260
|
+
:'lifecycle_state' => :'lifecycleState',
|
261
|
+
:'mac_address' => :'macAddress',
|
262
|
+
:'private_ip' => :'privateIp',
|
263
|
+
:'public_ip' => :'publicIp',
|
264
|
+
:'subnet_id' => :'subnetId',
|
265
|
+
:'time_created' => :'timeCreated'
|
266
|
+
}
|
267
|
+
end
|
268
|
+
|
269
|
+
# Attribute type mapping.
|
270
|
+
def self.swagger_types
|
271
|
+
{
|
272
|
+
:'availability_domain' => :'String',
|
273
|
+
:'compartment_id' => :'String',
|
274
|
+
:'display_name' => :'String',
|
275
|
+
:'hostname_label' => :'String',
|
276
|
+
:'id' => :'String',
|
277
|
+
:'is_primary' => :'BOOLEAN',
|
278
|
+
:'lifecycle_state' => :'String',
|
279
|
+
:'mac_address' => :'String',
|
280
|
+
:'private_ip' => :'String',
|
281
|
+
:'public_ip' => :'String',
|
282
|
+
:'subnet_id' => :'String',
|
283
|
+
:'time_created' => :'DateTime'
|
284
|
+
}
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
@@ -0,0 +1,250 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Core::Models::VnicAttachment
|
7
|
+
|
8
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_ATTACHING = 'ATTACHING',
|
9
|
+
LIFECYCLE_STATE_ATTACHED = 'ATTACHED',
|
10
|
+
LIFECYCLE_STATE_DETACHING = 'DETACHING',
|
11
|
+
LIFECYCLE_STATE_DETACHED = 'DETACHED',
|
12
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
13
|
+
|
14
|
+
# The Availability Domain of the instance.
|
15
|
+
#
|
16
|
+
# Example: `Uocm:PHX-AD-1`
|
17
|
+
#
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :availability_domain
|
20
|
+
|
21
|
+
# The OCID of the compartment the VNIC attachment is in, which is the same
|
22
|
+
# compartment the instance is in.
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
attr_accessor :compartment_id
|
26
|
+
|
27
|
+
# A user-friendly name. Does not have to be unique.
|
28
|
+
# Avoid entering confidential information.
|
29
|
+
#
|
30
|
+
# @return [String]
|
31
|
+
attr_accessor :display_name
|
32
|
+
|
33
|
+
# The OCID of the VNIC attachment.
|
34
|
+
# @return [String]
|
35
|
+
attr_accessor :id
|
36
|
+
|
37
|
+
# The OCID of the instance.
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :instance_id
|
40
|
+
|
41
|
+
# The current state of the VNIC attachment.
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :lifecycle_state
|
44
|
+
|
45
|
+
# The OCID of the VNIC's subnet.
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :subnet_id
|
48
|
+
|
49
|
+
# The date and time the VNIC attachment was created, in the format defined by RFC3339.
|
50
|
+
#
|
51
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
52
|
+
#
|
53
|
+
# @return [DateTime]
|
54
|
+
attr_accessor :time_created
|
55
|
+
|
56
|
+
# The Oracle-assigned VLAN tag of the attached VNIC. Available after the
|
57
|
+
# attachment process is complete.
|
58
|
+
#
|
59
|
+
# Example: `0`
|
60
|
+
#
|
61
|
+
# @return [Integer]
|
62
|
+
attr_accessor :vlan_tag
|
63
|
+
|
64
|
+
# The OCID of the VNIC. Available after the attachment process is complete.
|
65
|
+
# @return [String]
|
66
|
+
attr_accessor :vnic_id
|
67
|
+
|
68
|
+
|
69
|
+
# Initializes the object
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
71
|
+
def initialize(attributes = {})
|
72
|
+
return unless attributes.is_a?(Hash)
|
73
|
+
|
74
|
+
# convert string to symbol for hash key
|
75
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
76
|
+
|
77
|
+
if attributes[:'availabilityDomain']
|
78
|
+
self.availability_domain = attributes[:'availabilityDomain']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes[:'compartmentId']
|
82
|
+
self.compartment_id = attributes[:'compartmentId']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes[:'displayName']
|
86
|
+
self.display_name = attributes[:'displayName']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes[:'id']
|
90
|
+
self.id = attributes[:'id']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes[:'instanceId']
|
94
|
+
self.instance_id = attributes[:'instanceId']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes[:'lifecycleState']
|
98
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes[:'subnetId']
|
102
|
+
self.subnet_id = attributes[:'subnetId']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes[:'timeCreated']
|
106
|
+
self.time_created = attributes[:'timeCreated']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes[:'vlanTag']
|
110
|
+
self.vlan_tag = attributes[:'vlanTag']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes[:'vnicId']
|
114
|
+
self.vnic_id = attributes[:'vnicId']
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
# Custom attribute writer method checking allowed values (enum).
|
120
|
+
# @param [Object] lifecycle_state Object to be assigned
|
121
|
+
def lifecycle_state=(lifecycle_state)
|
122
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
123
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
124
|
+
else
|
125
|
+
@lifecycle_state = lifecycle_state
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks equality by comparing each attribute.
|
130
|
+
# @param [Object] other_object to be compared
|
131
|
+
def ==(other_object)
|
132
|
+
return true if self.equal?(other_object)
|
133
|
+
self.class == other_object.class &&
|
134
|
+
availability_domain == other_object.availability_domain &&
|
135
|
+
compartment_id == other_object.compartment_id &&
|
136
|
+
display_name == other_object.display_name &&
|
137
|
+
id == other_object.id &&
|
138
|
+
instance_id == other_object.instance_id &&
|
139
|
+
lifecycle_state == other_object.lifecycle_state &&
|
140
|
+
subnet_id == other_object.subnet_id &&
|
141
|
+
time_created == other_object.time_created &&
|
142
|
+
vlan_tag == other_object.vlan_tag &&
|
143
|
+
vnic_id == other_object.vnic_id
|
144
|
+
end
|
145
|
+
|
146
|
+
# @see the `==` method
|
147
|
+
# @param [Object] other_object to be compared
|
148
|
+
def eql?(other_object)
|
149
|
+
self == other_object
|
150
|
+
end
|
151
|
+
|
152
|
+
# Calculates hash code according to all attributes.
|
153
|
+
# @return [Fixnum] Hash code
|
154
|
+
def hash
|
155
|
+
[availability_domain, compartment_id, display_name, id, instance_id, lifecycle_state, subnet_id, time_created, vlan_tag, vnic_id].hash
|
156
|
+
end
|
157
|
+
|
158
|
+
# Builds the object from hash
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
+
# @return [Object] Returns the model itself
|
161
|
+
def build_from_hash(attributes)
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
163
|
+
self.class.swagger_types.each_pair do |key, type|
|
164
|
+
if type =~ /^Array<(.*)>/i
|
165
|
+
# check to ensure the input is an array given that the the attribute
|
166
|
+
# is documented as an array but the input is not
|
167
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
168
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
169
|
+
end
|
170
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
171
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
172
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
173
|
+
end
|
174
|
+
|
175
|
+
self
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
next if value.nil?
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
private
|
197
|
+
|
198
|
+
# Outputs non-array value in the form of hash
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
200
|
+
# @param [Object] value Any valid value
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
202
|
+
def _to_hash(value)
|
203
|
+
if value.is_a?(Array)
|
204
|
+
value.compact.map{ |v| _to_hash(v) }
|
205
|
+
elsif value.is_a?(Hash)
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
+
end
|
209
|
+
elsif value.respond_to? :to_hash
|
210
|
+
value.to_hash
|
211
|
+
else
|
212
|
+
value
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
219
|
+
def self.attribute_map
|
220
|
+
{
|
221
|
+
:'availability_domain' => :'availabilityDomain',
|
222
|
+
:'compartment_id' => :'compartmentId',
|
223
|
+
:'display_name' => :'displayName',
|
224
|
+
:'id' => :'id',
|
225
|
+
:'instance_id' => :'instanceId',
|
226
|
+
:'lifecycle_state' => :'lifecycleState',
|
227
|
+
:'subnet_id' => :'subnetId',
|
228
|
+
:'time_created' => :'timeCreated',
|
229
|
+
:'vlan_tag' => :'vlanTag',
|
230
|
+
:'vnic_id' => :'vnicId'
|
231
|
+
}
|
232
|
+
end
|
233
|
+
|
234
|
+
# Attribute type mapping.
|
235
|
+
def self.swagger_types
|
236
|
+
{
|
237
|
+
:'availability_domain' => :'String',
|
238
|
+
:'compartment_id' => :'String',
|
239
|
+
:'display_name' => :'String',
|
240
|
+
:'id' => :'String',
|
241
|
+
:'instance_id' => :'String',
|
242
|
+
:'lifecycle_state' => :'String',
|
243
|
+
:'subnet_id' => :'String',
|
244
|
+
:'time_created' => :'DateTime',
|
245
|
+
:'vlan_tag' => :'Integer',
|
246
|
+
:'vnic_id' => :'String'
|
247
|
+
}
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|