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,120 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
class Dns::Models::PatchZoneRecordsDetails
|
|
7
|
+
# @return [Array<OCI::Dns::Models::RecordOperation>]
|
|
8
|
+
attr_accessor :items
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Initializes the object
|
|
12
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
13
|
+
# @option attributes [Array<OCI::Dns::Models::RecordOperation>] :items The value to assign to the {#items} property
|
|
14
|
+
def initialize(attributes = {})
|
|
15
|
+
return unless attributes.is_a?(Hash)
|
|
16
|
+
|
|
17
|
+
# convert string to symbol for hash key
|
|
18
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
19
|
+
|
|
20
|
+
if attributes[:'items']
|
|
21
|
+
self.items = attributes[:'items']
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Checks equality by comparing each attribute.
|
|
27
|
+
# @param [Object] other_object to be compared
|
|
28
|
+
def ==(other_object)
|
|
29
|
+
return true if self.equal?(other_object)
|
|
30
|
+
self.class == other_object.class &&
|
|
31
|
+
items == other_object.items
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# @see the `==` method
|
|
35
|
+
# @param [Object] other_object to be compared
|
|
36
|
+
def eql?(other_object)
|
|
37
|
+
self == other_object
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Calculates hash code according to all attributes.
|
|
41
|
+
# @return [Fixnum] Hash code
|
|
42
|
+
def hash
|
|
43
|
+
[items].hash
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Builds the object from hash
|
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
+
# @return [Object] Returns the model itself
|
|
49
|
+
def build_from_hash(attributes)
|
|
50
|
+
return nil unless attributes.is_a?(Hash)
|
|
51
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
52
|
+
if type =~ /^Array<(.*)>/i
|
|
53
|
+
# check to ensure the input is an array given that the the attribute
|
|
54
|
+
# is documented as an array but the input is not
|
|
55
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
56
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
57
|
+
end
|
|
58
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
59
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
60
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
self
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns the string representation of the object
|
|
67
|
+
# @return [String] String presentation of the object
|
|
68
|
+
def to_s
|
|
69
|
+
to_hash.to_s
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns the object in the form of hash
|
|
73
|
+
# @return [Hash] Returns the object in the form of hash
|
|
74
|
+
def to_hash
|
|
75
|
+
hash = {}
|
|
76
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
77
|
+
value = public_method(attr).call
|
|
78
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
79
|
+
hash[param] = _to_hash(value)
|
|
80
|
+
end
|
|
81
|
+
hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
private
|
|
85
|
+
|
|
86
|
+
# Outputs non-array value in the form of hash
|
|
87
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
88
|
+
# @param [Object] value Any valid value
|
|
89
|
+
# @return [Hash] Returns the value in the form of hash
|
|
90
|
+
def _to_hash(value)
|
|
91
|
+
if value.is_a?(Array)
|
|
92
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
93
|
+
elsif value.is_a?(Hash)
|
|
94
|
+
{}.tap do |hash|
|
|
95
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
96
|
+
end
|
|
97
|
+
elsif value.respond_to? :to_hash
|
|
98
|
+
value.to_hash
|
|
99
|
+
else
|
|
100
|
+
value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
107
|
+
def self.attribute_map
|
|
108
|
+
{
|
|
109
|
+
:'items' => :'items'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Attribute type mapping.
|
|
114
|
+
def self.swagger_types
|
|
115
|
+
{
|
|
116
|
+
:'items' => :'Array<OCI::Dns::Models::RecordOperation>'
|
|
117
|
+
}
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
# A DNS resource record. For more information about DNS records, see [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.6).
|
|
7
|
+
class Dns::Models::Record
|
|
8
|
+
# The fully qualified domain name where the record can be located.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
attr_accessor :domain
|
|
12
|
+
|
|
13
|
+
# A unique identifier for the record within its zone.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :record_hash
|
|
17
|
+
|
|
18
|
+
# A Boolean flag indicating whether or not parts of the record
|
|
19
|
+
# are unable to be explicitly managed.
|
|
20
|
+
#
|
|
21
|
+
# @return [BOOLEAN]
|
|
22
|
+
attr_accessor :is_protected
|
|
23
|
+
|
|
24
|
+
# The record's data, as whitespace-delimited tokens in
|
|
25
|
+
# type-specific presentation format.
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :rdata
|
|
29
|
+
|
|
30
|
+
# The latest version of the record's zone in which its RRSet differs
|
|
31
|
+
# from the preceding version.
|
|
32
|
+
#
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :rrset_version
|
|
35
|
+
|
|
36
|
+
# The canonical name for the record's type, such as A or CNAME. For more
|
|
37
|
+
# information, see [Resource Record (RR) TYPEs](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4).
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :rtype
|
|
41
|
+
|
|
42
|
+
# The Time To Live for the record, in seconds.
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
attr_accessor :ttl
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Initializes the object
|
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
49
|
+
# @option attributes [String] :domain The value to assign to the {#domain} property
|
|
50
|
+
# @option attributes [String] :recordHash The value to assign to the {#record_hash} property
|
|
51
|
+
# @option attributes [BOOLEAN] :isProtected The value to assign to the {#is_protected} property
|
|
52
|
+
# @option attributes [String] :rdata The value to assign to the {#rdata} property
|
|
53
|
+
# @option attributes [String] :rrsetVersion The value to assign to the {#rrset_version} property
|
|
54
|
+
# @option attributes [String] :rtype The value to assign to the {#rtype} property
|
|
55
|
+
# @option attributes [Integer] :ttl The value to assign to the {#ttl} property
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
return unless attributes.is_a?(Hash)
|
|
58
|
+
|
|
59
|
+
# convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
61
|
+
|
|
62
|
+
if attributes[:'domain']
|
|
63
|
+
self.domain = attributes[:'domain']
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if attributes[:'recordHash']
|
|
67
|
+
self.record_hash = attributes[:'recordHash']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
unless attributes[:'isProtected'].nil?
|
|
71
|
+
self.is_protected = attributes[:'isProtected']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes[:'rdata']
|
|
75
|
+
self.rdata = attributes[:'rdata']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes[:'rrsetVersion']
|
|
79
|
+
self.rrset_version = attributes[:'rrsetVersion']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes[:'rtype']
|
|
83
|
+
self.rtype = attributes[:'rtype']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes[:'ttl']
|
|
87
|
+
self.ttl = attributes[:'ttl']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Checks equality by comparing each attribute.
|
|
93
|
+
# @param [Object] other_object to be compared
|
|
94
|
+
def ==(other_object)
|
|
95
|
+
return true if self.equal?(other_object)
|
|
96
|
+
self.class == other_object.class &&
|
|
97
|
+
domain == other_object.domain &&
|
|
98
|
+
record_hash == other_object.record_hash &&
|
|
99
|
+
is_protected == other_object.is_protected &&
|
|
100
|
+
rdata == other_object.rdata &&
|
|
101
|
+
rrset_version == other_object.rrset_version &&
|
|
102
|
+
rtype == other_object.rtype &&
|
|
103
|
+
ttl == other_object.ttl
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] other_object to be compared
|
|
108
|
+
def eql?(other_object)
|
|
109
|
+
self == other_object
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Fixnum] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[domain, record_hash, is_protected, rdata, rrset_version, rtype, ttl].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
124
|
+
if type =~ /^Array<(.*)>/i
|
|
125
|
+
# check to ensure the input is an array given that the the attribute
|
|
126
|
+
# is documented as an array but the input is not
|
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
128
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
129
|
+
end
|
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
131
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
self
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the string representation of the object
|
|
139
|
+
# @return [String] String presentation of the object
|
|
140
|
+
def to_s
|
|
141
|
+
to_hash.to_s
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Returns the object in the form of hash
|
|
145
|
+
# @return [Hash] Returns the object in the form of hash
|
|
146
|
+
def to_hash
|
|
147
|
+
hash = {}
|
|
148
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
149
|
+
value = public_method(attr).call
|
|
150
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
151
|
+
hash[param] = _to_hash(value)
|
|
152
|
+
end
|
|
153
|
+
hash
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
private
|
|
157
|
+
|
|
158
|
+
# Outputs non-array value in the form of hash
|
|
159
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
160
|
+
# @param [Object] value Any valid value
|
|
161
|
+
# @return [Hash] Returns the value in the form of hash
|
|
162
|
+
def _to_hash(value)
|
|
163
|
+
if value.is_a?(Array)
|
|
164
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
165
|
+
elsif value.is_a?(Hash)
|
|
166
|
+
{}.tap do |hash|
|
|
167
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
168
|
+
end
|
|
169
|
+
elsif value.respond_to? :to_hash
|
|
170
|
+
value.to_hash
|
|
171
|
+
else
|
|
172
|
+
value
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
179
|
+
def self.attribute_map
|
|
180
|
+
{
|
|
181
|
+
:'domain' => :'domain',
|
|
182
|
+
:'record_hash' => :'recordHash',
|
|
183
|
+
:'is_protected' => :'isProtected',
|
|
184
|
+
:'rdata' => :'rdata',
|
|
185
|
+
:'rrset_version' => :'rrsetVersion',
|
|
186
|
+
:'rtype' => :'rtype',
|
|
187
|
+
:'ttl' => :'ttl'
|
|
188
|
+
}
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Attribute type mapping.
|
|
192
|
+
def self.swagger_types
|
|
193
|
+
{
|
|
194
|
+
:'domain' => :'String',
|
|
195
|
+
:'record_hash' => :'String',
|
|
196
|
+
:'is_protected' => :'BOOLEAN',
|
|
197
|
+
:'rdata' => :'String',
|
|
198
|
+
:'rrset_version' => :'String',
|
|
199
|
+
:'rtype' => :'String',
|
|
200
|
+
:'ttl' => :'Integer'
|
|
201
|
+
}
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
# A collection of DNS resource records.
|
|
7
|
+
class Dns::Models::RecordCollection
|
|
8
|
+
# @return [Array<OCI::Dns::Models::Record>]
|
|
9
|
+
attr_accessor :items
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# Initializes the object
|
|
13
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
14
|
+
# @option attributes [Array<OCI::Dns::Models::Record>] :items The value to assign to the {#items} property
|
|
15
|
+
def initialize(attributes = {})
|
|
16
|
+
return unless attributes.is_a?(Hash)
|
|
17
|
+
|
|
18
|
+
# convert string to symbol for hash key
|
|
19
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
20
|
+
|
|
21
|
+
if attributes[:'items']
|
|
22
|
+
self.items = attributes[:'items']
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Checks equality by comparing each attribute.
|
|
28
|
+
# @param [Object] other_object to be compared
|
|
29
|
+
def ==(other_object)
|
|
30
|
+
return true if self.equal?(other_object)
|
|
31
|
+
self.class == other_object.class &&
|
|
32
|
+
items == other_object.items
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @see the `==` method
|
|
36
|
+
# @param [Object] other_object to be compared
|
|
37
|
+
def eql?(other_object)
|
|
38
|
+
self == other_object
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Calculates hash code according to all attributes.
|
|
42
|
+
# @return [Fixnum] Hash code
|
|
43
|
+
def hash
|
|
44
|
+
[items].hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Builds the object from hash
|
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
49
|
+
# @return [Object] Returns the model itself
|
|
50
|
+
def build_from_hash(attributes)
|
|
51
|
+
return nil unless attributes.is_a?(Hash)
|
|
52
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
53
|
+
if type =~ /^Array<(.*)>/i
|
|
54
|
+
# check to ensure the input is an array given that the the attribute
|
|
55
|
+
# is documented as an array but the input is not
|
|
56
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
57
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
58
|
+
end
|
|
59
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
60
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
61
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
self
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns the string representation of the object
|
|
68
|
+
# @return [String] String presentation of the object
|
|
69
|
+
def to_s
|
|
70
|
+
to_hash.to_s
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns the object in the form of hash
|
|
74
|
+
# @return [Hash] Returns the object in the form of hash
|
|
75
|
+
def to_hash
|
|
76
|
+
hash = {}
|
|
77
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
78
|
+
value = public_method(attr).call
|
|
79
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
80
|
+
hash[param] = _to_hash(value)
|
|
81
|
+
end
|
|
82
|
+
hash
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
private
|
|
86
|
+
|
|
87
|
+
# Outputs non-array value in the form of hash
|
|
88
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
89
|
+
# @param [Object] value Any valid value
|
|
90
|
+
# @return [Hash] Returns the value in the form of hash
|
|
91
|
+
def _to_hash(value)
|
|
92
|
+
if value.is_a?(Array)
|
|
93
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
94
|
+
elsif value.is_a?(Hash)
|
|
95
|
+
{}.tap do |hash|
|
|
96
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
97
|
+
end
|
|
98
|
+
elsif value.respond_to? :to_hash
|
|
99
|
+
value.to_hash
|
|
100
|
+
else
|
|
101
|
+
value
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
108
|
+
def self.attribute_map
|
|
109
|
+
{
|
|
110
|
+
:'items' => :'items'
|
|
111
|
+
}
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Attribute type mapping.
|
|
115
|
+
def self.swagger_types
|
|
116
|
+
{
|
|
117
|
+
:'items' => :'Array<OCI::Dns::Models::Record>'
|
|
118
|
+
}
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
# A DNS resource record. For more information about records, see [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.6).
|
|
7
|
+
class Dns::Models::RecordDetails
|
|
8
|
+
# **[Required]** The fully qualified domain name where the record can be located.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
attr_accessor :domain
|
|
12
|
+
|
|
13
|
+
# A unique identifier for the record within its zone.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :record_hash
|
|
17
|
+
|
|
18
|
+
# A Boolean flag indicating whether or not parts of the record
|
|
19
|
+
# are unable to be explicitly managed.
|
|
20
|
+
#
|
|
21
|
+
# @return [BOOLEAN]
|
|
22
|
+
attr_accessor :is_protected
|
|
23
|
+
|
|
24
|
+
# **[Required]** The record's data, as whitespace-delimited tokens in
|
|
25
|
+
# type-specific presentation format.
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :rdata
|
|
29
|
+
|
|
30
|
+
# The latest version of the record's zone in which its RRSet differs
|
|
31
|
+
# from the preceding version.
|
|
32
|
+
#
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :rrset_version
|
|
35
|
+
|
|
36
|
+
# **[Required]** The canonical name for the record's type, such as A or CNAME. For more
|
|
37
|
+
# information, see [Resource Record (RR) TYPEs](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4).
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :rtype
|
|
41
|
+
|
|
42
|
+
# **[Required]** The Time To Live for the record, in seconds.
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
attr_accessor :ttl
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Initializes the object
|
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
49
|
+
# @option attributes [String] :domain The value to assign to the {#domain} property
|
|
50
|
+
# @option attributes [String] :recordHash The value to assign to the {#record_hash} property
|
|
51
|
+
# @option attributes [BOOLEAN] :isProtected The value to assign to the {#is_protected} property
|
|
52
|
+
# @option attributes [String] :rdata The value to assign to the {#rdata} property
|
|
53
|
+
# @option attributes [String] :rrsetVersion The value to assign to the {#rrset_version} property
|
|
54
|
+
# @option attributes [String] :rtype The value to assign to the {#rtype} property
|
|
55
|
+
# @option attributes [Integer] :ttl The value to assign to the {#ttl} property
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
return unless attributes.is_a?(Hash)
|
|
58
|
+
|
|
59
|
+
# convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
61
|
+
|
|
62
|
+
if attributes[:'domain']
|
|
63
|
+
self.domain = attributes[:'domain']
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if attributes[:'recordHash']
|
|
67
|
+
self.record_hash = attributes[:'recordHash']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
unless attributes[:'isProtected'].nil?
|
|
71
|
+
self.is_protected = attributes[:'isProtected']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes[:'rdata']
|
|
75
|
+
self.rdata = attributes[:'rdata']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes[:'rrsetVersion']
|
|
79
|
+
self.rrset_version = attributes[:'rrsetVersion']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes[:'rtype']
|
|
83
|
+
self.rtype = attributes[:'rtype']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes[:'ttl']
|
|
87
|
+
self.ttl = attributes[:'ttl']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Checks equality by comparing each attribute.
|
|
93
|
+
# @param [Object] other_object to be compared
|
|
94
|
+
def ==(other_object)
|
|
95
|
+
return true if self.equal?(other_object)
|
|
96
|
+
self.class == other_object.class &&
|
|
97
|
+
domain == other_object.domain &&
|
|
98
|
+
record_hash == other_object.record_hash &&
|
|
99
|
+
is_protected == other_object.is_protected &&
|
|
100
|
+
rdata == other_object.rdata &&
|
|
101
|
+
rrset_version == other_object.rrset_version &&
|
|
102
|
+
rtype == other_object.rtype &&
|
|
103
|
+
ttl == other_object.ttl
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] other_object to be compared
|
|
108
|
+
def eql?(other_object)
|
|
109
|
+
self == other_object
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Fixnum] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[domain, record_hash, is_protected, rdata, rrset_version, rtype, ttl].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
124
|
+
if type =~ /^Array<(.*)>/i
|
|
125
|
+
# check to ensure the input is an array given that the the attribute
|
|
126
|
+
# is documented as an array but the input is not
|
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
128
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
129
|
+
end
|
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
131
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
self
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the string representation of the object
|
|
139
|
+
# @return [String] String presentation of the object
|
|
140
|
+
def to_s
|
|
141
|
+
to_hash.to_s
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Returns the object in the form of hash
|
|
145
|
+
# @return [Hash] Returns the object in the form of hash
|
|
146
|
+
def to_hash
|
|
147
|
+
hash = {}
|
|
148
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
149
|
+
value = public_method(attr).call
|
|
150
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
151
|
+
hash[param] = _to_hash(value)
|
|
152
|
+
end
|
|
153
|
+
hash
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
private
|
|
157
|
+
|
|
158
|
+
# Outputs non-array value in the form of hash
|
|
159
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
160
|
+
# @param [Object] value Any valid value
|
|
161
|
+
# @return [Hash] Returns the value in the form of hash
|
|
162
|
+
def _to_hash(value)
|
|
163
|
+
if value.is_a?(Array)
|
|
164
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
165
|
+
elsif value.is_a?(Hash)
|
|
166
|
+
{}.tap do |hash|
|
|
167
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
168
|
+
end
|
|
169
|
+
elsif value.respond_to? :to_hash
|
|
170
|
+
value.to_hash
|
|
171
|
+
else
|
|
172
|
+
value
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
179
|
+
def self.attribute_map
|
|
180
|
+
{
|
|
181
|
+
:'domain' => :'domain',
|
|
182
|
+
:'record_hash' => :'recordHash',
|
|
183
|
+
:'is_protected' => :'isProtected',
|
|
184
|
+
:'rdata' => :'rdata',
|
|
185
|
+
:'rrset_version' => :'rrsetVersion',
|
|
186
|
+
:'rtype' => :'rtype',
|
|
187
|
+
:'ttl' => :'ttl'
|
|
188
|
+
}
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Attribute type mapping.
|
|
192
|
+
def self.swagger_types
|
|
193
|
+
{
|
|
194
|
+
:'domain' => :'String',
|
|
195
|
+
:'record_hash' => :'String',
|
|
196
|
+
:'is_protected' => :'BOOLEAN',
|
|
197
|
+
:'rdata' => :'String',
|
|
198
|
+
:'rrset_version' => :'String',
|
|
199
|
+
:'rtype' => :'String',
|
|
200
|
+
:'ttl' => :'Integer'
|
|
201
|
+
}
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|