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,237 @@
|
|
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
|
+
# UpdateTransferJobDetails model.
|
8
|
+
class Dts::Models::UpdateTransferJobDetails
|
9
|
+
LIFECYCLE_STATE_ENUM = [
|
10
|
+
LIFECYCLE_STATE_CLOSED = 'CLOSED'.freeze
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
DEVICE_TYPE_ENUM = [
|
14
|
+
DEVICE_TYPE_DISK = 'DISK'.freeze,
|
15
|
+
DEVICE_TYPE_APPLIANCE = 'APPLIANCE'.freeze
|
16
|
+
].freeze
|
17
|
+
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :lifecycle_state
|
20
|
+
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :display_name
|
23
|
+
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :device_type
|
26
|
+
|
27
|
+
# Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
|
28
|
+
# Example: `{\"bar-key\": \"value\"}`
|
29
|
+
#
|
30
|
+
# @return [Hash<String, String>]
|
31
|
+
attr_accessor :freeform_tags
|
32
|
+
|
33
|
+
# Usage of predefined tag keys. These predefined keys are scoped to namespaces.
|
34
|
+
# Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
|
35
|
+
#
|
36
|
+
# @return [Hash<String, Hash<String, Object>>]
|
37
|
+
attr_accessor :defined_tags
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
# rubocop:disable Style/SymbolLiteral
|
43
|
+
'lifecycle_state': :'lifecycleState',
|
44
|
+
'display_name': :'displayName',
|
45
|
+
'device_type': :'deviceType',
|
46
|
+
'freeform_tags': :'freeformTags',
|
47
|
+
'defined_tags': :'definedTags'
|
48
|
+
# rubocop:enable Style/SymbolLiteral
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.swagger_types
|
54
|
+
{
|
55
|
+
# rubocop:disable Style/SymbolLiteral
|
56
|
+
'lifecycle_state': :'String',
|
57
|
+
'display_name': :'String',
|
58
|
+
'device_type': :'String',
|
59
|
+
'freeform_tags': :'Hash<String, String>',
|
60
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
61
|
+
# rubocop:enable Style/SymbolLiteral
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
66
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
67
|
+
|
68
|
+
|
69
|
+
# Initializes the object
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
71
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
72
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
73
|
+
# @option attributes [String] :device_type The value to assign to the {#device_type} property
|
74
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
75
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
76
|
+
def initialize(attributes = {})
|
77
|
+
return unless attributes.is_a?(Hash)
|
78
|
+
|
79
|
+
# convert string to symbol for hash key
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
81
|
+
|
82
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
83
|
+
|
84
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
85
|
+
|
86
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
87
|
+
|
88
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
89
|
+
|
90
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
91
|
+
|
92
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
93
|
+
|
94
|
+
self.device_type = attributes[:'deviceType'] if attributes[:'deviceType']
|
95
|
+
self.device_type = "DISK" if device_type.nil? && !attributes.key?(:'deviceType') # rubocop:disable Style/StringLiterals
|
96
|
+
|
97
|
+
raise 'You cannot provide both :deviceType and :device_type' if attributes.key?(:'deviceType') && attributes.key?(:'device_type')
|
98
|
+
|
99
|
+
self.device_type = attributes[:'device_type'] if attributes[:'device_type']
|
100
|
+
self.device_type = "DISK" if device_type.nil? && !attributes.key?(:'deviceType') && !attributes.key?(:'device_type') # rubocop:disable Style/StringLiterals
|
101
|
+
|
102
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
103
|
+
|
104
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
105
|
+
|
106
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
107
|
+
|
108
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
109
|
+
|
110
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
111
|
+
|
112
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
113
|
+
end
|
114
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
115
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
116
|
+
|
117
|
+
# Custom attribute writer method checking allowed values (enum).
|
118
|
+
# @param [Object] lifecycle_state Object to be assigned
|
119
|
+
def lifecycle_state=(lifecycle_state)
|
120
|
+
raise "Invalid value for 'lifecycle_state': this must be one of the values in LIFECYCLE_STATE_ENUM." if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
121
|
+
|
122
|
+
@lifecycle_state = lifecycle_state
|
123
|
+
end
|
124
|
+
|
125
|
+
# Custom attribute writer method checking allowed values (enum).
|
126
|
+
# @param [Object] device_type Object to be assigned
|
127
|
+
def device_type=(device_type)
|
128
|
+
raise "Invalid value for 'device_type': this must be one of the values in DEVICE_TYPE_ENUM." if device_type && !DEVICE_TYPE_ENUM.include?(device_type)
|
129
|
+
|
130
|
+
@device_type = device_type
|
131
|
+
end
|
132
|
+
|
133
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
134
|
+
|
135
|
+
|
136
|
+
# Checks equality by comparing each attribute.
|
137
|
+
# @param [Object] other the other object to be compared
|
138
|
+
def ==(other)
|
139
|
+
return true if equal?(other)
|
140
|
+
|
141
|
+
self.class == other.class &&
|
142
|
+
lifecycle_state == other.lifecycle_state &&
|
143
|
+
display_name == other.display_name &&
|
144
|
+
device_type == other.device_type &&
|
145
|
+
freeform_tags == other.freeform_tags &&
|
146
|
+
defined_tags == other.defined_tags
|
147
|
+
end
|
148
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
149
|
+
|
150
|
+
# @see the `==` method
|
151
|
+
# @param [Object] other the other object to be compared
|
152
|
+
def eql?(other)
|
153
|
+
self == other
|
154
|
+
end
|
155
|
+
|
156
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
157
|
+
|
158
|
+
|
159
|
+
# Calculates hash code according to all attributes.
|
160
|
+
# @return [Fixnum] Hash code
|
161
|
+
def hash
|
162
|
+
[lifecycle_state, display_name, device_type, freeform_tags, defined_tags].hash
|
163
|
+
end
|
164
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
165
|
+
|
166
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
167
|
+
|
168
|
+
|
169
|
+
# Builds the object from hash
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
171
|
+
# @return [Object] Returns the model itself
|
172
|
+
def build_from_hash(attributes)
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
174
|
+
|
175
|
+
self.class.swagger_types.each_pair do |key, type|
|
176
|
+
if type =~ /^Array<(.*)>/i
|
177
|
+
# check to ensure the input is an array given that the the attribute
|
178
|
+
# is documented as an array but the input is not
|
179
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
180
|
+
public_method("#{key}=").call(
|
181
|
+
attributes[self.class.attribute_map[key]]
|
182
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
183
|
+
)
|
184
|
+
end
|
185
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
186
|
+
public_method("#{key}=").call(
|
187
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
188
|
+
)
|
189
|
+
end
|
190
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
191
|
+
end
|
192
|
+
|
193
|
+
self
|
194
|
+
end
|
195
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
196
|
+
|
197
|
+
# Returns the string representation of the object
|
198
|
+
# @return [String] String presentation of the object
|
199
|
+
def to_s
|
200
|
+
to_hash.to_s
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the object in the form of hash
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
205
|
+
def to_hash
|
206
|
+
hash = {}
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
208
|
+
value = public_method(attr).call
|
209
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
210
|
+
|
211
|
+
hash[param] = _to_hash(value)
|
212
|
+
end
|
213
|
+
hash
|
214
|
+
end
|
215
|
+
|
216
|
+
private
|
217
|
+
|
218
|
+
# Outputs non-array value in the form of hash
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
220
|
+
# @param [Object] value Any valid value
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
222
|
+
def _to_hash(value)
|
223
|
+
if value.is_a?(Array)
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
225
|
+
elsif value.is_a?(Hash)
|
226
|
+
{}.tap do |hash|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
228
|
+
end
|
229
|
+
elsif value.respond_to? :to_hash
|
230
|
+
value.to_hash
|
231
|
+
else
|
232
|
+
value
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,204 @@
|
|
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
|
+
# UpdateTransferPackageDetails model.
|
8
|
+
class Dts::Models::UpdateTransferPackageDetails
|
9
|
+
LIFECYCLE_STATE_ENUM = [
|
10
|
+
LIFECYCLE_STATE_SHIPPING = 'SHIPPING'.freeze,
|
11
|
+
LIFECYCLE_STATE_CANCELLED = 'CANCELLED'.freeze
|
12
|
+
].freeze
|
13
|
+
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :original_package_delivery_tracking_number
|
16
|
+
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :return_package_delivery_tracking_number
|
19
|
+
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :package_delivery_vendor
|
22
|
+
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :lifecycle_state
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
# rubocop:disable Style/SymbolLiteral
|
30
|
+
'original_package_delivery_tracking_number': :'originalPackageDeliveryTrackingNumber',
|
31
|
+
'return_package_delivery_tracking_number': :'returnPackageDeliveryTrackingNumber',
|
32
|
+
'package_delivery_vendor': :'packageDeliveryVendor',
|
33
|
+
'lifecycle_state': :'lifecycleState'
|
34
|
+
# rubocop:enable Style/SymbolLiteral
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
{
|
41
|
+
# rubocop:disable Style/SymbolLiteral
|
42
|
+
'original_package_delivery_tracking_number': :'String',
|
43
|
+
'return_package_delivery_tracking_number': :'String',
|
44
|
+
'package_delivery_vendor': :'String',
|
45
|
+
'lifecycle_state': :'String'
|
46
|
+
# rubocop:enable Style/SymbolLiteral
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
51
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
52
|
+
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
# @option attributes [String] :original_package_delivery_tracking_number The value to assign to the {#original_package_delivery_tracking_number} property
|
57
|
+
# @option attributes [String] :return_package_delivery_tracking_number The value to assign to the {#return_package_delivery_tracking_number} property
|
58
|
+
# @option attributes [String] :package_delivery_vendor The value to assign to the {#package_delivery_vendor} property
|
59
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
60
|
+
def initialize(attributes = {})
|
61
|
+
return unless attributes.is_a?(Hash)
|
62
|
+
|
63
|
+
# convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
65
|
+
|
66
|
+
self.original_package_delivery_tracking_number = attributes[:'originalPackageDeliveryTrackingNumber'] if attributes[:'originalPackageDeliveryTrackingNumber']
|
67
|
+
|
68
|
+
raise 'You cannot provide both :originalPackageDeliveryTrackingNumber and :original_package_delivery_tracking_number' if attributes.key?(:'originalPackageDeliveryTrackingNumber') && attributes.key?(:'original_package_delivery_tracking_number')
|
69
|
+
|
70
|
+
self.original_package_delivery_tracking_number = attributes[:'original_package_delivery_tracking_number'] if attributes[:'original_package_delivery_tracking_number']
|
71
|
+
|
72
|
+
self.return_package_delivery_tracking_number = attributes[:'returnPackageDeliveryTrackingNumber'] if attributes[:'returnPackageDeliveryTrackingNumber']
|
73
|
+
|
74
|
+
raise 'You cannot provide both :returnPackageDeliveryTrackingNumber and :return_package_delivery_tracking_number' if attributes.key?(:'returnPackageDeliveryTrackingNumber') && attributes.key?(:'return_package_delivery_tracking_number')
|
75
|
+
|
76
|
+
self.return_package_delivery_tracking_number = attributes[:'return_package_delivery_tracking_number'] if attributes[:'return_package_delivery_tracking_number']
|
77
|
+
|
78
|
+
self.package_delivery_vendor = attributes[:'packageDeliveryVendor'] if attributes[:'packageDeliveryVendor']
|
79
|
+
|
80
|
+
raise 'You cannot provide both :packageDeliveryVendor and :package_delivery_vendor' if attributes.key?(:'packageDeliveryVendor') && attributes.key?(:'package_delivery_vendor')
|
81
|
+
|
82
|
+
self.package_delivery_vendor = attributes[:'package_delivery_vendor'] if attributes[:'package_delivery_vendor']
|
83
|
+
|
84
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
85
|
+
|
86
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
87
|
+
|
88
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
89
|
+
end
|
90
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
91
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
92
|
+
|
93
|
+
# Custom attribute writer method checking allowed values (enum).
|
94
|
+
# @param [Object] lifecycle_state Object to be assigned
|
95
|
+
def lifecycle_state=(lifecycle_state)
|
96
|
+
raise "Invalid value for 'lifecycle_state': this must be one of the values in LIFECYCLE_STATE_ENUM." if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
97
|
+
|
98
|
+
@lifecycle_state = lifecycle_state
|
99
|
+
end
|
100
|
+
|
101
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
102
|
+
|
103
|
+
|
104
|
+
# Checks equality by comparing each attribute.
|
105
|
+
# @param [Object] other the other object to be compared
|
106
|
+
def ==(other)
|
107
|
+
return true if equal?(other)
|
108
|
+
|
109
|
+
self.class == other.class &&
|
110
|
+
original_package_delivery_tracking_number == other.original_package_delivery_tracking_number &&
|
111
|
+
return_package_delivery_tracking_number == other.return_package_delivery_tracking_number &&
|
112
|
+
package_delivery_vendor == other.package_delivery_vendor &&
|
113
|
+
lifecycle_state == other.lifecycle_state
|
114
|
+
end
|
115
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param [Object] other the other object to be compared
|
119
|
+
def eql?(other)
|
120
|
+
self == other
|
121
|
+
end
|
122
|
+
|
123
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
124
|
+
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Fixnum] Hash code
|
128
|
+
def hash
|
129
|
+
[original_package_delivery_tracking_number, return_package_delivery_tracking_number, package_delivery_vendor, lifecycle_state].hash
|
130
|
+
end
|
131
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
132
|
+
|
133
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
134
|
+
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def build_from_hash(attributes)
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
141
|
+
|
142
|
+
self.class.swagger_types.each_pair do |key, type|
|
143
|
+
if type =~ /^Array<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
+
public_method("#{key}=").call(
|
148
|
+
attributes[self.class.attribute_map[key]]
|
149
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
150
|
+
)
|
151
|
+
end
|
152
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
153
|
+
public_method("#{key}=").call(
|
154
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
155
|
+
)
|
156
|
+
end
|
157
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
158
|
+
end
|
159
|
+
|
160
|
+
self
|
161
|
+
end
|
162
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
163
|
+
|
164
|
+
# Returns the string representation of the object
|
165
|
+
# @return [String] String presentation of the object
|
166
|
+
def to_s
|
167
|
+
to_hash.to_s
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the object in the form of hash
|
171
|
+
# @return [Hash] Returns the object in the form of hash
|
172
|
+
def to_hash
|
173
|
+
hash = {}
|
174
|
+
self.class.attribute_map.each_pair do |attr, param|
|
175
|
+
value = public_method(attr).call
|
176
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
177
|
+
|
178
|
+
hash[param] = _to_hash(value)
|
179
|
+
end
|
180
|
+
hash
|
181
|
+
end
|
182
|
+
|
183
|
+
private
|
184
|
+
|
185
|
+
# Outputs non-array value in the form of hash
|
186
|
+
# For object, use to_hash. Otherwise, just return the value
|
187
|
+
# @param [Object] value Any valid value
|
188
|
+
# @return [Hash] Returns the value in the form of hash
|
189
|
+
def _to_hash(value)
|
190
|
+
if value.is_a?(Array)
|
191
|
+
value.compact.map { |v| _to_hash(v) }
|
192
|
+
elsif value.is_a?(Hash)
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
195
|
+
end
|
196
|
+
elsif value.respond_to? :to_hash
|
197
|
+
value.to_hash
|
198
|
+
else
|
199
|
+
value
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,165 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'uri'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# A description of the DTS API
|
9
|
+
class Dts::ShippingVendorsClient
|
10
|
+
# Client used to make HTTP requests.
|
11
|
+
# @return [OCI::ApiClient]
|
12
|
+
attr_reader :api_client
|
13
|
+
|
14
|
+
# Fully qualified endpoint URL
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :endpoint
|
17
|
+
|
18
|
+
# The default retry configuration to apply to all operations in this service client. This can be overridden
|
19
|
+
# on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
20
|
+
# will not perform any retries
|
21
|
+
# @return [OCI::Retry::RetryConfig]
|
22
|
+
attr_reader :retry_config
|
23
|
+
|
24
|
+
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :region
|
27
|
+
|
28
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
29
|
+
|
30
|
+
|
31
|
+
# Creates a new ShippingVendorsClient.
|
32
|
+
# Notes:
|
33
|
+
# If a config is not specified, then the global OCI.config will be used.
|
34
|
+
#
|
35
|
+
# This client is not thread-safe
|
36
|
+
#
|
37
|
+
# Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the
|
38
|
+
# region. A region may be specified in the config or via or the region parameter. If specified in both, then the
|
39
|
+
# region parameter will be used.
|
40
|
+
# @param [Config] config A Config object.
|
41
|
+
# @param [String] region A region used to determine the service endpoint. This will usually
|
42
|
+
# correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
43
|
+
# @param [String] endpoint The fully qualified endpoint URL
|
44
|
+
# @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
|
45
|
+
# a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
|
46
|
+
# so that the instance principals signer can be provided to the client
|
47
|
+
# @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
|
48
|
+
# the details for the proxy can be provided in this parameter
|
49
|
+
# @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
|
50
|
+
# apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
51
|
+
# will not perform any retries
|
52
|
+
def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
53
|
+
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
54
|
+
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
55
|
+
# and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
|
56
|
+
# pass it to this constructor.
|
57
|
+
#
|
58
|
+
# If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
|
59
|
+
# so try and load the config from the default file.
|
60
|
+
config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
61
|
+
config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
62
|
+
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
63
|
+
|
64
|
+
if signer.nil?
|
65
|
+
signer = OCI::Signer.new(
|
66
|
+
config.user,
|
67
|
+
config.fingerprint,
|
68
|
+
config.tenancy,
|
69
|
+
config.key_file,
|
70
|
+
pass_phrase: config.pass_phrase,
|
71
|
+
private_key_content: config.key_content
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
76
|
+
@retry_config = retry_config
|
77
|
+
|
78
|
+
if endpoint
|
79
|
+
@endpoint = endpoint + '/20171001'
|
80
|
+
else
|
81
|
+
region ||= config.region
|
82
|
+
region ||= signer.region if signer.respond_to?(:region)
|
83
|
+
self.region = region
|
84
|
+
end
|
85
|
+
logger.info "ShippingVendorsClient endpoint set to '#{@endpoint}'." if logger
|
86
|
+
end
|
87
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
88
|
+
|
89
|
+
# Set the region that will be used to determine the service endpoint.
|
90
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
91
|
+
# but may be an arbitrary string.
|
92
|
+
def region=(new_region)
|
93
|
+
@region = new_region
|
94
|
+
|
95
|
+
raise 'A region must be specified.' unless @region
|
96
|
+
|
97
|
+
@endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://datatransfer.{region}.{secondLevelDomain}') + '/20171001'
|
98
|
+
logger.info "ShippingVendorsClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
|
99
|
+
end
|
100
|
+
|
101
|
+
# @return [Logger] The logger for this client. May be nil.
|
102
|
+
def logger
|
103
|
+
@api_client.config.logger
|
104
|
+
end
|
105
|
+
|
106
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
107
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
108
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
109
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
110
|
+
|
111
|
+
|
112
|
+
# Lists available shipping vendors for Transfer Package delivery
|
113
|
+
# @param [Hash] opts the optional parameters
|
114
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
115
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
116
|
+
# @return [Response] A Response object with data of type {OCI::Dts::Models::ShippingVendors ShippingVendors}
|
117
|
+
def list_shipping_vendors(opts = {})
|
118
|
+
logger.debug 'Calling operation ShippingVendorsClient#list_shipping_vendors.' if logger
|
119
|
+
|
120
|
+
|
121
|
+
path = '/shippingVendors'
|
122
|
+
operation_signing_strategy = :standard
|
123
|
+
|
124
|
+
# rubocop:disable Style/NegatedIf
|
125
|
+
# Query Params
|
126
|
+
query_params = {}
|
127
|
+
|
128
|
+
# Header Params
|
129
|
+
header_params = {}
|
130
|
+
header_params[:accept] = 'application/json'
|
131
|
+
header_params[:'content-type'] = 'application/json'
|
132
|
+
# rubocop:enable Style/NegatedIf
|
133
|
+
|
134
|
+
post_body = nil
|
135
|
+
|
136
|
+
# rubocop:disable Metrics/BlockLength
|
137
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ShippingVendorsClient#list_shipping_vendors') do
|
138
|
+
@api_client.call_api(
|
139
|
+
:GET,
|
140
|
+
path,
|
141
|
+
endpoint,
|
142
|
+
header_params: header_params,
|
143
|
+
query_params: query_params,
|
144
|
+
operation_signing_strategy: operation_signing_strategy,
|
145
|
+
body: post_body,
|
146
|
+
return_type: 'OCI::Dts::Models::ShippingVendors'
|
147
|
+
)
|
148
|
+
end
|
149
|
+
# rubocop:enable Metrics/BlockLength
|
150
|
+
end
|
151
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
152
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
153
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
154
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
155
|
+
|
156
|
+
private
|
157
|
+
|
158
|
+
def applicable_retry_config(opts = {})
|
159
|
+
return @retry_config unless opts.key?(:retry_config)
|
160
|
+
|
161
|
+
opts[:retry_config]
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|