oci 2.0.6 → 2.0.7
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 +4 -4
- data/README.md +23 -1
- data/lib/oci.rb +4 -7
- data/lib/oci/api_client.rb +51 -6
- data/lib/oci/auth/auth.rb +5 -2
- data/lib/oci/auth/federation_client.rb +2 -2
- data/lib/oci/auth/internal/auth_token_request_signer.rb +2 -2
- data/lib/oci/auth/security_token_container.rb +2 -2
- data/lib/oci/auth/session_key_supplier.rb +3 -4
- data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +30 -17
- data/lib/oci/auth/signers/security_token_signer.rb +13 -6
- data/lib/oci/auth/signers/x509_federation_client_based_security_token_signer.rb +8 -4
- data/lib/oci/auth/url_based_certificate_retriever.rb +3 -4
- data/lib/oci/auth/util.rb +6 -4
- data/lib/oci/base_signer.rb +54 -50
- data/lib/oci/config_file_loader.rb +3 -11
- data/lib/oci/core/blockstorage_client.rb +211 -0
- data/lib/oci/core/compute_client.rb +4 -2
- data/lib/oci/core/core.rb +9 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +5 -1
- data/lib/oci/core/models/attach_volume_details.rb +13 -1
- data/lib/oci/core/models/create_public_ip_details.rb +186 -0
- data/lib/oci/core/models/create_vnic_details.rb +8 -2
- data/lib/oci/core/models/create_volume_backup_details.rb +27 -1
- data/lib/oci/core/models/create_volume_backup_policy_assignment_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +15 -1
- data/lib/oci/core/models/get_public_ip_by_ip_address_details.rb +125 -0
- data/lib/oci/core/models/get_public_ip_by_private_ip_id_details.rb +124 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +5 -1
- data/lib/oci/core/models/public_ip.rb +328 -0
- data/lib/oci/core/models/update_public_ip_details.rb +140 -0
- data/lib/oci/core/models/volume_attachment.rb +13 -1
- data/lib/oci/core/models/volume_backup.rb +72 -1
- data/lib/oci/core/models/volume_backup_policy.rb +161 -0
- data/lib/oci/core/models/volume_backup_policy_assignment.rb +159 -0
- data/lib/oci/core/models/volume_backup_schedule.rb +191 -0
- data/lib/oci/core/virtual_network_client.rb +374 -4
- data/lib/oci/database/database_client.rb +3 -1
- data/lib/oci/dns/dns.rb +34 -0
- data/lib/oci/dns/dns_client.rb +985 -0
- data/lib/oci/dns/models/create_zone_details.rb +174 -0
- data/lib/oci/dns/models/external_master.rb +145 -0
- data/lib/oci/dns/models/patch_domain_records_details.rb +120 -0
- data/lib/oci/dns/models/patch_rr_set_details.rb +120 -0
- data/lib/oci/dns/models/patch_zone_records_details.rb +120 -0
- data/lib/oci/dns/models/record.rb +204 -0
- data/lib/oci/dns/models/record_collection.rb +121 -0
- data/lib/oci/dns/models/record_details.rb +204 -0
- data/lib/oci/dns/models/record_operation.rb +253 -0
- data/lib/oci/dns/models/rr_set.rb +123 -0
- data/lib/oci/dns/models/sort_order.rb +12 -0
- data/lib/oci/dns/models/tsig.rb +149 -0
- data/lib/oci/dns/models/update_domain_records_details.rb +120 -0
- data/lib/oci/dns/models/update_rr_set_details.rb +120 -0
- data/lib/oci/dns/models/update_zone_details.rb +122 -0
- data/lib/oci/dns/models/update_zone_records_details.rb +120 -0
- data/lib/oci/dns/models/zone.rb +272 -0
- data/lib/oci/dns/models/zone_summary.rb +230 -0
- data/lib/oci/dns/util.rb +2 -0
- data/lib/oci/errors.rb +20 -0
- data/lib/oci/identity/identity_client.rb +1 -0
- data/lib/oci/identity/models/create_dynamic_group_details.rb +4 -2
- data/lib/oci/identity/models/dynamic_group.rb +9 -6
- data/lib/oci/identity/models/update_dynamic_group_details.rb +4 -2
- data/lib/oci/load_balancer/load_balancer.rb +6 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +219 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +12 -1
- data/lib/oci/load_balancer/models/create_path_route_set_details.rb +138 -0
- data/lib/oci/load_balancer/models/listener.rb +17 -1
- data/lib/oci/load_balancer/models/listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +12 -1
- data/lib/oci/load_balancer/models/path_match_type.rb +153 -0
- data/lib/oci/load_balancer/models/path_route.rb +161 -0
- data/lib/oci/load_balancer/models/path_route_set.rb +139 -0
- data/lib/oci/load_balancer/models/path_route_set_details.rb +122 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/update_path_route_set_details.rb +122 -0
- data/lib/oci/load_balancer/util.rb +1 -3
- data/lib/oci/object_storage/transfer/multipart/internal/file_part_io_wrapper.rb +111 -0
- data/lib/oci/object_storage/transfer/multipart/internal/multipart_upload_parts_collection.rb +41 -0
- data/lib/oci/object_storage/transfer/multipart/internal/seekable_non_file_part_io_wrapper.rb +48 -0
- data/lib/oci/object_storage/transfer/multipart/internal/stdin_part_io_wrapper.rb +54 -0
- data/lib/oci/object_storage/transfer/multipart/multipart_object_assembler.rb +545 -0
- data/lib/oci/object_storage/transfer/transfer.rb +31 -0
- data/lib/oci/object_storage/transfer/upload_manager.rb +212 -0
- data/lib/oci/object_storage/transfer/upload_manager_config.rb +60 -0
- data/lib/oci/regions.rb +3 -1
- data/lib/oci/response.rb +1 -3
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waiter.rb +16 -11
- data/lib/oraclebmc.rb +1 -1
- metadata +46 -2
data/lib/oci/core/core.rb
CHANGED
|
@@ -32,6 +32,7 @@ require 'oci/core/models/create_instance_console_connection_details'
|
|
|
32
32
|
require 'oci/core/models/create_internet_gateway_details'
|
|
33
33
|
require 'oci/core/models/create_local_peering_gateway_details'
|
|
34
34
|
require 'oci/core/models/create_private_ip_details'
|
|
35
|
+
require 'oci/core/models/create_public_ip_details'
|
|
35
36
|
require 'oci/core/models/create_route_table_details'
|
|
36
37
|
require 'oci/core/models/create_security_list_details'
|
|
37
38
|
require 'oci/core/models/create_subnet_details'
|
|
@@ -40,6 +41,7 @@ require 'oci/core/models/create_virtual_circuit_details'
|
|
|
40
41
|
require 'oci/core/models/create_virtual_circuit_public_prefix_details'
|
|
41
42
|
require 'oci/core/models/create_vnic_details'
|
|
42
43
|
require 'oci/core/models/create_volume_backup_details'
|
|
44
|
+
require 'oci/core/models/create_volume_backup_policy_assignment_details'
|
|
43
45
|
require 'oci/core/models/create_volume_details'
|
|
44
46
|
require 'oci/core/models/cross_connect'
|
|
45
47
|
require 'oci/core/models/cross_connect_group'
|
|
@@ -59,6 +61,8 @@ require 'oci/core/models/export_image_details'
|
|
|
59
61
|
require 'oci/core/models/export_image_via_object_storage_tuple_details'
|
|
60
62
|
require 'oci/core/models/export_image_via_object_storage_uri_details'
|
|
61
63
|
require 'oci/core/models/fast_connect_provider_service'
|
|
64
|
+
require 'oci/core/models/get_public_ip_by_ip_address_details'
|
|
65
|
+
require 'oci/core/models/get_public_ip_by_private_ip_id_details'
|
|
62
66
|
require 'oci/core/models/ip_sec_connection'
|
|
63
67
|
require 'oci/core/models/ip_sec_connection_device_config'
|
|
64
68
|
require 'oci/core/models/ip_sec_connection_device_status'
|
|
@@ -82,6 +86,7 @@ require 'oci/core/models/letter_of_authority'
|
|
|
82
86
|
require 'oci/core/models/local_peering_gateway'
|
|
83
87
|
require 'oci/core/models/port_range'
|
|
84
88
|
require 'oci/core/models/private_ip'
|
|
89
|
+
require 'oci/core/models/public_ip'
|
|
85
90
|
require 'oci/core/models/route_rule'
|
|
86
91
|
require 'oci/core/models/route_table'
|
|
87
92
|
require 'oci/core/models/security_list'
|
|
@@ -105,6 +110,7 @@ require 'oci/core/models/update_instance_details'
|
|
|
105
110
|
require 'oci/core/models/update_internet_gateway_details'
|
|
106
111
|
require 'oci/core/models/update_local_peering_gateway_details'
|
|
107
112
|
require 'oci/core/models/update_private_ip_details'
|
|
113
|
+
require 'oci/core/models/update_public_ip_details'
|
|
108
114
|
require 'oci/core/models/update_route_table_details'
|
|
109
115
|
require 'oci/core/models/update_security_list_details'
|
|
110
116
|
require 'oci/core/models/update_subnet_details'
|
|
@@ -122,6 +128,9 @@ require 'oci/core/models/vnic_attachment'
|
|
|
122
128
|
require 'oci/core/models/volume'
|
|
123
129
|
require 'oci/core/models/volume_attachment'
|
|
124
130
|
require 'oci/core/models/volume_backup'
|
|
131
|
+
require 'oci/core/models/volume_backup_policy'
|
|
132
|
+
require 'oci/core/models/volume_backup_policy_assignment'
|
|
133
|
+
require 'oci/core/models/volume_backup_schedule'
|
|
125
134
|
require 'oci/core/models/volume_source_details'
|
|
126
135
|
require 'oci/core/models/volume_source_from_volume_backup_details'
|
|
127
136
|
require 'oci/core/models/volume_source_from_volume_details'
|
|
@@ -14,6 +14,7 @@ module OCI
|
|
|
14
14
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
15
15
|
# @option attributes [String] :displayName The value to assign to the {OCI::Core::Models::AttachVolumeDetails#display_name #display_name} proprety
|
|
16
16
|
# @option attributes [String] :instanceId The value to assign to the {OCI::Core::Models::AttachVolumeDetails#instance_id #instance_id} proprety
|
|
17
|
+
# @option attributes [BOOLEAN] :isReadOnly The value to assign to the {OCI::Core::Models::AttachVolumeDetails#is_read_only #is_read_only} proprety
|
|
17
18
|
# @option attributes [String] :volumeId The value to assign to the {OCI::Core::Models::AttachVolumeDetails#volume_id #volume_id} proprety
|
|
18
19
|
# @option attributes [BOOLEAN] :useChap The value to assign to the {#use_chap} property
|
|
19
20
|
def initialize(attributes = {})
|
|
@@ -39,6 +40,7 @@ module OCI
|
|
|
39
40
|
self.class == other_object.class &&
|
|
40
41
|
display_name == other_object.display_name &&
|
|
41
42
|
instance_id == other_object.instance_id &&
|
|
43
|
+
is_read_only == other_object.is_read_only &&
|
|
42
44
|
type == other_object.type &&
|
|
43
45
|
volume_id == other_object.volume_id &&
|
|
44
46
|
use_chap == other_object.use_chap
|
|
@@ -53,7 +55,7 @@ module OCI
|
|
|
53
55
|
# Calculates hash code according to all attributes.
|
|
54
56
|
# @return [Fixnum] Hash code
|
|
55
57
|
def hash
|
|
56
|
-
[display_name, instance_id, type, volume_id, use_chap].hash
|
|
58
|
+
[display_name, instance_id, is_read_only, type, volume_id, use_chap].hash
|
|
57
59
|
end
|
|
58
60
|
|
|
59
61
|
# Builds the object from hash
|
|
@@ -121,6 +123,7 @@ module OCI
|
|
|
121
123
|
{
|
|
122
124
|
:'display_name' => :'displayName',
|
|
123
125
|
:'instance_id' => :'instanceId',
|
|
126
|
+
:'is_read_only' => :'isReadOnly',
|
|
124
127
|
:'type' => :'type',
|
|
125
128
|
:'volume_id' => :'volumeId',
|
|
126
129
|
:'use_chap' => :'useChap'
|
|
@@ -132,6 +135,7 @@ module OCI
|
|
|
132
135
|
{
|
|
133
136
|
:'display_name' => :'String',
|
|
134
137
|
:'instance_id' => :'String',
|
|
138
|
+
:'is_read_only' => :'BOOLEAN',
|
|
135
139
|
:'type' => :'String',
|
|
136
140
|
:'volume_id' => :'String',
|
|
137
141
|
:'use_chap' => :'BOOLEAN'
|
|
@@ -14,6 +14,10 @@ module OCI
|
|
|
14
14
|
# @return [String]
|
|
15
15
|
attr_accessor :instance_id
|
|
16
16
|
|
|
17
|
+
# Whether the attachment was created in read-only mode.
|
|
18
|
+
# @return [BOOLEAN]
|
|
19
|
+
attr_accessor :is_read_only
|
|
20
|
+
|
|
17
21
|
# **[Required]** The type of volume. The only supported value is \"iscsi\".
|
|
18
22
|
# @return [String]
|
|
19
23
|
attr_accessor :type
|
|
@@ -38,6 +42,7 @@ module OCI
|
|
|
38
42
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
39
43
|
# @option attributes [String] :displayName The value to assign to the {#display_name} property
|
|
40
44
|
# @option attributes [String] :instanceId The value to assign to the {#instance_id} property
|
|
45
|
+
# @option attributes [BOOLEAN] :isReadOnly The value to assign to the {#is_read_only} property
|
|
41
46
|
# @option attributes [String] :type The value to assign to the {#type} property
|
|
42
47
|
# @option attributes [String] :volumeId The value to assign to the {#volume_id} property
|
|
43
48
|
def initialize(attributes = {})
|
|
@@ -54,6 +59,10 @@ module OCI
|
|
|
54
59
|
self.instance_id = attributes[:'instanceId']
|
|
55
60
|
end
|
|
56
61
|
|
|
62
|
+
unless attributes[:'isReadOnly'].nil?
|
|
63
|
+
self.is_read_only = attributes[:'isReadOnly']
|
|
64
|
+
end
|
|
65
|
+
|
|
57
66
|
if attributes[:'type']
|
|
58
67
|
self.type = attributes[:'type']
|
|
59
68
|
end
|
|
@@ -71,6 +80,7 @@ module OCI
|
|
|
71
80
|
self.class == other_object.class &&
|
|
72
81
|
display_name == other_object.display_name &&
|
|
73
82
|
instance_id == other_object.instance_id &&
|
|
83
|
+
is_read_only == other_object.is_read_only &&
|
|
74
84
|
type == other_object.type &&
|
|
75
85
|
volume_id == other_object.volume_id
|
|
76
86
|
end
|
|
@@ -84,7 +94,7 @@ module OCI
|
|
|
84
94
|
# Calculates hash code according to all attributes.
|
|
85
95
|
# @return [Fixnum] Hash code
|
|
86
96
|
def hash
|
|
87
|
-
[display_name, instance_id, type, volume_id].hash
|
|
97
|
+
[display_name, instance_id, is_read_only, type, volume_id].hash
|
|
88
98
|
end
|
|
89
99
|
|
|
90
100
|
# Builds the object from hash
|
|
@@ -152,6 +162,7 @@ module OCI
|
|
|
152
162
|
{
|
|
153
163
|
:'display_name' => :'displayName',
|
|
154
164
|
:'instance_id' => :'instanceId',
|
|
165
|
+
:'is_read_only' => :'isReadOnly',
|
|
155
166
|
:'type' => :'type',
|
|
156
167
|
:'volume_id' => :'volumeId'
|
|
157
168
|
}
|
|
@@ -162,6 +173,7 @@ module OCI
|
|
|
162
173
|
{
|
|
163
174
|
:'display_name' => :'String',
|
|
164
175
|
:'instance_id' => :'String',
|
|
176
|
+
:'is_read_only' => :'BOOLEAN',
|
|
165
177
|
:'type' => :'String',
|
|
166
178
|
:'volume_id' => :'String'
|
|
167
179
|
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
class Core::Models::CreatePublicIpDetails
|
|
7
|
+
|
|
8
|
+
LIFETIME_ENUM = [LIFETIME_EPHEMERAL = 'EPHEMERAL',
|
|
9
|
+
LIFETIME_RESERVED = 'RESERVED']
|
|
10
|
+
|
|
11
|
+
# **[Required]** The OCID of the compartment to contain the public IP. For ephemeral public IPs,
|
|
12
|
+
# you must set this to the private IP's compartment OCID.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :compartment_id
|
|
16
|
+
|
|
17
|
+
# A user-friendly name. Does not have to be unique, and it's changeable. Avoid
|
|
18
|
+
# entering confidential information.
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :display_name
|
|
22
|
+
|
|
23
|
+
# **[Required]** Defines when the public IP is deleted and released back to the Oracle Cloud
|
|
24
|
+
# Infrastructure public IP pool. For more information, see
|
|
25
|
+
# [Public IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm).
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :lifetime
|
|
29
|
+
|
|
30
|
+
# The OCID of the private IP to assign the public IP to.
|
|
31
|
+
#
|
|
32
|
+
# Required for an ephemeral public IP because it must always be assigned to a private IP
|
|
33
|
+
# (specifically a *primary* private IP).
|
|
34
|
+
#
|
|
35
|
+
# Optional for a reserved public IP. If you don't provide it, the public IP is created but not
|
|
36
|
+
# assigned to a private IP. You can later assign the public IP with
|
|
37
|
+
# {#update_public_ip update_public_ip}.
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :private_ip_id
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Initializes the object
|
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
45
|
+
# @option attributes [String] :compartmentId The value to assign to the {#compartment_id} property
|
|
46
|
+
# @option attributes [String] :displayName The value to assign to the {#display_name} property
|
|
47
|
+
# @option attributes [String] :lifetime The value to assign to the {#lifetime} property
|
|
48
|
+
# @option attributes [String] :privateIpId The value to assign to the {#private_ip_id} property
|
|
49
|
+
def initialize(attributes = {})
|
|
50
|
+
return unless attributes.is_a?(Hash)
|
|
51
|
+
|
|
52
|
+
# convert string to symbol for hash key
|
|
53
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
54
|
+
|
|
55
|
+
if attributes[:'compartmentId']
|
|
56
|
+
self.compartment_id = attributes[:'compartmentId']
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if attributes[:'displayName']
|
|
60
|
+
self.display_name = attributes[:'displayName']
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
if attributes[:'lifetime']
|
|
64
|
+
self.lifetime = attributes[:'lifetime']
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
if attributes[:'privateIpId']
|
|
68
|
+
self.private_ip_id = attributes[:'privateIpId']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
74
|
+
# @param [Object] lifetime Object to be assigned
|
|
75
|
+
def lifetime=(lifetime)
|
|
76
|
+
if lifetime && !LIFETIME_ENUM.include?(lifetime)
|
|
77
|
+
fail "Invalid value for 'lifetime': this must be one of the values in LIFETIME_ENUM."
|
|
78
|
+
else
|
|
79
|
+
@lifetime = lifetime
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Checks equality by comparing each attribute.
|
|
84
|
+
# @param [Object] other_object to be compared
|
|
85
|
+
def ==(other_object)
|
|
86
|
+
return true if self.equal?(other_object)
|
|
87
|
+
self.class == other_object.class &&
|
|
88
|
+
compartment_id == other_object.compartment_id &&
|
|
89
|
+
display_name == other_object.display_name &&
|
|
90
|
+
lifetime == other_object.lifetime &&
|
|
91
|
+
private_ip_id == other_object.private_ip_id
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @see the `==` method
|
|
95
|
+
# @param [Object] other_object to be compared
|
|
96
|
+
def eql?(other_object)
|
|
97
|
+
self == other_object
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Calculates hash code according to all attributes.
|
|
101
|
+
# @return [Fixnum] Hash code
|
|
102
|
+
def hash
|
|
103
|
+
[compartment_id, display_name, lifetime, private_ip_id].hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Builds the object from hash
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
# @return [Object] Returns the model itself
|
|
109
|
+
def build_from_hash(attributes)
|
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
|
111
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
112
|
+
if type =~ /^Array<(.*)>/i
|
|
113
|
+
# check to ensure the input is an array given that the the attribute
|
|
114
|
+
# is documented as an array but the input is not
|
|
115
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
116
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
117
|
+
end
|
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
119
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
120
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
self
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Returns the string representation of the object
|
|
127
|
+
# @return [String] String presentation of the object
|
|
128
|
+
def to_s
|
|
129
|
+
to_hash.to_s
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Returns the object in the form of hash
|
|
133
|
+
# @return [Hash] Returns the object in the form of hash
|
|
134
|
+
def to_hash
|
|
135
|
+
hash = {}
|
|
136
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
137
|
+
value = public_method(attr).call
|
|
138
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
139
|
+
hash[param] = _to_hash(value)
|
|
140
|
+
end
|
|
141
|
+
hash
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
private
|
|
145
|
+
|
|
146
|
+
# Outputs non-array value in the form of hash
|
|
147
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
148
|
+
# @param [Object] value Any valid value
|
|
149
|
+
# @return [Hash] Returns the value in the form of hash
|
|
150
|
+
def _to_hash(value)
|
|
151
|
+
if value.is_a?(Array)
|
|
152
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
153
|
+
elsif value.is_a?(Hash)
|
|
154
|
+
{}.tap do |hash|
|
|
155
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
156
|
+
end
|
|
157
|
+
elsif value.respond_to? :to_hash
|
|
158
|
+
value.to_hash
|
|
159
|
+
else
|
|
160
|
+
value
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
167
|
+
def self.attribute_map
|
|
168
|
+
{
|
|
169
|
+
:'compartment_id' => :'compartmentId',
|
|
170
|
+
:'display_name' => :'displayName',
|
|
171
|
+
:'lifetime' => :'lifetime',
|
|
172
|
+
:'private_ip_id' => :'privateIpId'
|
|
173
|
+
}
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Attribute type mapping.
|
|
177
|
+
def self.swagger_types
|
|
178
|
+
{
|
|
179
|
+
:'compartment_id' => :'String',
|
|
180
|
+
:'display_name' => :'String',
|
|
181
|
+
:'lifetime' => :'String',
|
|
182
|
+
:'private_ip_id' => :'String'
|
|
183
|
+
}
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -18,10 +18,16 @@ module OCI
|
|
|
18
18
|
# `prohibitPublicIpOnVnic` = true, an error is returned.
|
|
19
19
|
#
|
|
20
20
|
# **Note:** This public IP address is associated with the primary private IP
|
|
21
|
-
# on the VNIC.
|
|
22
|
-
# addresses associated with them. For more information, see
|
|
21
|
+
# on the VNIC. For more information, see
|
|
23
22
|
# [IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm).
|
|
24
23
|
#
|
|
24
|
+
# **Note:** There's a limit to the number of {PublicIp}
|
|
25
|
+
# a VNIC or instance can have. If you try to create a secondary VNIC
|
|
26
|
+
# with an assigned public IP for an instance that has already
|
|
27
|
+
# reached its public IP limit, an error is returned. For information
|
|
28
|
+
# about the public IP limits, see
|
|
29
|
+
# [Public IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm).
|
|
30
|
+
#
|
|
25
31
|
# Example: `false`
|
|
26
32
|
#
|
|
27
33
|
# @return [BOOLEAN]
|
|
@@ -4,6 +4,10 @@ require 'date'
|
|
|
4
4
|
|
|
5
5
|
module OCI
|
|
6
6
|
class Core::Models::CreateVolumeBackupDetails
|
|
7
|
+
|
|
8
|
+
TYPE_ENUM = [TYPE_FULL = 'FULL',
|
|
9
|
+
TYPE_INCREMENTAL = 'INCREMENTAL']
|
|
10
|
+
|
|
7
11
|
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
|
8
12
|
# For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
|
9
13
|
#
|
|
@@ -27,6 +31,10 @@ module OCI
|
|
|
27
31
|
# @return [Hash<String, String>]
|
|
28
32
|
attr_accessor :freeform_tags
|
|
29
33
|
|
|
34
|
+
# The type of backup to create. If omitted, defaults to INCREMENTAL.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :type
|
|
37
|
+
|
|
30
38
|
# **[Required]** The OCID of the volume that needs to be backed up.
|
|
31
39
|
# @return [String]
|
|
32
40
|
attr_accessor :volume_id
|
|
@@ -37,6 +45,7 @@ module OCI
|
|
|
37
45
|
# @option attributes [Hash<String, Hash<String, Object>>] :definedTags The value to assign to the {#defined_tags} property
|
|
38
46
|
# @option attributes [String] :displayName The value to assign to the {#display_name} property
|
|
39
47
|
# @option attributes [Hash<String, String>] :freeformTags The value to assign to the {#freeform_tags} property
|
|
48
|
+
# @option attributes [String] :type The value to assign to the {#type} property
|
|
40
49
|
# @option attributes [String] :volumeId The value to assign to the {#volume_id} property
|
|
41
50
|
def initialize(attributes = {})
|
|
42
51
|
return unless attributes.is_a?(Hash)
|
|
@@ -56,12 +65,26 @@ module OCI
|
|
|
56
65
|
self.freeform_tags = attributes[:'freeformTags']
|
|
57
66
|
end
|
|
58
67
|
|
|
68
|
+
if attributes[:'type']
|
|
69
|
+
self.type = attributes[:'type']
|
|
70
|
+
end
|
|
71
|
+
|
|
59
72
|
if attributes[:'volumeId']
|
|
60
73
|
self.volume_id = attributes[:'volumeId']
|
|
61
74
|
end
|
|
62
75
|
|
|
63
76
|
end
|
|
64
77
|
|
|
78
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
79
|
+
# @param [Object] type Object to be assigned
|
|
80
|
+
def type=(type)
|
|
81
|
+
if type && !TYPE_ENUM.include?(type)
|
|
82
|
+
fail "Invalid value for 'type': this must be one of the values in TYPE_ENUM."
|
|
83
|
+
else
|
|
84
|
+
@type = type
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
65
88
|
# Checks equality by comparing each attribute.
|
|
66
89
|
# @param [Object] other_object to be compared
|
|
67
90
|
def ==(other_object)
|
|
@@ -70,6 +93,7 @@ module OCI
|
|
|
70
93
|
defined_tags == other_object.defined_tags &&
|
|
71
94
|
display_name == other_object.display_name &&
|
|
72
95
|
freeform_tags == other_object.freeform_tags &&
|
|
96
|
+
type == other_object.type &&
|
|
73
97
|
volume_id == other_object.volume_id
|
|
74
98
|
end
|
|
75
99
|
|
|
@@ -82,7 +106,7 @@ module OCI
|
|
|
82
106
|
# Calculates hash code according to all attributes.
|
|
83
107
|
# @return [Fixnum] Hash code
|
|
84
108
|
def hash
|
|
85
|
-
[defined_tags, display_name, freeform_tags, volume_id].hash
|
|
109
|
+
[defined_tags, display_name, freeform_tags, type, volume_id].hash
|
|
86
110
|
end
|
|
87
111
|
|
|
88
112
|
# Builds the object from hash
|
|
@@ -151,6 +175,7 @@ module OCI
|
|
|
151
175
|
:'defined_tags' => :'definedTags',
|
|
152
176
|
:'display_name' => :'displayName',
|
|
153
177
|
:'freeform_tags' => :'freeformTags',
|
|
178
|
+
:'type' => :'type',
|
|
154
179
|
:'volume_id' => :'volumeId'
|
|
155
180
|
}
|
|
156
181
|
end
|
|
@@ -161,6 +186,7 @@ module OCI
|
|
|
161
186
|
:'defined_tags' => :'Hash<String, Hash<String, Object>>',
|
|
162
187
|
:'display_name' => :'String',
|
|
163
188
|
:'freeform_tags' => :'Hash<String, String>',
|
|
189
|
+
:'type' => :'String',
|
|
164
190
|
:'volume_id' => :'String'
|
|
165
191
|
}
|
|
166
192
|
end
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
class Core::Models::CreateVolumeBackupPolicyAssignmentDetails
|
|
7
|
+
# **[Required]** The OCID of the asset (e.g. a volume) to which to assign the policy.
|
|
8
|
+
# @return [String]
|
|
9
|
+
attr_accessor :asset_id
|
|
10
|
+
|
|
11
|
+
# **[Required]** The OCID of the volume backup policy to assign to an asset.
|
|
12
|
+
# @return [String]
|
|
13
|
+
attr_accessor :policy_id
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Initializes the object
|
|
17
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
18
|
+
# @option attributes [String] :assetId The value to assign to the {#asset_id} property
|
|
19
|
+
# @option attributes [String] :policyId The value to assign to the {#policy_id} property
|
|
20
|
+
def initialize(attributes = {})
|
|
21
|
+
return unless attributes.is_a?(Hash)
|
|
22
|
+
|
|
23
|
+
# convert string to symbol for hash key
|
|
24
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
25
|
+
|
|
26
|
+
if attributes[:'assetId']
|
|
27
|
+
self.asset_id = attributes[:'assetId']
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
if attributes[:'policyId']
|
|
31
|
+
self.policy_id = attributes[:'policyId']
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Checks equality by comparing each attribute.
|
|
37
|
+
# @param [Object] other_object to be compared
|
|
38
|
+
def ==(other_object)
|
|
39
|
+
return true if self.equal?(other_object)
|
|
40
|
+
self.class == other_object.class &&
|
|
41
|
+
asset_id == other_object.asset_id &&
|
|
42
|
+
policy_id == other_object.policy_id
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# @see the `==` method
|
|
46
|
+
# @param [Object] other_object to be compared
|
|
47
|
+
def eql?(other_object)
|
|
48
|
+
self == other_object
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Calculates hash code according to all attributes.
|
|
52
|
+
# @return [Fixnum] Hash code
|
|
53
|
+
def hash
|
|
54
|
+
[asset_id, policy_id].hash
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Builds the object from hash
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
# @return [Object] Returns the model itself
|
|
60
|
+
def build_from_hash(attributes)
|
|
61
|
+
return nil unless attributes.is_a?(Hash)
|
|
62
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
63
|
+
if type =~ /^Array<(.*)>/i
|
|
64
|
+
# check to ensure the input is an array given that the the attribute
|
|
65
|
+
# is documented as an array but the input is not
|
|
66
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
67
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
68
|
+
end
|
|
69
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
70
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
71
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
self
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns the string representation of the object
|
|
78
|
+
# @return [String] String presentation of the object
|
|
79
|
+
def to_s
|
|
80
|
+
to_hash.to_s
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns the object in the form of hash
|
|
84
|
+
# @return [Hash] Returns the object in the form of hash
|
|
85
|
+
def to_hash
|
|
86
|
+
hash = {}
|
|
87
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
88
|
+
value = public_method(attr).call
|
|
89
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
90
|
+
hash[param] = _to_hash(value)
|
|
91
|
+
end
|
|
92
|
+
hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
private
|
|
96
|
+
|
|
97
|
+
# Outputs non-array value in the form of hash
|
|
98
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
99
|
+
# @param [Object] value Any valid value
|
|
100
|
+
# @return [Hash] Returns the value in the form of hash
|
|
101
|
+
def _to_hash(value)
|
|
102
|
+
if value.is_a?(Array)
|
|
103
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
104
|
+
elsif value.is_a?(Hash)
|
|
105
|
+
{}.tap do |hash|
|
|
106
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
107
|
+
end
|
|
108
|
+
elsif value.respond_to? :to_hash
|
|
109
|
+
value.to_hash
|
|
110
|
+
else
|
|
111
|
+
value
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
118
|
+
def self.attribute_map
|
|
119
|
+
{
|
|
120
|
+
:'asset_id' => :'assetId',
|
|
121
|
+
:'policy_id' => :'policyId'
|
|
122
|
+
}
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Attribute type mapping.
|
|
126
|
+
def self.swagger_types
|
|
127
|
+
{
|
|
128
|
+
:'asset_id' => :'String',
|
|
129
|
+
:'policy_id' => :'String'
|
|
130
|
+
}
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|