oci 2.3.0 → 2.3.1
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 +1 -1
- data/lib/oci/core/blockstorage_client.rb +412 -13
- data/lib/oci/core/blockstorage_client_composite_operations.rb +158 -0
- data/lib/oci/core/compute_client.rb +6 -7
- data/lib/oci/core/core.rb +13 -0
- data/lib/oci/core/models/boot_volume.rb +68 -1
- data/lib/oci/core/models/boot_volume_backup.rb +435 -0
- data/lib/oci/core/models/boot_volume_source_details.rb +163 -0
- data/lib/oci/core/models/boot_volume_source_from_boot_volume_backup_details.rb +154 -0
- data/lib/oci/core/models/boot_volume_source_from_boot_volume_details.rb +154 -0
- data/lib/oci/core/models/create_boot_volume_backup_details.rb +227 -0
- data/lib/oci/core/models/create_boot_volume_details.rb +250 -0
- data/lib/oci/core/models/create_service_gateway_details.rb +228 -0
- data/lib/oci/core/models/egress_security_rule.rb +44 -3
- data/lib/oci/core/models/ingress_security_rule.rb +47 -3
- data/lib/oci/core/models/instance_source_via_image_details.rb +0 -1
- data/lib/oci/core/models/route_rule.rb +59 -2
- data/lib/oci/core/models/service.rb +185 -0
- data/lib/oci/core/models/service_gateway.rb +325 -0
- data/lib/oci/core/models/service_id_request_details.rb +151 -0
- data/lib/oci/core/models/service_id_response_details.rb +165 -0
- data/lib/oci/core/models/update_boot_volume_backup_details.rb +189 -0
- data/lib/oci/core/models/update_boot_volume_details.rb +41 -4
- data/lib/oci/core/models/update_service_gateway_details.rb +225 -0
- data/lib/oci/core/models/volume_group.rb +21 -7
- data/lib/oci/core/models/volume_group_backup.rb +39 -7
- data/lib/oci/core/models/volume_group_source_from_volumes_details.rb +1 -1
- data/lib/oci/core/virtual_network_client.rb +582 -1
- data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
- data/lib/oci/version.rb +1 -1
- metadata +15 -2
@@ -0,0 +1,151 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
6
|
+
module OCI
|
7
|
+
# ServiceIdRequestDetails model.
|
8
|
+
class Core::Models::ServiceIdRequestDetails # rubocop:disable Metrics/LineLength
|
9
|
+
# **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the service.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :service_id
|
13
|
+
|
14
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
15
|
+
def self.attribute_map
|
16
|
+
{
|
17
|
+
# rubocop:disable Style/SymbolLiteral
|
18
|
+
'service_id': :'serviceId'
|
19
|
+
# rubocop:enable Style/SymbolLiteral
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Attribute type mapping.
|
24
|
+
def self.swagger_types
|
25
|
+
{
|
26
|
+
# rubocop:disable Style/SymbolLiteral
|
27
|
+
'service_id': :'String'
|
28
|
+
# rubocop:enable Style/SymbolLiteral
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
33
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
34
|
+
|
35
|
+
|
36
|
+
# Initializes the object
|
37
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
38
|
+
# @option attributes [String] :service_id The value to assign to the {#service_id} property
|
39
|
+
def initialize(attributes = {})
|
40
|
+
return unless attributes.is_a?(Hash)
|
41
|
+
|
42
|
+
# convert string to symbol for hash key
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
44
|
+
|
45
|
+
self.service_id = attributes[:'serviceId'] if attributes[:'serviceId']
|
46
|
+
|
47
|
+
raise 'You cannot provide both :serviceId and :service_id' if attributes.key?(:'serviceId') && attributes.key?(:'service_id')
|
48
|
+
|
49
|
+
self.service_id = attributes[:'service_id'] if attributes[:'service_id']
|
50
|
+
end
|
51
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
52
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
53
|
+
|
54
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
55
|
+
|
56
|
+
|
57
|
+
# Checks equality by comparing each attribute.
|
58
|
+
# @param [Object] other the other object to be compared
|
59
|
+
def ==(other)
|
60
|
+
return true if equal?(other)
|
61
|
+
self.class == other.class &&
|
62
|
+
service_id == other.service_id
|
63
|
+
end
|
64
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
65
|
+
|
66
|
+
# @see the `==` method
|
67
|
+
# @param [Object] other the other object to be compared
|
68
|
+
def eql?(other)
|
69
|
+
self == other
|
70
|
+
end
|
71
|
+
|
72
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
73
|
+
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Fixnum] Hash code
|
77
|
+
def hash
|
78
|
+
[service_id].hash
|
79
|
+
end
|
80
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
81
|
+
|
82
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
83
|
+
|
84
|
+
|
85
|
+
# Builds the object from hash
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
# @return [Object] Returns the model itself
|
88
|
+
def build_from_hash(attributes)
|
89
|
+
return nil unless attributes.is_a?(Hash)
|
90
|
+
self.class.swagger_types.each_pair do |key, type|
|
91
|
+
if type =~ /^Array<(.*)>/i
|
92
|
+
# check to ensure the input is an array given that the the attribute
|
93
|
+
# is documented as an array but the input is not
|
94
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
95
|
+
public_method("#{key}=").call(
|
96
|
+
attributes[self.class.attribute_map[key]]
|
97
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
98
|
+
)
|
99
|
+
end
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
+
public_method("#{key}=").call(
|
102
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
103
|
+
)
|
104
|
+
end
|
105
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
106
|
+
end
|
107
|
+
|
108
|
+
self
|
109
|
+
end
|
110
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
111
|
+
|
112
|
+
# Returns the string representation of the object
|
113
|
+
# @return [String] String presentation of the object
|
114
|
+
def to_s
|
115
|
+
to_hash.to_s
|
116
|
+
end
|
117
|
+
|
118
|
+
# Returns the object in the form of hash
|
119
|
+
# @return [Hash] Returns the object in the form of hash
|
120
|
+
def to_hash
|
121
|
+
hash = {}
|
122
|
+
self.class.attribute_map.each_pair do |attr, param|
|
123
|
+
value = public_method(attr).call
|
124
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
125
|
+
hash[param] = _to_hash(value)
|
126
|
+
end
|
127
|
+
hash
|
128
|
+
end
|
129
|
+
|
130
|
+
private
|
131
|
+
|
132
|
+
# Outputs non-array value in the form of hash
|
133
|
+
# For object, use to_hash. Otherwise, just return the value
|
134
|
+
# @param [Object] value Any valid value
|
135
|
+
# @return [Hash] Returns the value in the form of hash
|
136
|
+
def _to_hash(value)
|
137
|
+
if value.is_a?(Array)
|
138
|
+
value.compact.map { |v| _to_hash(v) }
|
139
|
+
elsif value.is_a?(Hash)
|
140
|
+
{}.tap do |hash|
|
141
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
142
|
+
end
|
143
|
+
elsif value.respond_to? :to_hash
|
144
|
+
value.to_hash
|
145
|
+
else
|
146
|
+
value
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -0,0 +1,165 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
6
|
+
module OCI
|
7
|
+
# ServiceIdResponseDetails model.
|
8
|
+
class Core::Models::ServiceIdResponseDetails # rubocop:disable Metrics/LineLength
|
9
|
+
# **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the service.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :service_id
|
13
|
+
|
14
|
+
# **[Required]** The name of the service.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :service_name
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
# rubocop:disable Style/SymbolLiteral
|
22
|
+
'service_id': :'serviceId',
|
23
|
+
'service_name': :'serviceName'
|
24
|
+
# rubocop:enable Style/SymbolLiteral
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
# rubocop:disable Style/SymbolLiteral
|
32
|
+
'service_id': :'String',
|
33
|
+
'service_name': :'String'
|
34
|
+
# rubocop:enable Style/SymbolLiteral
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
39
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
40
|
+
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
# @option attributes [String] :service_id The value to assign to the {#service_id} property
|
45
|
+
# @option attributes [String] :service_name The value to assign to the {#service_name} property
|
46
|
+
def initialize(attributes = {})
|
47
|
+
return unless attributes.is_a?(Hash)
|
48
|
+
|
49
|
+
# convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
51
|
+
|
52
|
+
self.service_id = attributes[:'serviceId'] if attributes[:'serviceId']
|
53
|
+
|
54
|
+
raise 'You cannot provide both :serviceId and :service_id' if attributes.key?(:'serviceId') && attributes.key?(:'service_id')
|
55
|
+
|
56
|
+
self.service_id = attributes[:'service_id'] if attributes[:'service_id']
|
57
|
+
|
58
|
+
self.service_name = attributes[:'serviceName'] if attributes[:'serviceName']
|
59
|
+
|
60
|
+
raise 'You cannot provide both :serviceName and :service_name' if attributes.key?(:'serviceName') && attributes.key?(:'service_name')
|
61
|
+
|
62
|
+
self.service_name = attributes[:'service_name'] if attributes[:'service_name']
|
63
|
+
end
|
64
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
65
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
66
|
+
|
67
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
68
|
+
|
69
|
+
|
70
|
+
# Checks equality by comparing each attribute.
|
71
|
+
# @param [Object] other the other object to be compared
|
72
|
+
def ==(other)
|
73
|
+
return true if equal?(other)
|
74
|
+
self.class == other.class &&
|
75
|
+
service_id == other.service_id &&
|
76
|
+
service_name == other.service_name
|
77
|
+
end
|
78
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
79
|
+
|
80
|
+
# @see the `==` method
|
81
|
+
# @param [Object] other the other object to be compared
|
82
|
+
def eql?(other)
|
83
|
+
self == other
|
84
|
+
end
|
85
|
+
|
86
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
87
|
+
|
88
|
+
|
89
|
+
# Calculates hash code according to all attributes.
|
90
|
+
# @return [Fixnum] Hash code
|
91
|
+
def hash
|
92
|
+
[service_id, service_name].hash
|
93
|
+
end
|
94
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
95
|
+
|
96
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
97
|
+
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def build_from_hash(attributes)
|
103
|
+
return nil unless attributes.is_a?(Hash)
|
104
|
+
self.class.swagger_types.each_pair do |key, type|
|
105
|
+
if type =~ /^Array<(.*)>/i
|
106
|
+
# check to ensure the input is an array given that the the attribute
|
107
|
+
# is documented as an array but the input is not
|
108
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
109
|
+
public_method("#{key}=").call(
|
110
|
+
attributes[self.class.attribute_map[key]]
|
111
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
112
|
+
)
|
113
|
+
end
|
114
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
115
|
+
public_method("#{key}=").call(
|
116
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
117
|
+
)
|
118
|
+
end
|
119
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
120
|
+
end
|
121
|
+
|
122
|
+
self
|
123
|
+
end
|
124
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
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
|
+
end
|
164
|
+
end
|
165
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -0,0 +1,189 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
6
|
+
module OCI
|
7
|
+
# UpdateBootVolumeBackupDetails model.
|
8
|
+
class Core::Models::UpdateBootVolumeBackupDetails # rubocop:disable Metrics/LineLength
|
9
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
10
|
+
# For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
11
|
+
#
|
12
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
13
|
+
#
|
14
|
+
# @return [Hash<String, Hash<String, Object>>]
|
15
|
+
attr_accessor :defined_tags
|
16
|
+
|
17
|
+
# A friendly user-specified name for the boot volume backup.
|
18
|
+
# Avoid entering confidential information.
|
19
|
+
#
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :display_name
|
22
|
+
|
23
|
+
# Free-form tags for this resource. Each tag is a simple key-value pair with no
|
24
|
+
# predefined name, type, or namespace. For more information, see
|
25
|
+
# [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
26
|
+
#
|
27
|
+
# Example: `{\"Department\": \"Finance\"}`
|
28
|
+
#
|
29
|
+
# @return [Hash<String, String>]
|
30
|
+
attr_accessor :freeform_tags
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
# rubocop:disable Style/SymbolLiteral
|
36
|
+
'defined_tags': :'definedTags',
|
37
|
+
'display_name': :'displayName',
|
38
|
+
'freeform_tags': :'freeformTags'
|
39
|
+
# rubocop:enable Style/SymbolLiteral
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.swagger_types
|
45
|
+
{
|
46
|
+
# rubocop:disable Style/SymbolLiteral
|
47
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
48
|
+
'display_name': :'String',
|
49
|
+
'freeform_tags': :'Hash<String, String>'
|
50
|
+
# rubocop:enable Style/SymbolLiteral
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
55
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
56
|
+
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
61
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
62
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return unless attributes.is_a?(Hash)
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
|
+
|
69
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
70
|
+
|
71
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
72
|
+
|
73
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
74
|
+
|
75
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
76
|
+
|
77
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
78
|
+
|
79
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
80
|
+
|
81
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
82
|
+
|
83
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
84
|
+
|
85
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
86
|
+
end
|
87
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
88
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
89
|
+
|
90
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
91
|
+
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] other the other object to be compared
|
95
|
+
def ==(other)
|
96
|
+
return true if equal?(other)
|
97
|
+
self.class == other.class &&
|
98
|
+
defined_tags == other.defined_tags &&
|
99
|
+
display_name == other.display_name &&
|
100
|
+
freeform_tags == other.freeform_tags
|
101
|
+
end
|
102
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] other the other object to be compared
|
106
|
+
def eql?(other)
|
107
|
+
self == other
|
108
|
+
end
|
109
|
+
|
110
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
111
|
+
|
112
|
+
|
113
|
+
# Calculates hash code according to all attributes.
|
114
|
+
# @return [Fixnum] Hash code
|
115
|
+
def hash
|
116
|
+
[defined_tags, display_name, freeform_tags].hash
|
117
|
+
end
|
118
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
119
|
+
|
120
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
121
|
+
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def build_from_hash(attributes)
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
128
|
+
self.class.swagger_types.each_pair do |key, type|
|
129
|
+
if type =~ /^Array<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
public_method("#{key}=").call(
|
134
|
+
attributes[self.class.attribute_map[key]]
|
135
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
136
|
+
)
|
137
|
+
end
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
139
|
+
public_method("#{key}=").call(
|
140
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
141
|
+
)
|
142
|
+
end
|
143
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
144
|
+
end
|
145
|
+
|
146
|
+
self
|
147
|
+
end
|
148
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
149
|
+
|
150
|
+
# Returns the string representation of the object
|
151
|
+
# @return [String] String presentation of the object
|
152
|
+
def to_s
|
153
|
+
to_hash.to_s
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns the object in the form of hash
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_hash
|
159
|
+
hash = {}
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
161
|
+
value = public_method(attr).call
|
162
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
163
|
+
hash[param] = _to_hash(value)
|
164
|
+
end
|
165
|
+
hash
|
166
|
+
end
|
167
|
+
|
168
|
+
private
|
169
|
+
|
170
|
+
# Outputs non-array value in the form of hash
|
171
|
+
# For object, use to_hash. Otherwise, just return the value
|
172
|
+
# @param [Object] value Any valid value
|
173
|
+
# @return [Hash] Returns the value in the form of hash
|
174
|
+
def _to_hash(value)
|
175
|
+
if value.is_a?(Array)
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
177
|
+
elsif value.is_a?(Hash)
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
180
|
+
end
|
181
|
+
elsif value.respond_to? :to_hash
|
182
|
+
value.to_hash
|
183
|
+
else
|
184
|
+
value
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|