oci 2.5.11 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/oci.rb +1 -0
- data/lib/oci/auth/federation_client.rb +2 -1
- data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +6 -1
- data/lib/oci/auth/url_based_certificate_retriever.rb +6 -2
- data/lib/oci/auth/util.rb +18 -0
- data/lib/oci/core/compute_client.rb +730 -48
- data/lib/oci/core/compute_client_composite_operations.rb +119 -0
- data/lib/oci/core/compute_management_client.rb +11 -4
- data/lib/oci/core/core.rb +13 -0
- data/lib/oci/core/models/add_security_rule_details.rb +4 -2
- data/lib/oci/core/models/attach_vnic_details.rb +1 -0
- data/lib/oci/core/models/capture_console_history_details.rb +1 -0
- data/lib/oci/core/models/change_dedicated_vm_host_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_dhcp_options_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_internet_gateway_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_local_peering_gateway_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_network_security_group_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_public_ip_compartment_details.rb +155 -0
- data/lib/oci/core/models/create_dedicated_vm_host_details.rb +262 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +4 -2
- data/lib/oci/core/models/create_image_details.rb +1 -1
- data/lib/oci/core/models/create_instance_configuration_base.rb +16 -6
- data/lib/oci/core/models/create_instance_configuration_details.rb +1 -1
- data/lib/oci/core/models/create_instance_configuration_from_instance_details.rb +3 -2
- data/lib/oci/core/models/create_instance_pool_details.rb +3 -1
- data/lib/oci/core/models/create_local_peering_gateway_details.rb +1 -1
- data/lib/oci/core/models/create_service_gateway_details.rb +1 -1
- data/lib/oci/core/models/create_volume_group_backup_details.rb +3 -1
- data/lib/oci/core/models/create_volume_group_details.rb +1 -1
- data/lib/oci/core/models/cross_connect_mapping.rb +4 -0
- data/lib/oci/core/models/dedicated_vm_host.rb +359 -0
- data/lib/oci/core/models/dedicated_vm_host_instance_shape_summary.rb +170 -0
- data/lib/oci/core/models/dedicated_vm_host_instance_summary.rb +215 -0
- data/lib/oci/core/models/dedicated_vm_host_shape_summary.rb +171 -0
- data/lib/oci/core/models/dedicated_vm_host_summary.rb +325 -0
- data/lib/oci/core/models/drg_attachment.rb +6 -3
- data/lib/oci/core/models/egress_security_rule.rb +1 -0
- data/lib/oci/core/models/image.rb +2 -0
- data/lib/oci/core/models/ingress_security_rule.rb +2 -1
- data/lib/oci/core/models/instance.rb +16 -1
- data/lib/oci/core/models/instance_configuration.rb +10 -7
- data/lib/oci/core/models/ipv6.rb +2 -0
- data/lib/oci/core/models/launch_instance_details.rb +16 -1
- data/lib/oci/core/models/launch_options.rb +3 -2
- data/lib/oci/core/models/local_peering_gateway.rb +4 -3
- data/lib/oci/core/models/route_rule.rb +2 -1
- data/lib/oci/core/models/security_rule.rb +3 -1
- data/lib/oci/core/models/service_gateway.rb +4 -3
- data/lib/oci/core/models/subnet.rb +2 -1
- data/lib/oci/core/models/update_console_history_details.rb +1 -0
- data/lib/oci/core/models/update_dedicated_vm_host_details.rb +194 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +6 -3
- data/lib/oci/core/models/update_instance_pool_details.rb +3 -1
- data/lib/oci/core/models/update_local_peering_gateway_details.rb +4 -3
- data/lib/oci/core/models/update_network_security_group_details.rb +2 -0
- data/lib/oci/core/models/update_security_rule_details.rb +4 -2
- data/lib/oci/core/models/update_service_gateway_details.rb +4 -3
- data/lib/oci/core/models/update_vnic_details.rb +2 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +1 -1
- data/lib/oci/core/models/update_volume_group_backup_details.rb +2 -1
- data/lib/oci/core/models/update_volume_group_details.rb +2 -1
- data/lib/oci/core/models/vcn.rb +2 -1
- data/lib/oci/core/models/volume_backup_schedule.rb +1 -1
- data/lib/oci/core/virtual_network_client.rb +396 -59
- data/lib/oci/dts/dts.rb +57 -0
- data/lib/oci/dts/models/attach_devices_details.rb +153 -0
- data/lib/oci/dts/models/change_transfer_job_compartment_details.rb +154 -0
- data/lib/oci/dts/models/create_transfer_appliance_details.rb +152 -0
- data/lib/oci/dts/models/create_transfer_appliance_entitlement_details.rb +178 -0
- data/lib/oci/dts/models/create_transfer_device_details.rb +165 -0
- data/lib/oci/dts/models/create_transfer_job_details.rb +238 -0
- data/lib/oci/dts/models/create_transfer_package_details.rb +178 -0
- data/lib/oci/dts/models/detach_devices_details.rb +153 -0
- data/lib/oci/dts/models/multiple_transfer_appliances.rb +153 -0
- data/lib/oci/dts/models/multiple_transfer_devices.rb +153 -0
- data/lib/oci/dts/models/multiple_transfer_packages.rb +153 -0
- data/lib/oci/dts/models/new_transfer_device.rb +246 -0
- data/lib/oci/dts/models/shipping_address.rb +263 -0
- data/lib/oci/dts/models/shipping_vendors.rb +149 -0
- data/lib/oci/dts/models/transfer_appliance.rb +367 -0
- data/lib/oci/dts/models/transfer_appliance_certificate.rb +148 -0
- data/lib/oci/dts/models/transfer_appliance_encryption_passphrase.rb +152 -0
- data/lib/oci/dts/models/transfer_appliance_entitlement.rb +240 -0
- data/lib/oci/dts/models/transfer_appliance_public_key.rb +152 -0
- data/lib/oci/dts/models/transfer_appliance_summary.rb +223 -0
- data/lib/oci/dts/models/transfer_device.rb +268 -0
- data/lib/oci/dts/models/transfer_device_summary.rb +254 -0
- data/lib/oci/dts/models/transfer_job.rb +356 -0
- data/lib/oci/dts/models/transfer_job_summary.rb +296 -0
- data/lib/oci/dts/models/transfer_package.rb +281 -0
- data/lib/oci/dts/models/transfer_package_summary.rb +201 -0
- data/lib/oci/dts/models/update_transfer_appliance_details.rb +180 -0
- data/lib/oci/dts/models/update_transfer_device_details.rb +166 -0
- data/lib/oci/dts/models/update_transfer_job_details.rb +237 -0
- data/lib/oci/dts/models/update_transfer_package_details.rb +204 -0
- data/lib/oci/dts/shipping_vendors_client.rb +165 -0
- data/lib/oci/dts/shipping_vendors_client_composite_operations.rb +24 -0
- data/lib/oci/dts/transfer_appliance_client.rb +569 -0
- data/lib/oci/dts/transfer_appliance_client_composite_operations.rb +104 -0
- data/lib/oci/dts/transfer_appliance_entitlement_client.rb +223 -0
- data/lib/oci/dts/transfer_appliance_entitlement_client_composite_operations.rb +24 -0
- data/lib/oci/dts/transfer_device_client.rb +402 -0
- data/lib/oci/dts/transfer_device_client_composite_operations.rb +65 -0
- data/lib/oci/dts/transfer_job_client.rb +458 -0
- data/lib/oci/dts/transfer_job_client_composite_operations.rb +143 -0
- data/lib/oci/dts/transfer_package_client.rb +515 -0
- data/lib/oci/dts/transfer_package_client_composite_operations.rb +104 -0
- data/lib/oci/dts/util.rb +2 -0
- data/lib/oci/file_storage/models/create_file_system_details.rb +19 -4
- data/lib/oci/file_storage/models/file_system.rb +19 -4
- data/lib/oci/file_storage/models/file_system_summary.rb +19 -4
- data/lib/oci/file_storage/models/update_file_system_details.rb +22 -4
- data/lib/oci/limits/limits.rb +5 -0
- data/lib/oci/limits/limits_client.rb +444 -0
- data/lib/oci/limits/limits_client_composite_operations.rb +24 -0
- data/lib/oci/limits/models/create_quota_details.rb +1 -1
- data/lib/oci/limits/models/limit_definition_summary.rb +241 -0
- data/lib/oci/limits/models/limit_value_summary.rb +210 -0
- data/lib/oci/limits/models/quota.rb +1 -1
- data/lib/oci/limits/models/resource_availability.rb +163 -0
- data/lib/oci/limits/models/service_summary.rb +159 -0
- data/lib/oci/limits/models/update_quota_details.rb +1 -1
- data/lib/oci/limits/quotas_client.rb +12 -11
- data/lib/oci/monitoring/models/alarm.rb +20 -1
- data/lib/oci/monitoring/models/create_alarm_details.rb +20 -1
- data/lib/oci/monitoring/models/list_metrics_details.rb +23 -3
- data/lib/oci/monitoring/models/metric.rb +20 -1
- data/lib/oci/monitoring/models/metric_data.rb +20 -1
- data/lib/oci/monitoring/models/metric_data_details.rb +20 -1
- data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +20 -1
- data/lib/oci/monitoring/models/update_alarm_details.rb +20 -1
- data/lib/oci/regions.rb +14 -8
- data/lib/oci/streaming/models/archiver.rb +291 -0
- data/lib/oci/streaming/models/archiver_error.rb +159 -0
- data/lib/oci/streaming/models/archiver_lifecycle_state.rb +14 -0
- data/lib/oci/streaming/models/archiver_start_position.rb +10 -0
- data/lib/oci/streaming/models/create_archiver_details.rb +223 -0
- data/lib/oci/streaming/models/update_archiver_details.rb +222 -0
- data/lib/oci/streaming/stream_admin_client.rb +304 -0
- data/lib/oci/streaming/stream_admin_client_composite_operations.rb +162 -0
- data/lib/oci/streaming/streaming.rb +6 -0
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule.rb +121 -4
- data/lib/oci/waas/models/access_rule_criteria.rb +12 -0
- data/lib/oci/waas/models/address_list.rb +289 -0
- data/lib/oci/waas/models/address_list_summary.rb +279 -0
- data/lib/oci/waas/models/caching_rule.rb +243 -0
- data/lib/oci/waas/models/caching_rule_criteria.rb +194 -0
- data/lib/oci/waas/models/caching_rule_summary.rb +246 -0
- data/lib/oci/waas/models/certificate.rb +22 -9
- data/lib/oci/waas/models/certificate_extensions.rb +3 -0
- data/lib/oci/waas/models/certificate_issuer_name.rb +225 -0
- data/lib/oci/waas/models/certificate_public_key_info.rb +4 -1
- data/lib/oci/waas/models/certificate_subject_name.rb +8 -1
- data/lib/oci/waas/models/certificate_summary.rb +10 -2
- data/lib/oci/waas/models/change_address_list_compartment_details.rb +154 -0
- data/lib/oci/waas/models/change_custom_protection_rule_compartment_details.rb +154 -0
- data/lib/oci/waas/models/create_address_list_details.rb +213 -0
- data/lib/oci/waas/models/create_certificate_details.rb +22 -3
- data/lib/oci/waas/models/create_custom_protection_rule_details.rb +251 -0
- data/lib/oci/waas/models/create_waas_policy_details.rb +26 -4
- data/lib/oci/waas/models/custom_protection_rule.rb +326 -0
- data/lib/oci/waas/models/custom_protection_rule_setting.rb +180 -0
- data/lib/oci/waas/models/custom_protection_rule_summary.rb +279 -0
- data/lib/oci/waas/models/origin_group.rb +149 -0
- data/lib/oci/waas/models/origin_group_origins.rb +159 -0
- data/lib/oci/waas/models/policy_config.rb +201 -4
- data/lib/oci/waas/models/protection_rule_exclusion.rb +2 -2
- data/lib/oci/waas/models/purge_cache.rb +149 -0
- data/lib/oci/waas/models/update_address_list_details.rb +199 -0
- data/lib/oci/waas/models/update_certificate_details.rb +10 -2
- data/lib/oci/waas/models/update_custom_protection_rule_details.rb +237 -0
- data/lib/oci/waas/models/update_waas_policy_details.rb +26 -4
- data/lib/oci/waas/models/waas_policy.rb +25 -3
- data/lib/oci/waas/models/waas_policy_custom_protection_rule_summary.rb +207 -0
- data/lib/oci/waas/models/waas_policy_summary.rb +10 -2
- data/lib/oci/waas/models/waf_config.rb +43 -1
- data/lib/oci/waas/models/waf_config_details.rb +43 -1
- data/lib/oci/waas/models/waf_log.rb +3 -3
- data/lib/oci/waas/models/work_request.rb +4 -1
- data/lib/oci/waas/models/work_request_operation_types.rb +4 -1
- data/lib/oci/waas/models/work_request_summary.rb +4 -1
- data/lib/oci/waas/waas.rb +19 -0
- data/lib/oci/waas/waas_client.rb +1147 -61
- data/lib/oci/waas/waas_client_composite_operations.rb +386 -0
- metadata +90 -2
@@ -0,0 +1,148 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
6
|
+
module OCI
|
7
|
+
# TransferApplianceCertificate model.
|
8
|
+
class Dts::Models::TransferApplianceCertificate
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :certificate
|
11
|
+
|
12
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
13
|
+
def self.attribute_map
|
14
|
+
{
|
15
|
+
# rubocop:disable Style/SymbolLiteral
|
16
|
+
'certificate': :'certificate'
|
17
|
+
# rubocop:enable Style/SymbolLiteral
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# Attribute type mapping.
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
# rubocop:disable Style/SymbolLiteral
|
25
|
+
'certificate': :'String'
|
26
|
+
# rubocop:enable Style/SymbolLiteral
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
31
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
32
|
+
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
# @option attributes [String] :certificate The value to assign to the {#certificate} property
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
|
+
|
43
|
+
self.certificate = attributes[:'certificate'] if attributes[:'certificate']
|
44
|
+
end
|
45
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
46
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
47
|
+
|
48
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
49
|
+
|
50
|
+
|
51
|
+
# Checks equality by comparing each attribute.
|
52
|
+
# @param [Object] other the other object to be compared
|
53
|
+
def ==(other)
|
54
|
+
return true if equal?(other)
|
55
|
+
|
56
|
+
self.class == other.class &&
|
57
|
+
certificate == other.certificate
|
58
|
+
end
|
59
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
60
|
+
|
61
|
+
# @see the `==` method
|
62
|
+
# @param [Object] other the other object to be compared
|
63
|
+
def eql?(other)
|
64
|
+
self == other
|
65
|
+
end
|
66
|
+
|
67
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
68
|
+
|
69
|
+
|
70
|
+
# Calculates hash code according to all attributes.
|
71
|
+
# @return [Fixnum] Hash code
|
72
|
+
def hash
|
73
|
+
[certificate].hash
|
74
|
+
end
|
75
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
76
|
+
|
77
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
78
|
+
|
79
|
+
|
80
|
+
# Builds the object from hash
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
# @return [Object] Returns the model itself
|
83
|
+
def build_from_hash(attributes)
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
85
|
+
|
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
|
+
public_method("#{key}=").call(
|
92
|
+
attributes[self.class.attribute_map[key]]
|
93
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
94
|
+
)
|
95
|
+
end
|
96
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
97
|
+
public_method("#{key}=").call(
|
98
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
99
|
+
)
|
100
|
+
end
|
101
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
102
|
+
end
|
103
|
+
|
104
|
+
self
|
105
|
+
end
|
106
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
107
|
+
|
108
|
+
# Returns the string representation of the object
|
109
|
+
# @return [String] String presentation of the object
|
110
|
+
def to_s
|
111
|
+
to_hash.to_s
|
112
|
+
end
|
113
|
+
|
114
|
+
# Returns the object in the form of hash
|
115
|
+
# @return [Hash] Returns the object in the form of hash
|
116
|
+
def to_hash
|
117
|
+
hash = {}
|
118
|
+
self.class.attribute_map.each_pair do |attr, param|
|
119
|
+
value = public_method(attr).call
|
120
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
121
|
+
|
122
|
+
hash[param] = _to_hash(value)
|
123
|
+
end
|
124
|
+
hash
|
125
|
+
end
|
126
|
+
|
127
|
+
private
|
128
|
+
|
129
|
+
# Outputs non-array value in the form of hash
|
130
|
+
# For object, use to_hash. Otherwise, just return the value
|
131
|
+
# @param [Object] value Any valid value
|
132
|
+
# @return [Hash] Returns the value in the form of hash
|
133
|
+
def _to_hash(value)
|
134
|
+
if value.is_a?(Array)
|
135
|
+
value.compact.map { |v| _to_hash(v) }
|
136
|
+
elsif value.is_a?(Hash)
|
137
|
+
{}.tap do |hash|
|
138
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
139
|
+
end
|
140
|
+
elsif value.respond_to? :to_hash
|
141
|
+
value.to_hash
|
142
|
+
else
|
143
|
+
value
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,152 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
6
|
+
module OCI
|
7
|
+
# TransferApplianceEncryptionPassphrase model.
|
8
|
+
class Dts::Models::TransferApplianceEncryptionPassphrase
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :encryption_passphrase
|
11
|
+
|
12
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
13
|
+
def self.attribute_map
|
14
|
+
{
|
15
|
+
# rubocop:disable Style/SymbolLiteral
|
16
|
+
'encryption_passphrase': :'encryptionPassphrase'
|
17
|
+
# rubocop:enable Style/SymbolLiteral
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# Attribute type mapping.
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
# rubocop:disable Style/SymbolLiteral
|
25
|
+
'encryption_passphrase': :'String'
|
26
|
+
# rubocop:enable Style/SymbolLiteral
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
31
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
32
|
+
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
# @option attributes [String] :encryption_passphrase The value to assign to the {#encryption_passphrase} property
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
|
+
|
43
|
+
self.encryption_passphrase = attributes[:'encryptionPassphrase'] if attributes[:'encryptionPassphrase']
|
44
|
+
|
45
|
+
raise 'You cannot provide both :encryptionPassphrase and :encryption_passphrase' if attributes.key?(:'encryptionPassphrase') && attributes.key?(:'encryption_passphrase')
|
46
|
+
|
47
|
+
self.encryption_passphrase = attributes[:'encryption_passphrase'] if attributes[:'encryption_passphrase']
|
48
|
+
end
|
49
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
50
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
51
|
+
|
52
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
53
|
+
|
54
|
+
|
55
|
+
# Checks equality by comparing each attribute.
|
56
|
+
# @param [Object] other the other object to be compared
|
57
|
+
def ==(other)
|
58
|
+
return true if equal?(other)
|
59
|
+
|
60
|
+
self.class == other.class &&
|
61
|
+
encryption_passphrase == other.encryption_passphrase
|
62
|
+
end
|
63
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
64
|
+
|
65
|
+
# @see the `==` method
|
66
|
+
# @param [Object] other the other object to be compared
|
67
|
+
def eql?(other)
|
68
|
+
self == other
|
69
|
+
end
|
70
|
+
|
71
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
72
|
+
|
73
|
+
|
74
|
+
# Calculates hash code according to all attributes.
|
75
|
+
# @return [Fixnum] Hash code
|
76
|
+
def hash
|
77
|
+
[encryption_passphrase].hash
|
78
|
+
end
|
79
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
80
|
+
|
81
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
82
|
+
|
83
|
+
|
84
|
+
# Builds the object from hash
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
86
|
+
# @return [Object] Returns the model itself
|
87
|
+
def build_from_hash(attributes)
|
88
|
+
return nil unless attributes.is_a?(Hash)
|
89
|
+
|
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
|
+
|
126
|
+
hash[param] = _to_hash(value)
|
127
|
+
end
|
128
|
+
hash
|
129
|
+
end
|
130
|
+
|
131
|
+
private
|
132
|
+
|
133
|
+
# Outputs non-array value in the form of hash
|
134
|
+
# For object, use to_hash. Otherwise, just return the value
|
135
|
+
# @param [Object] value Any valid value
|
136
|
+
# @return [Hash] Returns the value in the form of hash
|
137
|
+
def _to_hash(value)
|
138
|
+
if value.is_a?(Array)
|
139
|
+
value.compact.map { |v| _to_hash(v) }
|
140
|
+
elsif value.is_a?(Hash)
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
143
|
+
end
|
144
|
+
elsif value.respond_to? :to_hash
|
145
|
+
value.to_hash
|
146
|
+
else
|
147
|
+
value
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,240 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# TransferApplianceEntitlement model.
|
9
|
+
class Dts::Models::TransferApplianceEntitlement
|
10
|
+
STATUS_ENUM = [
|
11
|
+
STATUS_REQUESTED = 'REQUESTED'.freeze,
|
12
|
+
STATUS_PENDING_SIGNING = 'PENDING_SIGNING'.freeze,
|
13
|
+
STATUS_PENDING_APPROVAL = 'PENDING_APPROVAL'.freeze,
|
14
|
+
STATUS_TERMS_EXPIRED = 'TERMS_EXPIRED'.freeze,
|
15
|
+
STATUS_APPROVED = 'APPROVED'.freeze,
|
16
|
+
STATUS_REJECTED = 'REJECTED'.freeze,
|
17
|
+
STATUS_CANCELLED = 'CANCELLED'.freeze,
|
18
|
+
STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
19
|
+
].freeze
|
20
|
+
|
21
|
+
# This attribute is required.
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :tenant_id
|
24
|
+
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :requestor_name
|
27
|
+
|
28
|
+
# @return [String]
|
29
|
+
attr_accessor :requestor_email
|
30
|
+
|
31
|
+
# This attribute is required.
|
32
|
+
# @return [String]
|
33
|
+
attr_reader :status
|
34
|
+
|
35
|
+
# @return [DateTime]
|
36
|
+
attr_accessor :creation_time
|
37
|
+
|
38
|
+
# @return [DateTime]
|
39
|
+
attr_accessor :update_time
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
# rubocop:disable Style/SymbolLiteral
|
45
|
+
'tenant_id': :'tenantId',
|
46
|
+
'requestor_name': :'requestorName',
|
47
|
+
'requestor_email': :'requestorEmail',
|
48
|
+
'status': :'status',
|
49
|
+
'creation_time': :'creationTime',
|
50
|
+
'update_time': :'updateTime'
|
51
|
+
# rubocop:enable Style/SymbolLiteral
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.swagger_types
|
57
|
+
{
|
58
|
+
# rubocop:disable Style/SymbolLiteral
|
59
|
+
'tenant_id': :'String',
|
60
|
+
'requestor_name': :'String',
|
61
|
+
'requestor_email': :'String',
|
62
|
+
'status': :'String',
|
63
|
+
'creation_time': :'DateTime',
|
64
|
+
'update_time': :'DateTime'
|
65
|
+
# rubocop:enable Style/SymbolLiteral
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
70
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
71
|
+
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
# @option attributes [String] :tenant_id The value to assign to the {#tenant_id} property
|
76
|
+
# @option attributes [String] :requestor_name The value to assign to the {#requestor_name} property
|
77
|
+
# @option attributes [String] :requestor_email The value to assign to the {#requestor_email} property
|
78
|
+
# @option attributes [String] :status The value to assign to the {#status} property
|
79
|
+
# @option attributes [DateTime] :creation_time The value to assign to the {#creation_time} property
|
80
|
+
# @option attributes [DateTime] :update_time The value to assign to the {#update_time} property
|
81
|
+
def initialize(attributes = {})
|
82
|
+
return unless attributes.is_a?(Hash)
|
83
|
+
|
84
|
+
# convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
86
|
+
|
87
|
+
self.tenant_id = attributes[:'tenantId'] if attributes[:'tenantId']
|
88
|
+
|
89
|
+
raise 'You cannot provide both :tenantId and :tenant_id' if attributes.key?(:'tenantId') && attributes.key?(:'tenant_id')
|
90
|
+
|
91
|
+
self.tenant_id = attributes[:'tenant_id'] if attributes[:'tenant_id']
|
92
|
+
|
93
|
+
self.requestor_name = attributes[:'requestorName'] if attributes[:'requestorName']
|
94
|
+
|
95
|
+
raise 'You cannot provide both :requestorName and :requestor_name' if attributes.key?(:'requestorName') && attributes.key?(:'requestor_name')
|
96
|
+
|
97
|
+
self.requestor_name = attributes[:'requestor_name'] if attributes[:'requestor_name']
|
98
|
+
|
99
|
+
self.requestor_email = attributes[:'requestorEmail'] if attributes[:'requestorEmail']
|
100
|
+
|
101
|
+
raise 'You cannot provide both :requestorEmail and :requestor_email' if attributes.key?(:'requestorEmail') && attributes.key?(:'requestor_email')
|
102
|
+
|
103
|
+
self.requestor_email = attributes[:'requestor_email'] if attributes[:'requestor_email']
|
104
|
+
|
105
|
+
self.status = attributes[:'status'] if attributes[:'status']
|
106
|
+
|
107
|
+
self.creation_time = attributes[:'creationTime'] if attributes[:'creationTime']
|
108
|
+
|
109
|
+
raise 'You cannot provide both :creationTime and :creation_time' if attributes.key?(:'creationTime') && attributes.key?(:'creation_time')
|
110
|
+
|
111
|
+
self.creation_time = attributes[:'creation_time'] if attributes[:'creation_time']
|
112
|
+
|
113
|
+
self.update_time = attributes[:'updateTime'] if attributes[:'updateTime']
|
114
|
+
|
115
|
+
raise 'You cannot provide both :updateTime and :update_time' if attributes.key?(:'updateTime') && attributes.key?(:'update_time')
|
116
|
+
|
117
|
+
self.update_time = attributes[:'update_time'] if attributes[:'update_time']
|
118
|
+
end
|
119
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
120
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
121
|
+
|
122
|
+
# Custom attribute writer method checking allowed values (enum).
|
123
|
+
# @param [Object] status Object to be assigned
|
124
|
+
def status=(status)
|
125
|
+
# rubocop:disable Style/ConditionalAssignment
|
126
|
+
if status && !STATUS_ENUM.include?(status)
|
127
|
+
OCI.logger.debug("Unknown value for 'status' [" + status + "]. Mapping to 'STATUS_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
128
|
+
@status = STATUS_UNKNOWN_ENUM_VALUE
|
129
|
+
else
|
130
|
+
@status = status
|
131
|
+
end
|
132
|
+
# rubocop:enable Style/ConditionalAssignment
|
133
|
+
end
|
134
|
+
|
135
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
136
|
+
|
137
|
+
|
138
|
+
# Checks equality by comparing each attribute.
|
139
|
+
# @param [Object] other the other object to be compared
|
140
|
+
def ==(other)
|
141
|
+
return true if equal?(other)
|
142
|
+
|
143
|
+
self.class == other.class &&
|
144
|
+
tenant_id == other.tenant_id &&
|
145
|
+
requestor_name == other.requestor_name &&
|
146
|
+
requestor_email == other.requestor_email &&
|
147
|
+
status == other.status &&
|
148
|
+
creation_time == other.creation_time &&
|
149
|
+
update_time == other.update_time
|
150
|
+
end
|
151
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
152
|
+
|
153
|
+
# @see the `==` method
|
154
|
+
# @param [Object] other the other object to be compared
|
155
|
+
def eql?(other)
|
156
|
+
self == other
|
157
|
+
end
|
158
|
+
|
159
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
160
|
+
|
161
|
+
|
162
|
+
# Calculates hash code according to all attributes.
|
163
|
+
# @return [Fixnum] Hash code
|
164
|
+
def hash
|
165
|
+
[tenant_id, requestor_name, requestor_email, status, creation_time, update_time].hash
|
166
|
+
end
|
167
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
168
|
+
|
169
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
170
|
+
|
171
|
+
|
172
|
+
# Builds the object from hash
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
174
|
+
# @return [Object] Returns the model itself
|
175
|
+
def build_from_hash(attributes)
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
177
|
+
|
178
|
+
self.class.swagger_types.each_pair do |key, type|
|
179
|
+
if type =~ /^Array<(.*)>/i
|
180
|
+
# check to ensure the input is an array given that the the attribute
|
181
|
+
# is documented as an array but the input is not
|
182
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
183
|
+
public_method("#{key}=").call(
|
184
|
+
attributes[self.class.attribute_map[key]]
|
185
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
186
|
+
)
|
187
|
+
end
|
188
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
189
|
+
public_method("#{key}=").call(
|
190
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
191
|
+
)
|
192
|
+
end
|
193
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
194
|
+
end
|
195
|
+
|
196
|
+
self
|
197
|
+
end
|
198
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
199
|
+
|
200
|
+
# Returns the string representation of the object
|
201
|
+
# @return [String] String presentation of the object
|
202
|
+
def to_s
|
203
|
+
to_hash.to_s
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns the object in the form of hash
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_hash
|
209
|
+
hash = {}
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
211
|
+
value = public_method(attr).call
|
212
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
213
|
+
|
214
|
+
hash[param] = _to_hash(value)
|
215
|
+
end
|
216
|
+
hash
|
217
|
+
end
|
218
|
+
|
219
|
+
private
|
220
|
+
|
221
|
+
# Outputs non-array value in the form of hash
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
223
|
+
# @param [Object] value Any valid value
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
225
|
+
def _to_hash(value)
|
226
|
+
if value.is_a?(Array)
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
228
|
+
elsif value.is_a?(Hash)
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
231
|
+
end
|
232
|
+
elsif value.respond_to? :to_hash
|
233
|
+
value.to_hash
|
234
|
+
else
|
235
|
+
value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|