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
|
@@ -0,0 +1,140 @@
|
|
|
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::UpdatePublicIpDetails
|
|
7
|
+
# A user-friendly name. Does not have to be unique, and it's changeable. Avoid
|
|
8
|
+
# entering confidential information.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
attr_accessor :display_name
|
|
12
|
+
|
|
13
|
+
# The OCID of the private IP to assign the public IP to.
|
|
14
|
+
# * If the public IP is already assigned to a different private IP, it will be unassigned
|
|
15
|
+
# and then reassigned to the specified private IP.
|
|
16
|
+
# * If you set this field to an empty string, the public IP will be unassigned from the
|
|
17
|
+
# private IP it is currently assigned to.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :private_ip_id
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# Initializes the object
|
|
24
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
25
|
+
# @option attributes [String] :displayName The value to assign to the {#display_name} property
|
|
26
|
+
# @option attributes [String] :privateIpId The value to assign to the {#private_ip_id} property
|
|
27
|
+
def initialize(attributes = {})
|
|
28
|
+
return unless attributes.is_a?(Hash)
|
|
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[:'displayName']
|
|
34
|
+
self.display_name = attributes[:'displayName']
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
if attributes[:'privateIpId']
|
|
38
|
+
self.private_ip_id = attributes[:'privateIpId']
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Checks equality by comparing each attribute.
|
|
44
|
+
# @param [Object] other_object to be compared
|
|
45
|
+
def ==(other_object)
|
|
46
|
+
return true if self.equal?(other_object)
|
|
47
|
+
self.class == other_object.class &&
|
|
48
|
+
display_name == other_object.display_name &&
|
|
49
|
+
private_ip_id == other_object.private_ip_id
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @see the `==` method
|
|
53
|
+
# @param [Object] other_object to be compared
|
|
54
|
+
def eql?(other_object)
|
|
55
|
+
self == other_object
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Calculates hash code according to all attributes.
|
|
59
|
+
# @return [Fixnum] Hash code
|
|
60
|
+
def hash
|
|
61
|
+
[display_name, private_ip_id].hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Builds the object from hash
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
# @return [Object] Returns the model itself
|
|
67
|
+
def build_from_hash(attributes)
|
|
68
|
+
return nil unless attributes.is_a?(Hash)
|
|
69
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
70
|
+
if type =~ /^Array<(.*)>/i
|
|
71
|
+
# check to ensure the input is an array given that the the attribute
|
|
72
|
+
# is documented as an array but the input is not
|
|
73
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
74
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
75
|
+
end
|
|
76
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
77
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
78
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
self
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns the string representation of the object
|
|
85
|
+
# @return [String] String presentation of the object
|
|
86
|
+
def to_s
|
|
87
|
+
to_hash.to_s
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Returns the object in the form of hash
|
|
91
|
+
# @return [Hash] Returns the object in the form of hash
|
|
92
|
+
def to_hash
|
|
93
|
+
hash = {}
|
|
94
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
95
|
+
value = public_method(attr).call
|
|
96
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
97
|
+
hash[param] = _to_hash(value)
|
|
98
|
+
end
|
|
99
|
+
hash
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
private
|
|
103
|
+
|
|
104
|
+
# Outputs non-array value in the form of hash
|
|
105
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
106
|
+
# @param [Object] value Any valid value
|
|
107
|
+
# @return [Hash] Returns the value in the form of hash
|
|
108
|
+
def _to_hash(value)
|
|
109
|
+
if value.is_a?(Array)
|
|
110
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
111
|
+
elsif value.is_a?(Hash)
|
|
112
|
+
{}.tap do |hash|
|
|
113
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
114
|
+
end
|
|
115
|
+
elsif value.respond_to? :to_hash
|
|
116
|
+
value.to_hash
|
|
117
|
+
else
|
|
118
|
+
value
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
125
|
+
def self.attribute_map
|
|
126
|
+
{
|
|
127
|
+
:'display_name' => :'displayName',
|
|
128
|
+
:'private_ip_id' => :'privateIpId'
|
|
129
|
+
}
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Attribute type mapping.
|
|
133
|
+
def self.swagger_types
|
|
134
|
+
{
|
|
135
|
+
:'display_name' => :'String',
|
|
136
|
+
:'private_ip_id' => :'String'
|
|
137
|
+
}
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
@@ -50,6 +50,10 @@ module OCI
|
|
|
50
50
|
# @return [String]
|
|
51
51
|
attr_accessor :instance_id
|
|
52
52
|
|
|
53
|
+
# Whether the attachment was created in read-only mode.
|
|
54
|
+
# @return [BOOLEAN]
|
|
55
|
+
attr_accessor :is_read_only
|
|
56
|
+
|
|
53
57
|
# **[Required]** The current state of the volume attachment.
|
|
54
58
|
# @return [String]
|
|
55
59
|
attr_accessor :lifecycle_state
|
|
@@ -85,6 +89,7 @@ module OCI
|
|
|
85
89
|
# @option attributes [String] :displayName The value to assign to the {#display_name} property
|
|
86
90
|
# @option attributes [String] :id The value to assign to the {#id} property
|
|
87
91
|
# @option attributes [String] :instanceId The value to assign to the {#instance_id} property
|
|
92
|
+
# @option attributes [BOOLEAN] :isReadOnly The value to assign to the {#is_read_only} property
|
|
88
93
|
# @option attributes [String] :lifecycleState The value to assign to the {#lifecycle_state} property
|
|
89
94
|
# @option attributes [DateTime] :timeCreated The value to assign to the {#time_created} property
|
|
90
95
|
# @option attributes [String] :volumeId The value to assign to the {#volume_id} property
|
|
@@ -118,6 +123,10 @@ module OCI
|
|
|
118
123
|
self.instance_id = attributes[:'instanceId']
|
|
119
124
|
end
|
|
120
125
|
|
|
126
|
+
unless attributes[:'isReadOnly'].nil?
|
|
127
|
+
self.is_read_only = attributes[:'isReadOnly']
|
|
128
|
+
end
|
|
129
|
+
|
|
121
130
|
if attributes[:'lifecycleState']
|
|
122
131
|
self.lifecycle_state = attributes[:'lifecycleState']
|
|
123
132
|
end
|
|
@@ -153,6 +162,7 @@ module OCI
|
|
|
153
162
|
display_name == other_object.display_name &&
|
|
154
163
|
id == other_object.id &&
|
|
155
164
|
instance_id == other_object.instance_id &&
|
|
165
|
+
is_read_only == other_object.is_read_only &&
|
|
156
166
|
lifecycle_state == other_object.lifecycle_state &&
|
|
157
167
|
time_created == other_object.time_created &&
|
|
158
168
|
volume_id == other_object.volume_id
|
|
@@ -167,7 +177,7 @@ module OCI
|
|
|
167
177
|
# Calculates hash code according to all attributes.
|
|
168
178
|
# @return [Fixnum] Hash code
|
|
169
179
|
def hash
|
|
170
|
-
[attachment_type, availability_domain, compartment_id, display_name, id, instance_id, lifecycle_state, time_created, volume_id].hash
|
|
180
|
+
[attachment_type, availability_domain, compartment_id, display_name, id, instance_id, is_read_only, lifecycle_state, time_created, volume_id].hash
|
|
171
181
|
end
|
|
172
182
|
|
|
173
183
|
# Builds the object from hash
|
|
@@ -239,6 +249,7 @@ module OCI
|
|
|
239
249
|
:'display_name' => :'displayName',
|
|
240
250
|
:'id' => :'id',
|
|
241
251
|
:'instance_id' => :'instanceId',
|
|
252
|
+
:'is_read_only' => :'isReadOnly',
|
|
242
253
|
:'lifecycle_state' => :'lifecycleState',
|
|
243
254
|
:'time_created' => :'timeCreated',
|
|
244
255
|
:'volume_id' => :'volumeId'
|
|
@@ -254,6 +265,7 @@ module OCI
|
|
|
254
265
|
:'display_name' => :'String',
|
|
255
266
|
:'id' => :'String',
|
|
256
267
|
:'instance_id' => :'String',
|
|
268
|
+
:'is_read_only' => :'BOOLEAN',
|
|
257
269
|
:'lifecycle_state' => :'String',
|
|
258
270
|
:'time_created' => :'DateTime',
|
|
259
271
|
:'volume_id' => :'String'
|
|
@@ -21,6 +21,16 @@ module OCI
|
|
|
21
21
|
LIFECYCLE_STATE_REQUEST_RECEIVED = 'REQUEST_RECEIVED',
|
|
22
22
|
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
SOURCE_TYPE_ENUM = [SOURCE_TYPE_MANUAL = 'MANUAL',
|
|
26
|
+
SOURCE_TYPE_SCHEDULED = 'SCHEDULED',
|
|
27
|
+
SOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
TYPE_ENUM = [TYPE_FULL = 'FULL',
|
|
31
|
+
TYPE_INCREMENTAL = 'INCREMENTAL',
|
|
32
|
+
TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
|
33
|
+
|
|
24
34
|
# **[Required]** The OCID of the compartment that contains the volume backup.
|
|
25
35
|
# @return [String]
|
|
26
36
|
attr_accessor :compartment_id
|
|
@@ -39,6 +49,15 @@ module OCI
|
|
|
39
49
|
# @return [String]
|
|
40
50
|
attr_accessor :display_name
|
|
41
51
|
|
|
52
|
+
# The date and time the volume backup will expire and be automatically deleted.
|
|
53
|
+
# Format defined by RFC3339. This parameter will always be present for backups that
|
|
54
|
+
# were created automatically by a scheduled-backup policy. For manually created backups,
|
|
55
|
+
# it will be absent, signifying that there is no expiration time and the backup will
|
|
56
|
+
# last forever until manually deleted.
|
|
57
|
+
#
|
|
58
|
+
# @return [DateTime]
|
|
59
|
+
attr_accessor :expiration_time
|
|
60
|
+
|
|
42
61
|
# Free-form tags for this resource. Each tag is a simple key-value pair with no
|
|
43
62
|
# predefined name, type, or namespace. For more information, see
|
|
44
63
|
# [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
|
@@ -67,6 +86,10 @@ module OCI
|
|
|
67
86
|
# @return [Integer]
|
|
68
87
|
attr_accessor :size_in_mbs
|
|
69
88
|
|
|
89
|
+
# Specifies whether the backup was created manually, or via scheduled backup policy.
|
|
90
|
+
# @return [String]
|
|
91
|
+
attr_accessor :source_type
|
|
92
|
+
|
|
70
93
|
# **[Required]** The date and time the volume backup was created. This is the time the actual point-in-time image
|
|
71
94
|
# of the volume data was taken. Format defined by RFC3339.
|
|
72
95
|
#
|
|
@@ -78,6 +101,10 @@ module OCI
|
|
|
78
101
|
# @return [DateTime]
|
|
79
102
|
attr_accessor :time_request_received
|
|
80
103
|
|
|
104
|
+
# **[Required]** The type of a volume backup.
|
|
105
|
+
# @return [String]
|
|
106
|
+
attr_accessor :type
|
|
107
|
+
|
|
81
108
|
# The size used by the backup, in GBs. It is typically smaller than sizeInGBs, depending on the space
|
|
82
109
|
# consumed on the volume and whether the backup is full or incremental.
|
|
83
110
|
#
|
|
@@ -101,13 +128,16 @@ module OCI
|
|
|
101
128
|
# @option attributes [String] :compartmentId The value to assign to the {#compartment_id} property
|
|
102
129
|
# @option attributes [Hash<String, Hash<String, Object>>] :definedTags The value to assign to the {#defined_tags} property
|
|
103
130
|
# @option attributes [String] :displayName The value to assign to the {#display_name} property
|
|
131
|
+
# @option attributes [DateTime] :expirationTime The value to assign to the {#expiration_time} property
|
|
104
132
|
# @option attributes [Hash<String, String>] :freeformTags The value to assign to the {#freeform_tags} property
|
|
105
133
|
# @option attributes [String] :id The value to assign to the {#id} property
|
|
106
134
|
# @option attributes [String] :lifecycleState The value to assign to the {#lifecycle_state} property
|
|
107
135
|
# @option attributes [Integer] :sizeInGBs The value to assign to the {#size_in_gbs} property
|
|
108
136
|
# @option attributes [Integer] :sizeInMBs The value to assign to the {#size_in_mbs} property
|
|
137
|
+
# @option attributes [String] :sourceType The value to assign to the {#source_type} property
|
|
109
138
|
# @option attributes [DateTime] :timeCreated The value to assign to the {#time_created} property
|
|
110
139
|
# @option attributes [DateTime] :timeRequestReceived The value to assign to the {#time_request_received} property
|
|
140
|
+
# @option attributes [String] :type The value to assign to the {#type} property
|
|
111
141
|
# @option attributes [Integer] :uniqueSizeInGBs The value to assign to the {#unique_size_in_gbs} property
|
|
112
142
|
# @option attributes [Integer] :uniqueSizeInMbs The value to assign to the {#unique_size_in_mbs} property
|
|
113
143
|
# @option attributes [String] :volumeId The value to assign to the {#volume_id} property
|
|
@@ -129,6 +159,10 @@ module OCI
|
|
|
129
159
|
self.display_name = attributes[:'displayName']
|
|
130
160
|
end
|
|
131
161
|
|
|
162
|
+
if attributes[:'expirationTime']
|
|
163
|
+
self.expiration_time = attributes[:'expirationTime']
|
|
164
|
+
end
|
|
165
|
+
|
|
132
166
|
if attributes[:'freeformTags']
|
|
133
167
|
self.freeform_tags = attributes[:'freeformTags']
|
|
134
168
|
end
|
|
@@ -149,6 +183,10 @@ module OCI
|
|
|
149
183
|
self.size_in_mbs = attributes[:'sizeInMBs']
|
|
150
184
|
end
|
|
151
185
|
|
|
186
|
+
if attributes[:'sourceType']
|
|
187
|
+
self.source_type = attributes[:'sourceType']
|
|
188
|
+
end
|
|
189
|
+
|
|
152
190
|
if attributes[:'timeCreated']
|
|
153
191
|
self.time_created = attributes[:'timeCreated']
|
|
154
192
|
end
|
|
@@ -157,6 +195,10 @@ module OCI
|
|
|
157
195
|
self.time_request_received = attributes[:'timeRequestReceived']
|
|
158
196
|
end
|
|
159
197
|
|
|
198
|
+
if attributes[:'type']
|
|
199
|
+
self.type = attributes[:'type']
|
|
200
|
+
end
|
|
201
|
+
|
|
160
202
|
if attributes[:'uniqueSizeInGBs']
|
|
161
203
|
self.unique_size_in_gbs = attributes[:'uniqueSizeInGBs']
|
|
162
204
|
end
|
|
@@ -181,6 +223,26 @@ module OCI
|
|
|
181
223
|
end
|
|
182
224
|
end
|
|
183
225
|
|
|
226
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
227
|
+
# @param [Object] source_type Object to be assigned
|
|
228
|
+
def source_type=(source_type)
|
|
229
|
+
if source_type && !SOURCE_TYPE_ENUM.include?(source_type)
|
|
230
|
+
@source_type = SOURCE_TYPE_UNKNOWN_ENUM_VALUE
|
|
231
|
+
else
|
|
232
|
+
@source_type = source_type
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
237
|
+
# @param [Object] type Object to be assigned
|
|
238
|
+
def type=(type)
|
|
239
|
+
if type && !TYPE_ENUM.include?(type)
|
|
240
|
+
@type = TYPE_UNKNOWN_ENUM_VALUE
|
|
241
|
+
else
|
|
242
|
+
@type = type
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
184
246
|
# Checks equality by comparing each attribute.
|
|
185
247
|
# @param [Object] other_object to be compared
|
|
186
248
|
def ==(other_object)
|
|
@@ -189,13 +251,16 @@ module OCI
|
|
|
189
251
|
compartment_id == other_object.compartment_id &&
|
|
190
252
|
defined_tags == other_object.defined_tags &&
|
|
191
253
|
display_name == other_object.display_name &&
|
|
254
|
+
expiration_time == other_object.expiration_time &&
|
|
192
255
|
freeform_tags == other_object.freeform_tags &&
|
|
193
256
|
id == other_object.id &&
|
|
194
257
|
lifecycle_state == other_object.lifecycle_state &&
|
|
195
258
|
size_in_gbs == other_object.size_in_gbs &&
|
|
196
259
|
size_in_mbs == other_object.size_in_mbs &&
|
|
260
|
+
source_type == other_object.source_type &&
|
|
197
261
|
time_created == other_object.time_created &&
|
|
198
262
|
time_request_received == other_object.time_request_received &&
|
|
263
|
+
type == other_object.type &&
|
|
199
264
|
unique_size_in_gbs == other_object.unique_size_in_gbs &&
|
|
200
265
|
unique_size_in_mbs == other_object.unique_size_in_mbs &&
|
|
201
266
|
volume_id == other_object.volume_id
|
|
@@ -210,7 +275,7 @@ module OCI
|
|
|
210
275
|
# Calculates hash code according to all attributes.
|
|
211
276
|
# @return [Fixnum] Hash code
|
|
212
277
|
def hash
|
|
213
|
-
[compartment_id, defined_tags, display_name, freeform_tags, id, lifecycle_state, size_in_gbs, size_in_mbs, time_created, time_request_received, unique_size_in_gbs, unique_size_in_mbs, volume_id].hash
|
|
278
|
+
[compartment_id, defined_tags, display_name, expiration_time, freeform_tags, id, lifecycle_state, size_in_gbs, size_in_mbs, source_type, time_created, time_request_received, type, unique_size_in_gbs, unique_size_in_mbs, volume_id].hash
|
|
214
279
|
end
|
|
215
280
|
|
|
216
281
|
# Builds the object from hash
|
|
@@ -279,13 +344,16 @@ module OCI
|
|
|
279
344
|
:'compartment_id' => :'compartmentId',
|
|
280
345
|
:'defined_tags' => :'definedTags',
|
|
281
346
|
:'display_name' => :'displayName',
|
|
347
|
+
:'expiration_time' => :'expirationTime',
|
|
282
348
|
:'freeform_tags' => :'freeformTags',
|
|
283
349
|
:'id' => :'id',
|
|
284
350
|
:'lifecycle_state' => :'lifecycleState',
|
|
285
351
|
:'size_in_gbs' => :'sizeInGBs',
|
|
286
352
|
:'size_in_mbs' => :'sizeInMBs',
|
|
353
|
+
:'source_type' => :'sourceType',
|
|
287
354
|
:'time_created' => :'timeCreated',
|
|
288
355
|
:'time_request_received' => :'timeRequestReceived',
|
|
356
|
+
:'type' => :'type',
|
|
289
357
|
:'unique_size_in_gbs' => :'uniqueSizeInGBs',
|
|
290
358
|
:'unique_size_in_mbs' => :'uniqueSizeInMbs',
|
|
291
359
|
:'volume_id' => :'volumeId'
|
|
@@ -298,13 +366,16 @@ module OCI
|
|
|
298
366
|
:'compartment_id' => :'String',
|
|
299
367
|
:'defined_tags' => :'Hash<String, Hash<String, Object>>',
|
|
300
368
|
:'display_name' => :'String',
|
|
369
|
+
:'expiration_time' => :'DateTime',
|
|
301
370
|
:'freeform_tags' => :'Hash<String, String>',
|
|
302
371
|
:'id' => :'String',
|
|
303
372
|
:'lifecycle_state' => :'String',
|
|
304
373
|
:'size_in_gbs' => :'Integer',
|
|
305
374
|
:'size_in_mbs' => :'Integer',
|
|
375
|
+
:'source_type' => :'String',
|
|
306
376
|
:'time_created' => :'DateTime',
|
|
307
377
|
:'time_request_received' => :'DateTime',
|
|
378
|
+
:'type' => :'String',
|
|
308
379
|
:'unique_size_in_gbs' => :'Integer',
|
|
309
380
|
:'unique_size_in_mbs' => :'Integer',
|
|
310
381
|
:'volume_id' => :'String'
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
# A policy for automatically creating volume backups according to a recurring schedule. Has a set of one or more schedules that control when and how backups are created.
|
|
7
|
+
class Core::Models::VolumeBackupPolicy
|
|
8
|
+
# **[Required]** A user-friendly name for the volume backup policy. Does not have to be unique and it's changeable.
|
|
9
|
+
# Avoid entering confidential information.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
attr_accessor :display_name
|
|
13
|
+
|
|
14
|
+
# **[Required]** The OCID of the volume backup policy.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# **[Required]** The collection of schedules that this policy will apply.
|
|
19
|
+
# @return [Array<OCI::Core::Models::VolumeBackupSchedule>]
|
|
20
|
+
attr_accessor :schedules
|
|
21
|
+
|
|
22
|
+
# **[Required]** The date and time the volume backup policy was created. Format defined by RFC3339.
|
|
23
|
+
#
|
|
24
|
+
# @return [DateTime]
|
|
25
|
+
attr_accessor :time_created
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Initializes the object
|
|
29
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
30
|
+
# @option attributes [String] :displayName The value to assign to the {#display_name} property
|
|
31
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
|
32
|
+
# @option attributes [Array<OCI::Core::Models::VolumeBackupSchedule>] :schedules The value to assign to the {#schedules} property
|
|
33
|
+
# @option attributes [DateTime] :timeCreated The value to assign to the {#time_created} property
|
|
34
|
+
def initialize(attributes = {})
|
|
35
|
+
return unless attributes.is_a?(Hash)
|
|
36
|
+
|
|
37
|
+
# convert string to symbol for hash key
|
|
38
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
39
|
+
|
|
40
|
+
if attributes[:'displayName']
|
|
41
|
+
self.display_name = attributes[:'displayName']
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
if attributes[:'id']
|
|
45
|
+
self.id = attributes[:'id']
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
if attributes[:'schedules']
|
|
49
|
+
self.schedules = attributes[:'schedules']
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
if attributes[:'timeCreated']
|
|
53
|
+
self.time_created = attributes[:'timeCreated']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Checks equality by comparing each attribute.
|
|
59
|
+
# @param [Object] other_object to be compared
|
|
60
|
+
def ==(other_object)
|
|
61
|
+
return true if self.equal?(other_object)
|
|
62
|
+
self.class == other_object.class &&
|
|
63
|
+
display_name == other_object.display_name &&
|
|
64
|
+
id == other_object.id &&
|
|
65
|
+
schedules == other_object.schedules &&
|
|
66
|
+
time_created == other_object.time_created
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @see the `==` method
|
|
70
|
+
# @param [Object] other_object to be compared
|
|
71
|
+
def eql?(other_object)
|
|
72
|
+
self == other_object
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Calculates hash code according to all attributes.
|
|
76
|
+
# @return [Fixnum] Hash code
|
|
77
|
+
def hash
|
|
78
|
+
[display_name, id, schedules, time_created].hash
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Builds the object from hash
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
# @return [Object] Returns the model itself
|
|
84
|
+
def build_from_hash(attributes)
|
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
|
86
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
87
|
+
if type =~ /^Array<(.*)>/i
|
|
88
|
+
# check to ensure the input is an array given that the the attribute
|
|
89
|
+
# is documented as an array but the input is not
|
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
91
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
92
|
+
end
|
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
94
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
self
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Returns the string representation of the object
|
|
102
|
+
# @return [String] String presentation of the object
|
|
103
|
+
def to_s
|
|
104
|
+
to_hash.to_s
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Returns the object in the form of hash
|
|
108
|
+
# @return [Hash] Returns the object in the form of hash
|
|
109
|
+
def to_hash
|
|
110
|
+
hash = {}
|
|
111
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
112
|
+
value = public_method(attr).call
|
|
113
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
114
|
+
hash[param] = _to_hash(value)
|
|
115
|
+
end
|
|
116
|
+
hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
private
|
|
120
|
+
|
|
121
|
+
# Outputs non-array value in the form of hash
|
|
122
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
123
|
+
# @param [Object] value Any valid value
|
|
124
|
+
# @return [Hash] Returns the value in the form of hash
|
|
125
|
+
def _to_hash(value)
|
|
126
|
+
if value.is_a?(Array)
|
|
127
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
128
|
+
elsif value.is_a?(Hash)
|
|
129
|
+
{}.tap do |hash|
|
|
130
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
131
|
+
end
|
|
132
|
+
elsif value.respond_to? :to_hash
|
|
133
|
+
value.to_hash
|
|
134
|
+
else
|
|
135
|
+
value
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
142
|
+
def self.attribute_map
|
|
143
|
+
{
|
|
144
|
+
:'display_name' => :'displayName',
|
|
145
|
+
:'id' => :'id',
|
|
146
|
+
:'schedules' => :'schedules',
|
|
147
|
+
:'time_created' => :'timeCreated'
|
|
148
|
+
}
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Attribute type mapping.
|
|
152
|
+
def self.swagger_types
|
|
153
|
+
{
|
|
154
|
+
:'display_name' => :'String',
|
|
155
|
+
:'id' => :'String',
|
|
156
|
+
:'schedules' => :'Array<OCI::Core::Models::VolumeBackupSchedule>',
|
|
157
|
+
:'time_created' => :'DateTime'
|
|
158
|
+
}
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|