oraclebmc 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/oraclebmc/core/blockstorage_client.rb +16 -11
- data/lib/oraclebmc/core/compute_client.rb +227 -37
- data/lib/oraclebmc/core/core.rb +11 -0
- data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +1 -2
- data/lib/oraclebmc/core/models/attach_vnic_details.rb +144 -0
- data/lib/oraclebmc/core/models/attach_volume_details.rb +5 -6
- data/lib/oraclebmc/core/models/capture_console_history_details.rb +1 -2
- data/lib/oraclebmc/core/models/console_history.rb +8 -8
- data/lib/oraclebmc/core/models/cpe.rb +7 -6
- data/lib/oraclebmc/core/models/create_cpe_details.rb +4 -5
- data/lib/oraclebmc/core/models/create_cross_connect_details.rb +9 -8
- data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +4 -3
- data/lib/oraclebmc/core/models/create_dhcp_details.rb +5 -6
- data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +4 -5
- data/lib/oraclebmc/core/models/create_drg_details.rb +3 -4
- data/lib/oraclebmc/core/models/create_image_details.rb +19 -7
- data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +5 -6
- data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +6 -7
- data/lib/oraclebmc/core/models/create_private_ip_details.rb +173 -0
- data/lib/oraclebmc/core/models/create_route_table_details.rb +5 -6
- data/lib/oraclebmc/core/models/create_security_list_details.rb +6 -7
- data/lib/oraclebmc/core/models/create_subnet_details.rb +14 -15
- data/lib/oraclebmc/core/models/create_vcn_details.rb +6 -8
- data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +11 -12
- data/lib/oraclebmc/core/models/create_vnic_details.rb +39 -27
- data/lib/oraclebmc/core/models/create_volume_backup_details.rb +4 -3
- data/lib/oraclebmc/core/models/create_volume_details.rb +6 -6
- data/lib/oraclebmc/core/models/cross_connect.rb +11 -10
- data/lib/oraclebmc/core/models/cross_connect_group.rb +6 -6
- data/lib/oraclebmc/core/models/cross_connect_location.rb +2 -3
- data/lib/oraclebmc/core/models/cross_connect_mapping.rb +5 -6
- data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +2 -3
- data/lib/oraclebmc/core/models/cross_connect_status.rb +4 -5
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +2 -3
- data/lib/oraclebmc/core/models/dhcp_option.rb +1 -2
- data/lib/oraclebmc/core/models/dhcp_options.rb +9 -8
- data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +1 -2
- data/lib/oraclebmc/core/models/drg.rb +7 -6
- data/lib/oraclebmc/core/models/drg_attachment.rb +9 -8
- data/lib/oraclebmc/core/models/egress_security_rule.rb +6 -7
- data/lib/oraclebmc/core/models/export_image_details.rb +134 -0
- data/lib/oraclebmc/core/models/export_image_via_object_storage_tuple_details.rb +150 -0
- data/lib/oraclebmc/core/models/export_image_via_object_storage_uri_details.rb +130 -0
- data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +3 -4
- data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +5 -6
- data/lib/oraclebmc/core/models/icmp_options.rb +2 -3
- data/lib/oraclebmc/core/models/image.rb +12 -10
- data/lib/oraclebmc/core/models/image_source_details.rb +134 -0
- data/lib/oraclebmc/core/models/image_source_via_object_storage_tuple_details.rb +150 -0
- data/lib/oraclebmc/core/models/image_source_via_object_storage_uri_details.rb +128 -0
- data/lib/oraclebmc/core/models/ingress_security_rule.rb +6 -7
- data/lib/oraclebmc/core/models/instance.rb +13 -13
- data/lib/oraclebmc/core/models/instance_credentials.rb +2 -3
- data/lib/oraclebmc/core/models/internet_gateway.rb +9 -8
- data/lib/oraclebmc/core/models/ip_sec_connection.rb +10 -9
- data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +4 -5
- data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +4 -5
- data/lib/oraclebmc/core/models/launch_instance_details.rb +17 -15
- data/lib/oraclebmc/core/models/letter_of_authority.rb +6 -7
- data/lib/oraclebmc/core/models/port_range.rb +2 -3
- data/lib/oraclebmc/core/models/private_ip.rb +248 -0
- data/lib/oraclebmc/core/models/route_rule.rb +2 -3
- data/lib/oraclebmc/core/models/route_table.rb +9 -8
- data/lib/oraclebmc/core/models/security_list.rb +10 -9
- data/lib/oraclebmc/core/models/shape.rb +1 -2
- data/lib/oraclebmc/core/models/subnet.rb +21 -19
- data/lib/oraclebmc/core/models/tcp_options.rb +2 -3
- data/lib/oraclebmc/core/models/tunnel_config.rb +3 -4
- data/lib/oraclebmc/core/models/tunnel_status.rb +4 -5
- data/lib/oraclebmc/core/models/udp_options.rb +2 -3
- data/lib/oraclebmc/core/models/update_cpe_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_cross_connect_details.rb +4 -3
- data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_dhcp_details.rb +4 -3
- data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_drg_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_image_details.rb +3 -3
- data/lib/oraclebmc/core/models/update_instance_details.rb +2 -2
- data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +4 -3
- data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_private_ip_details.rb +157 -0
- data/lib/oraclebmc/core/models/update_route_table_details.rb +4 -3
- data/lib/oraclebmc/core/models/update_security_list_details.rb +5 -4
- data/lib/oraclebmc/core/models/update_subnet_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_vcn_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +8 -8
- data/lib/oraclebmc/core/models/update_vnic_details.rb +144 -0
- data/lib/oraclebmc/core/models/update_volume_backup_details.rb +3 -2
- data/lib/oraclebmc/core/models/update_volume_details.rb +2 -2
- data/lib/oraclebmc/core/models/vcn.rb +13 -12
- data/lib/oraclebmc/core/models/virtual_circuit.rb +18 -18
- data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +2 -3
- data/lib/oraclebmc/core/models/vnic.rb +47 -19
- data/lib/oraclebmc/core/models/vnic_attachment.rb +33 -15
- data/lib/oraclebmc/core/models/volume.rb +8 -8
- data/lib/oraclebmc/core/models/volume_attachment.rb +10 -10
- data/lib/oraclebmc/core/models/volume_backup.rb +11 -10
- data/lib/oraclebmc/core/virtual_network_client.rb +364 -87
- data/lib/oraclebmc/errors.rb +19 -1
- data/lib/oraclebmc/identity/identity_client.rb +31 -31
- data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +2 -3
- data/lib/oraclebmc/identity/models/api_key.rb +7 -8
- data/lib/oraclebmc/identity/models/availability_domain.rb +2 -3
- data/lib/oraclebmc/identity/models/compartment.rb +7 -8
- data/lib/oraclebmc/identity/models/create_api_key_details.rb +1 -2
- data/lib/oraclebmc/identity/models/create_compartment_details.rb +3 -4
- data/lib/oraclebmc/identity/models/create_group_details.rb +3 -4
- data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +5 -6
- data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +2 -3
- data/lib/oraclebmc/identity/models/create_policy_details.rb +5 -6
- data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +1 -2
- data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +2 -3
- data/lib/oraclebmc/identity/models/create_swift_password_details.rb +1 -2
- data/lib/oraclebmc/identity/models/create_user_details.rb +3 -4
- data/lib/oraclebmc/identity/models/group.rb +7 -8
- data/lib/oraclebmc/identity/models/identity_provider.rb +9 -10
- data/lib/oraclebmc/identity/models/idp_group_mapping.rb +8 -9
- data/lib/oraclebmc/identity/models/policy.rb +9 -10
- data/lib/oraclebmc/identity/models/region.rb +2 -3
- data/lib/oraclebmc/identity/models/region_subscription.rb +4 -5
- data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +3 -4
- data/lib/oraclebmc/identity/models/swift_password.rb +8 -9
- data/lib/oraclebmc/identity/models/tenancy.rb +4 -5
- data/lib/oraclebmc/identity/models/ui_password.rb +5 -6
- data/lib/oraclebmc/identity/models/update_compartment_details.rb +1 -2
- data/lib/oraclebmc/identity/models/update_group_details.rb +1 -2
- data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +2 -3
- data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +2 -3
- data/lib/oraclebmc/identity/models/update_policy_details.rb +3 -4
- data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +2 -3
- data/lib/oraclebmc/identity/models/update_state_details.rb +1 -2
- data/lib/oraclebmc/identity/models/update_swift_password_details.rb +1 -2
- data/lib/oraclebmc/identity/models/update_user_details.rb +1 -2
- data/lib/oraclebmc/identity/models/user.rb +7 -8
- data/lib/oraclebmc/identity/models/user_group_membership.rb +7 -8
- data/lib/oraclebmc/load_balancer/load_balancer_client.rb +11 -11
- data/lib/oraclebmc/load_balancer/models/backend.rb +7 -8
- data/lib/oraclebmc/load_balancer/models/backend_details.rb +6 -7
- data/lib/oraclebmc/load_balancer/models/backend_set.rb +6 -7
- data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +5 -6
- data/lib/oraclebmc/load_balancer/models/certificate.rb +3 -4
- data/lib/oraclebmc/load_balancer/models/certificate_details.rb +5 -6
- data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +6 -7
- data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +6 -7
- data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +5 -6
- data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +5 -6
- data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +8 -9
- data/lib/oraclebmc/load_balancer/models/health_checker.rb +8 -9
- data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +8 -9
- data/lib/oraclebmc/load_balancer/models/ip_address.rb +2 -3
- data/lib/oraclebmc/load_balancer/models/listener.rb +5 -6
- data/lib/oraclebmc/load_balancer/models/listener_details.rb +4 -5
- data/lib/oraclebmc/load_balancer/models/load_balancer.rb +12 -13
- data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +1 -2
- data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +1 -2
- data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +1 -2
- data/lib/oraclebmc/load_balancer/models/session_persistence_configuration_details.rb +2 -3
- data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +3 -4
- data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +3 -4
- data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +4 -5
- data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +5 -6
- data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +8 -9
- data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +4 -5
- data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +1 -2
- data/lib/oraclebmc/load_balancer/models/work_request.rb +8 -9
- data/lib/oraclebmc/load_balancer/models/work_request_error.rb +2 -3
- data/lib/oraclebmc/version.rb +1 -1
- metadata +13 -2
@@ -0,0 +1,150 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require_relative 'export_image_details'
|
5
|
+
|
6
|
+
module OracleBMC
|
7
|
+
class Core::Models::ExportImageViaObjectStorageTupleDetails < Core::Models::ExportImageDetails
|
8
|
+
# The Object Storage Service bucket to export the image to.
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :bucket_name
|
11
|
+
|
12
|
+
# The Object Storage Service namespace to export the image to.
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :namespace_name
|
15
|
+
|
16
|
+
# The Object Storage Service object name for the exported image.
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :object_name
|
19
|
+
|
20
|
+
|
21
|
+
# Initializes the object
|
22
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
23
|
+
def initialize(attributes = {})
|
24
|
+
return unless attributes.is_a?(Hash)
|
25
|
+
|
26
|
+
attributes['destinationType'] = 'objectStorageTuple'
|
27
|
+
|
28
|
+
super(attributes)
|
29
|
+
|
30
|
+
# convert string to symbol for hash key
|
31
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
32
|
+
|
33
|
+
if attributes[:'bucketName']
|
34
|
+
self.bucket_name = attributes[:'bucketName']
|
35
|
+
end
|
36
|
+
|
37
|
+
if attributes[:'namespaceName']
|
38
|
+
self.namespace_name = attributes[:'namespaceName']
|
39
|
+
end
|
40
|
+
|
41
|
+
if attributes[:'objectName']
|
42
|
+
self.object_name = attributes[:'objectName']
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
# Checks equality by comparing each attribute.
|
48
|
+
# @param [Object] other_object to be compared
|
49
|
+
def ==(other_object)
|
50
|
+
return true if self.equal?(other_object)
|
51
|
+
self.class == other_object.class &&
|
52
|
+
destination_type == other_object.destination_type &&
|
53
|
+
bucket_name == other_object.bucket_name &&
|
54
|
+
namespace_name == other_object.namespace_name &&
|
55
|
+
object_name == other_object.object_name
|
56
|
+
end
|
57
|
+
|
58
|
+
# @see the `==` method
|
59
|
+
# @param [Object] other_object to be compared
|
60
|
+
def eql?(other_object)
|
61
|
+
self == other_object
|
62
|
+
end
|
63
|
+
|
64
|
+
# Calculates hash code according to all attributes.
|
65
|
+
# @return [Fixnum] Hash code
|
66
|
+
def hash
|
67
|
+
[destination_type, bucket_name, namespace_name, object_name].hash
|
68
|
+
end
|
69
|
+
|
70
|
+
# Builds the object from hash
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
# @return [Object] Returns the model itself
|
73
|
+
def build_from_hash(attributes)
|
74
|
+
return nil unless attributes.is_a?(Hash)
|
75
|
+
self.class.swagger_types.each_pair do |key, type|
|
76
|
+
if type =~ /^Array<(.*)>/i
|
77
|
+
# check to ensure the input is an array given that the the attribute
|
78
|
+
# is documented as an array but the input is not
|
79
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
80
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
81
|
+
end
|
82
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
83
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
84
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
85
|
+
end
|
86
|
+
|
87
|
+
self
|
88
|
+
end
|
89
|
+
|
90
|
+
# Returns the string representation of the object
|
91
|
+
# @return [String] String presentation of the object
|
92
|
+
def to_s
|
93
|
+
to_hash.to_s
|
94
|
+
end
|
95
|
+
|
96
|
+
# Returns the object in the form of hash
|
97
|
+
# @return [Hash] Returns the object in the form of hash
|
98
|
+
def to_hash
|
99
|
+
hash = {}
|
100
|
+
self.class.attribute_map.each_pair do |attr, param|
|
101
|
+
value = self.send(attr)
|
102
|
+
next if value.nil?
|
103
|
+
hash[param] = _to_hash(value)
|
104
|
+
end
|
105
|
+
hash
|
106
|
+
end
|
107
|
+
|
108
|
+
private
|
109
|
+
|
110
|
+
# Outputs non-array value in the form of hash
|
111
|
+
# For object, use to_hash. Otherwise, just return the value
|
112
|
+
# @param [Object] value Any valid value
|
113
|
+
# @return [Hash] Returns the value in the form of hash
|
114
|
+
def _to_hash(value)
|
115
|
+
if value.is_a?(Array)
|
116
|
+
value.compact.map{ |v| _to_hash(v) }
|
117
|
+
elsif value.is_a?(Hash)
|
118
|
+
{}.tap do |hash|
|
119
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
120
|
+
end
|
121
|
+
elsif value.respond_to? :to_hash
|
122
|
+
value.to_hash
|
123
|
+
else
|
124
|
+
value
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
131
|
+
def self.attribute_map
|
132
|
+
{
|
133
|
+
:'destination_type' => :'destinationType',
|
134
|
+
:'bucket_name' => :'bucketName',
|
135
|
+
:'namespace_name' => :'namespaceName',
|
136
|
+
:'object_name' => :'objectName'
|
137
|
+
}
|
138
|
+
end
|
139
|
+
|
140
|
+
# Attribute type mapping.
|
141
|
+
def self.swagger_types
|
142
|
+
{
|
143
|
+
:'destination_type' => :'String',
|
144
|
+
:'bucket_name' => :'String',
|
145
|
+
:'namespace_name' => :'String',
|
146
|
+
:'object_name' => :'String'
|
147
|
+
}
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,130 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require_relative 'export_image_details'
|
5
|
+
|
6
|
+
module OracleBMC
|
7
|
+
class Core::Models::ExportImageViaObjectStorageUriDetails < Core::Models::ExportImageDetails
|
8
|
+
# The Object Storage Service URL to export the image to. See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs)
|
9
|
+
# and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) for constructing URLs for image import/export.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :destination_uri
|
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
|
+
attributes['destinationType'] = 'objectStorageUri'
|
21
|
+
|
22
|
+
super(attributes)
|
23
|
+
|
24
|
+
# convert string to symbol for hash key
|
25
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
26
|
+
|
27
|
+
if attributes[:'destinationUri']
|
28
|
+
self.destination_uri = attributes[:'destinationUri']
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
# Checks equality by comparing each attribute.
|
34
|
+
# @param [Object] other_object to be compared
|
35
|
+
def ==(other_object)
|
36
|
+
return true if self.equal?(other_object)
|
37
|
+
self.class == other_object.class &&
|
38
|
+
destination_type == other_object.destination_type &&
|
39
|
+
destination_uri == other_object.destination_uri
|
40
|
+
end
|
41
|
+
|
42
|
+
# @see the `==` method
|
43
|
+
# @param [Object] other_object to be compared
|
44
|
+
def eql?(other_object)
|
45
|
+
self == other_object
|
46
|
+
end
|
47
|
+
|
48
|
+
# Calculates hash code according to all attributes.
|
49
|
+
# @return [Fixnum] Hash code
|
50
|
+
def hash
|
51
|
+
[destination_type, destination_uri].hash
|
52
|
+
end
|
53
|
+
|
54
|
+
# Builds the object from hash
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
# @return [Object] Returns the model itself
|
57
|
+
def build_from_hash(attributes)
|
58
|
+
return nil unless attributes.is_a?(Hash)
|
59
|
+
self.class.swagger_types.each_pair do |key, type|
|
60
|
+
if type =~ /^Array<(.*)>/i
|
61
|
+
# check to ensure the input is an array given that the the attribute
|
62
|
+
# is documented as an array but the input is not
|
63
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
64
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
65
|
+
end
|
66
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
67
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
68
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
69
|
+
end
|
70
|
+
|
71
|
+
self
|
72
|
+
end
|
73
|
+
|
74
|
+
# Returns the string representation of the object
|
75
|
+
# @return [String] String presentation of the object
|
76
|
+
def to_s
|
77
|
+
to_hash.to_s
|
78
|
+
end
|
79
|
+
|
80
|
+
# Returns the object in the form of hash
|
81
|
+
# @return [Hash] Returns the object in the form of hash
|
82
|
+
def to_hash
|
83
|
+
hash = {}
|
84
|
+
self.class.attribute_map.each_pair do |attr, param|
|
85
|
+
value = self.send(attr)
|
86
|
+
next if value.nil?
|
87
|
+
hash[param] = _to_hash(value)
|
88
|
+
end
|
89
|
+
hash
|
90
|
+
end
|
91
|
+
|
92
|
+
private
|
93
|
+
|
94
|
+
# Outputs non-array value in the form of hash
|
95
|
+
# For object, use to_hash. Otherwise, just return the value
|
96
|
+
# @param [Object] value Any valid value
|
97
|
+
# @return [Hash] Returns the value in the form of hash
|
98
|
+
def _to_hash(value)
|
99
|
+
if value.is_a?(Array)
|
100
|
+
value.compact.map{ |v| _to_hash(v) }
|
101
|
+
elsif value.is_a?(Hash)
|
102
|
+
{}.tap do |hash|
|
103
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
104
|
+
end
|
105
|
+
elsif value.respond_to? :to_hash
|
106
|
+
value.to_hash
|
107
|
+
else
|
108
|
+
value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
115
|
+
def self.attribute_map
|
116
|
+
{
|
117
|
+
:'destination_type' => :'destinationType',
|
118
|
+
:'destination_uri' => :'destinationUri'
|
119
|
+
}
|
120
|
+
end
|
121
|
+
|
122
|
+
# Attribute type mapping.
|
123
|
+
def self.swagger_types
|
124
|
+
{
|
125
|
+
:'destination_type' => :'String',
|
126
|
+
:'destination_uri' => :'String'
|
127
|
+
}
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
@@ -28,19 +28,18 @@ module OracleBMC
|
|
28
28
|
# convert string to symbol for hash key
|
29
29
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
30
30
|
|
31
|
-
|
32
31
|
if attributes[:'description']
|
33
32
|
self.description = attributes[:'description']
|
34
33
|
end
|
35
|
-
|
34
|
+
|
36
35
|
if attributes[:'providerName']
|
37
36
|
self.provider_name = attributes[:'providerName']
|
38
37
|
end
|
39
|
-
|
38
|
+
|
40
39
|
if attributes[:'providerServiceName']
|
41
40
|
self.provider_service_name = attributes[:'providerServiceName']
|
42
41
|
end
|
43
|
-
|
42
|
+
|
44
43
|
end
|
45
44
|
|
46
45
|
# Checks equality by comparing each attribute.
|
@@ -54,27 +54,26 @@ module OracleBMC
|
|
54
54
|
# convert string to symbol for hash key
|
55
55
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
56
56
|
|
57
|
-
|
58
57
|
if attributes[:'chapSecret']
|
59
58
|
self.chap_secret = attributes[:'chapSecret']
|
60
59
|
end
|
61
|
-
|
60
|
+
|
62
61
|
if attributes[:'chapUsername']
|
63
62
|
self.chap_username = attributes[:'chapUsername']
|
64
63
|
end
|
65
|
-
|
64
|
+
|
66
65
|
if attributes[:'ipv4']
|
67
66
|
self.ipv4 = attributes[:'ipv4']
|
68
67
|
end
|
69
|
-
|
68
|
+
|
70
69
|
if attributes[:'iqn']
|
71
70
|
self.iqn = attributes[:'iqn']
|
72
71
|
end
|
73
|
-
|
72
|
+
|
74
73
|
if attributes[:'port']
|
75
74
|
self.port = attributes[:'port']
|
76
75
|
end
|
77
|
-
|
76
|
+
|
78
77
|
end
|
79
78
|
|
80
79
|
# Checks equality by comparing each attribute.
|
@@ -21,15 +21,14 @@ module OracleBMC
|
|
21
21
|
# convert string to symbol for hash key
|
22
22
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
23
23
|
|
24
|
-
|
25
24
|
if attributes[:'code']
|
26
25
|
self.code = attributes[:'code']
|
27
26
|
end
|
28
|
-
|
27
|
+
|
29
28
|
if attributes[:'type']
|
30
29
|
self.type = attributes[:'type']
|
31
30
|
end
|
32
|
-
|
31
|
+
|
33
32
|
end
|
34
33
|
|
35
34
|
# Checks equality by comparing each attribute.
|
@@ -6,7 +6,9 @@ module OracleBMC
|
|
6
6
|
class Core::Models::Image
|
7
7
|
|
8
8
|
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING',
|
9
|
+
LIFECYCLE_STATE_IMPORTING = 'IMPORTING',
|
9
10
|
LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE',
|
11
|
+
LIFECYCLE_STATE_EXPORTING = 'EXPORTING',
|
10
12
|
LIFECYCLE_STATE_DISABLED = 'DISABLED',
|
11
13
|
LIFECYCLE_STATE_DELETED = 'DELETED',
|
12
14
|
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
@@ -29,6 +31,7 @@ module OracleBMC
|
|
29
31
|
attr_accessor :create_image_allowed
|
30
32
|
|
31
33
|
# A user-friendly name for the image. It does not have to be unique, and it's changeable.
|
34
|
+
# Avoid entering confidential information.
|
32
35
|
# You cannot use an Oracle-provided image name as a custom image name.
|
33
36
|
#
|
34
37
|
# Example: `My custom Oracle Linux image`
|
@@ -73,43 +76,42 @@ module OracleBMC
|
|
73
76
|
# convert string to symbol for hash key
|
74
77
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
75
78
|
|
76
|
-
|
77
79
|
if attributes[:'baseImageId']
|
78
80
|
self.base_image_id = attributes[:'baseImageId']
|
79
81
|
end
|
80
|
-
|
82
|
+
|
81
83
|
if attributes[:'compartmentId']
|
82
84
|
self.compartment_id = attributes[:'compartmentId']
|
83
85
|
end
|
84
|
-
|
86
|
+
|
85
87
|
if attributes[:'createImageAllowed']
|
86
88
|
self.create_image_allowed = attributes[:'createImageAllowed']
|
87
89
|
end
|
88
|
-
|
90
|
+
|
89
91
|
if attributes[:'displayName']
|
90
92
|
self.display_name = attributes[:'displayName']
|
91
93
|
end
|
92
|
-
|
94
|
+
|
93
95
|
if attributes[:'id']
|
94
96
|
self.id = attributes[:'id']
|
95
97
|
end
|
96
|
-
|
98
|
+
|
97
99
|
if attributes[:'lifecycleState']
|
98
100
|
self.lifecycle_state = attributes[:'lifecycleState']
|
99
101
|
end
|
100
|
-
|
102
|
+
|
101
103
|
if attributes[:'operatingSystem']
|
102
104
|
self.operating_system = attributes[:'operatingSystem']
|
103
105
|
end
|
104
|
-
|
106
|
+
|
105
107
|
if attributes[:'operatingSystemVersion']
|
106
108
|
self.operating_system_version = attributes[:'operatingSystemVersion']
|
107
109
|
end
|
108
|
-
|
110
|
+
|
109
111
|
if attributes[:'timeCreated']
|
110
112
|
self.time_created = attributes[:'timeCreated']
|
111
113
|
end
|
112
|
-
|
114
|
+
|
113
115
|
end
|
114
116
|
|
115
117
|
# Custom attribute writer method checking allowed values (enum).
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OracleBMC
|
6
|
+
class Core::Models::ImageSourceDetails
|
7
|
+
# The source type for the image. Use `objectStorageTuple` when specifying the namespace,
|
8
|
+
# bucket name, and object name. Use `objectStorageUri` when specifying the Object Storage Service URL.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :source_type
|
12
|
+
|
13
|
+
|
14
|
+
# Given the hash representation of a subtype of this class,
|
15
|
+
# use the info in the hash to return the class of the subtype.
|
16
|
+
def self.get_subtype(object_hash)
|
17
|
+
type = object_hash[:'sourceType']
|
18
|
+
|
19
|
+
return 'OracleBMC::Core::Models::ImageSourceViaObjectStorageTupleDetails' if type == 'objectStorageTuple'
|
20
|
+
return 'OracleBMC::Core::Models::ImageSourceViaObjectStorageUriDetails' if type == 'objectStorageUri'
|
21
|
+
|
22
|
+
# TODO: Log a warning when the subtype is not found.
|
23
|
+
return 'OracleBMC::Core::Models::ImageSourceDetails'
|
24
|
+
end
|
25
|
+
|
26
|
+
# Initializes the object
|
27
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
28
|
+
def initialize(attributes = {})
|
29
|
+
return unless attributes.is_a?(Hash)
|
30
|
+
|
31
|
+
# convert string to symbol for hash key
|
32
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
33
|
+
|
34
|
+
if attributes[:'sourceType']
|
35
|
+
self.source_type = attributes[:'sourceType']
|
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
|
+
source_type == other_object.source_type
|
46
|
+
end
|
47
|
+
|
48
|
+
# @see the `==` method
|
49
|
+
# @param [Object] other_object to be compared
|
50
|
+
def eql?(other_object)
|
51
|
+
self == other_object
|
52
|
+
end
|
53
|
+
|
54
|
+
# Calculates hash code according to all attributes.
|
55
|
+
# @return [Fixnum] Hash code
|
56
|
+
def hash
|
57
|
+
[source_type].hash
|
58
|
+
end
|
59
|
+
|
60
|
+
# Builds the object from hash
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
# @return [Object] Returns the model itself
|
63
|
+
def build_from_hash(attributes)
|
64
|
+
return nil unless attributes.is_a?(Hash)
|
65
|
+
self.class.swagger_types.each_pair do |key, type|
|
66
|
+
if type =~ /^Array<(.*)>/i
|
67
|
+
# check to ensure the input is an array given that the the attribute
|
68
|
+
# is documented as an array but the input is not
|
69
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
70
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
71
|
+
end
|
72
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
73
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
74
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
75
|
+
end
|
76
|
+
|
77
|
+
self
|
78
|
+
end
|
79
|
+
|
80
|
+
# Returns the string representation of the object
|
81
|
+
# @return [String] String presentation of the object
|
82
|
+
def to_s
|
83
|
+
to_hash.to_s
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns the object in the form of hash
|
87
|
+
# @return [Hash] Returns the object in the form of hash
|
88
|
+
def to_hash
|
89
|
+
hash = {}
|
90
|
+
self.class.attribute_map.each_pair do |attr, param|
|
91
|
+
value = self.send(attr)
|
92
|
+
next if value.nil?
|
93
|
+
hash[param] = _to_hash(value)
|
94
|
+
end
|
95
|
+
hash
|
96
|
+
end
|
97
|
+
|
98
|
+
private
|
99
|
+
|
100
|
+
# Outputs non-array value in the form of hash
|
101
|
+
# For object, use to_hash. Otherwise, just return the value
|
102
|
+
# @param [Object] value Any valid value
|
103
|
+
# @return [Hash] Returns the value in the form of hash
|
104
|
+
def _to_hash(value)
|
105
|
+
if value.is_a?(Array)
|
106
|
+
value.compact.map{ |v| _to_hash(v) }
|
107
|
+
elsif value.is_a?(Hash)
|
108
|
+
{}.tap do |hash|
|
109
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
110
|
+
end
|
111
|
+
elsif value.respond_to? :to_hash
|
112
|
+
value.to_hash
|
113
|
+
else
|
114
|
+
value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
121
|
+
def self.attribute_map
|
122
|
+
{
|
123
|
+
:'source_type' => :'sourceType'
|
124
|
+
}
|
125
|
+
end
|
126
|
+
|
127
|
+
# Attribute type mapping.
|
128
|
+
def self.swagger_types
|
129
|
+
{
|
130
|
+
:'source_type' => :'String'
|
131
|
+
}
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|