oci 2.0.2 → 2.0.3
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/audit/models/audit_event.rb +3 -3
- data/lib/oci/audit/models/configuration.rb +3 -3
- data/lib/oci/audit/models/update_configuration_details.rb +3 -3
- data/lib/oci/core/blockstorage_client.rb +155 -0
- data/lib/oci/core/compute_client.rb +176 -12
- data/lib/oci/core/core.rb +11 -0
- data/lib/oci/core/models/attach_boot_volume_details.rb +143 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +3 -3
- data/lib/oci/core/models/attach_vnic_details.rb +23 -7
- data/lib/oci/core/models/attach_volume_details.rb +3 -3
- data/lib/oci/core/models/boot_volume.rb +234 -0
- data/lib/oci/core/models/boot_volume_attachment.rb +224 -0
- data/lib/oci/core/models/capture_console_history_details.rb +3 -3
- data/lib/oci/core/models/connect_local_peering_gateways_details.rb +120 -0
- data/lib/oci/core/models/console_history.rb +3 -3
- data/lib/oci/core/models/cpe.rb +3 -3
- data/lib/oci/core/models/create_cpe_details.rb +3 -3
- data/lib/oci/core/models/create_cross_connect_details.rb +3 -3
- data/lib/oci/core/models/create_cross_connect_group_details.rb +3 -3
- data/lib/oci/core/models/create_dhcp_details.rb +3 -3
- data/lib/oci/core/models/create_drg_attachment_details.rb +3 -3
- data/lib/oci/core/models/create_drg_details.rb +3 -3
- data/lib/oci/core/models/create_image_details.rb +3 -3
- data/lib/oci/core/models/create_instance_console_connection_details.rb +5 -5
- data/lib/oci/core/models/create_internet_gateway_details.rb +3 -3
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +3 -3
- data/lib/oci/core/models/create_local_peering_gateway_details.rb +144 -0
- data/lib/oci/core/models/create_private_ip_details.rb +3 -3
- data/lib/oci/core/models/create_route_table_details.rb +3 -3
- data/lib/oci/core/models/create_security_list_details.rb +3 -3
- data/lib/oci/core/models/create_subnet_details.rb +3 -3
- data/lib/oci/core/models/create_vcn_details.rb +3 -3
- data/lib/oci/core/models/create_virtual_circuit_details.rb +3 -3
- data/lib/oci/core/models/create_vnic_details.rb +3 -3
- data/lib/oci/core/models/create_volume_backup_details.rb +3 -3
- data/lib/oci/core/models/create_volume_details.rb +3 -3
- data/lib/oci/core/models/cross_connect.rb +3 -3
- data/lib/oci/core/models/cross_connect_group.rb +3 -3
- data/lib/oci/core/models/cross_connect_location.rb +3 -3
- data/lib/oci/core/models/cross_connect_mapping.rb +3 -3
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +3 -3
- data/lib/oci/core/models/cross_connect_status.rb +3 -3
- data/lib/oci/core/models/dhcp_dns_option.rb +3 -3
- data/lib/oci/core/models/dhcp_option.rb +3 -3
- data/lib/oci/core/models/dhcp_options.rb +3 -3
- data/lib/oci/core/models/dhcp_search_domain_option.rb +3 -3
- data/lib/oci/core/models/drg.rb +3 -3
- data/lib/oci/core/models/drg_attachment.rb +3 -3
- data/lib/oci/core/models/egress_security_rule.rb +3 -3
- data/lib/oci/core/models/export_image_details.rb +3 -3
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +3 -3
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +3 -3
- data/lib/oci/core/models/fast_connect_provider_service.rb +3 -3
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +3 -3
- data/lib/oci/core/models/icmp_options.rb +3 -3
- data/lib/oci/core/models/image.rb +3 -3
- data/lib/oci/core/models/image_source_details.rb +3 -3
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +3 -3
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +3 -3
- data/lib/oci/core/models/ingress_security_rule.rb +3 -3
- data/lib/oci/core/models/instance.rb +16 -6
- data/lib/oci/core/models/instance_console_connection.rb +9 -9
- data/lib/oci/core/models/instance_credentials.rb +3 -3
- data/lib/oci/core/models/instance_source_details.rb +135 -0
- data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +128 -0
- data/lib/oci/core/models/instance_source_via_image_details.rb +128 -0
- data/lib/oci/core/models/internet_gateway.rb +3 -3
- data/lib/oci/core/models/ip_sec_connection.rb +3 -3
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +3 -3
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +3 -3
- data/lib/oci/core/models/launch_instance_details.rb +19 -6
- data/lib/oci/core/models/letter_of_authority.rb +3 -3
- data/lib/oci/core/models/local_peering_gateway.rb +271 -0
- data/lib/oci/core/models/port_range.rb +3 -3
- data/lib/oci/core/models/private_ip.rb +3 -3
- data/lib/oci/core/models/route_rule.rb +3 -3
- data/lib/oci/core/models/route_table.rb +3 -3
- data/lib/oci/core/models/security_list.rb +3 -3
- data/lib/oci/core/models/shape.rb +3 -3
- data/lib/oci/core/models/subnet.rb +3 -3
- data/lib/oci/core/models/tcp_options.rb +3 -3
- data/lib/oci/core/models/tunnel_config.rb +3 -3
- data/lib/oci/core/models/tunnel_status.rb +3 -3
- data/lib/oci/core/models/udp_options.rb +3 -3
- data/lib/oci/core/models/update_boot_volume_details.rb +122 -0
- data/lib/oci/core/models/update_console_history_details.rb +3 -3
- data/lib/oci/core/models/update_cpe_details.rb +3 -3
- data/lib/oci/core/models/update_cross_connect_details.rb +3 -3
- data/lib/oci/core/models/update_cross_connect_group_details.rb +3 -3
- data/lib/oci/core/models/update_dhcp_details.rb +3 -3
- data/lib/oci/core/models/update_drg_attachment_details.rb +3 -3
- data/lib/oci/core/models/update_drg_details.rb +3 -3
- data/lib/oci/core/models/update_image_details.rb +3 -3
- data/lib/oci/core/models/update_instance_details.rb +3 -3
- data/lib/oci/core/models/update_internet_gateway_details.rb +3 -3
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +3 -3
- data/lib/oci/core/models/update_local_peering_gateway_details.rb +122 -0
- data/lib/oci/core/models/update_private_ip_details.rb +3 -3
- data/lib/oci/core/models/update_route_table_details.rb +3 -3
- data/lib/oci/core/models/update_security_list_details.rb +3 -3
- data/lib/oci/core/models/update_subnet_details.rb +3 -3
- data/lib/oci/core/models/update_vcn_details.rb +3 -3
- data/lib/oci/core/models/update_virtual_circuit_details.rb +3 -3
- data/lib/oci/core/models/update_vnic_details.rb +3 -3
- data/lib/oci/core/models/update_volume_backup_details.rb +3 -3
- data/lib/oci/core/models/update_volume_details.rb +3 -3
- data/lib/oci/core/models/vcn.rb +3 -3
- data/lib/oci/core/models/virtual_circuit.rb +3 -3
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +3 -3
- data/lib/oci/core/models/vnic.rb +3 -3
- data/lib/oci/core/models/vnic_attachment.rb +20 -4
- data/lib/oci/core/models/volume.rb +3 -3
- data/lib/oci/core/models/volume_attachment.rb +3 -3
- data/lib/oci/core/models/volume_backup.rb +3 -3
- data/lib/oci/core/models/volume_source_details.rb +3 -3
- data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +3 -3
- data/lib/oci/core/models/volume_source_from_volume_details.rb +3 -3
- data/lib/oci/core/virtual_network_client.rb +233 -0
- data/lib/oci/database/database.rb +3 -0
- data/lib/oci/database/database_client.rb +1 -1
- data/lib/oci/database/models/backup.rb +3 -3
- data/lib/oci/database/models/backup_summary.rb +3 -3
- data/lib/oci/database/models/create_backup_details.rb +3 -3
- data/lib/oci/database/models/create_data_guard_association_details.rb +3 -3
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +3 -3
- data/lib/oci/database/models/create_database_details.rb +3 -3
- data/lib/oci/database/models/create_database_from_backup_details.rb +142 -0
- data/lib/oci/database/models/create_db_home_details.rb +3 -3
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +173 -0
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +22 -30
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +133 -0
- data/lib/oci/database/models/data_guard_association.rb +3 -3
- data/lib/oci/database/models/data_guard_association_summary.rb +3 -3
- data/lib/oci/database/models/database.rb +3 -3
- data/lib/oci/database/models/database_summary.rb +3 -3
- data/lib/oci/database/models/db_backup_config.rb +3 -3
- data/lib/oci/database/models/db_home.rb +3 -3
- data/lib/oci/database/models/db_home_summary.rb +3 -3
- data/lib/oci/database/models/db_node.rb +3 -3
- data/lib/oci/database/models/db_node_summary.rb +3 -3
- data/lib/oci/database/models/db_system.rb +3 -3
- data/lib/oci/database/models/db_system_shape_summary.rb +3 -3
- data/lib/oci/database/models/db_system_summary.rb +3 -3
- data/lib/oci/database/models/db_version_summary.rb +3 -3
- data/lib/oci/database/models/failover_data_guard_association_details.rb +3 -3
- data/lib/oci/database/models/launch_db_system_details.rb +3 -3
- data/lib/oci/database/models/patch.rb +3 -3
- data/lib/oci/database/models/patch_details.rb +3 -3
- data/lib/oci/database/models/patch_history_entry.rb +3 -3
- data/lib/oci/database/models/patch_history_entry_summary.rb +3 -3
- data/lib/oci/database/models/patch_summary.rb +3 -3
- data/lib/oci/database/models/reinstate_data_guard_association_details.rb +3 -3
- data/lib/oci/database/models/restore_database_details.rb +3 -3
- data/lib/oci/database/models/switchover_data_guard_association_details.rb +3 -3
- data/lib/oci/database/models/update_database_details.rb +3 -3
- data/lib/oci/database/models/update_db_home_details.rb +3 -3
- data/lib/oci/database/models/update_db_system_details.rb +3 -3
- data/lib/oci/identity/models/add_user_to_group_details.rb +3 -3
- data/lib/oci/identity/models/api_key.rb +3 -3
- data/lib/oci/identity/models/availability_domain.rb +3 -3
- data/lib/oci/identity/models/compartment.rb +3 -3
- data/lib/oci/identity/models/create_api_key_details.rb +3 -3
- data/lib/oci/identity/models/create_compartment_details.rb +3 -3
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +3 -3
- data/lib/oci/identity/models/create_group_details.rb +3 -3
- data/lib/oci/identity/models/create_identity_provider_details.rb +3 -3
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +3 -3
- data/lib/oci/identity/models/create_policy_details.rb +3 -3
- data/lib/oci/identity/models/create_region_subscription_details.rb +3 -3
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +3 -3
- data/lib/oci/identity/models/create_swift_password_details.rb +3 -3
- data/lib/oci/identity/models/create_user_details.rb +3 -3
- data/lib/oci/identity/models/customer_secret_key.rb +3 -3
- data/lib/oci/identity/models/customer_secret_key_summary.rb +3 -3
- data/lib/oci/identity/models/group.rb +3 -3
- data/lib/oci/identity/models/identity_provider.rb +3 -3
- data/lib/oci/identity/models/idp_group_mapping.rb +3 -3
- data/lib/oci/identity/models/policy.rb +3 -3
- data/lib/oci/identity/models/region.rb +3 -3
- data/lib/oci/identity/models/region_subscription.rb +3 -3
- data/lib/oci/identity/models/saml2_identity_provider.rb +3 -3
- data/lib/oci/identity/models/swift_password.rb +3 -3
- data/lib/oci/identity/models/tenancy.rb +3 -3
- data/lib/oci/identity/models/ui_password.rb +3 -3
- data/lib/oci/identity/models/update_compartment_details.rb +3 -3
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +3 -3
- data/lib/oci/identity/models/update_group_details.rb +3 -3
- data/lib/oci/identity/models/update_identity_provider_details.rb +3 -3
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +3 -3
- data/lib/oci/identity/models/update_policy_details.rb +3 -3
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +3 -3
- data/lib/oci/identity/models/update_state_details.rb +3 -3
- data/lib/oci/identity/models/update_swift_password_details.rb +3 -3
- data/lib/oci/identity/models/update_user_details.rb +3 -3
- data/lib/oci/identity/models/user.rb +3 -3
- data/lib/oci/identity/models/user_group_membership.rb +3 -3
- data/lib/oci/load_balancer/load_balancer_client.rb +27 -1
- data/lib/oci/load_balancer/models/backend.rb +3 -3
- data/lib/oci/load_balancer/models/backend_details.rb +3 -3
- data/lib/oci/load_balancer/models/backend_health.rb +4 -4
- data/lib/oci/load_balancer/models/backend_set.rb +5 -6
- data/lib/oci/load_balancer/models/backend_set_details.rb +5 -6
- data/lib/oci/load_balancer/models/backend_set_health.rb +3 -3
- data/lib/oci/load_balancer/models/certificate.rb +3 -3
- data/lib/oci/load_balancer/models/certificate_details.rb +3 -3
- data/lib/oci/load_balancer/models/create_backend_details.rb +3 -3
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +5 -5
- data/lib/oci/load_balancer/models/create_certificate_details.rb +3 -3
- data/lib/oci/load_balancer/models/create_listener_details.rb +3 -3
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +4 -4
- data/lib/oci/load_balancer/models/health_check_result.rb +3 -3
- data/lib/oci/load_balancer/models/health_checker.rb +3 -3
- data/lib/oci/load_balancer/models/health_checker_details.rb +3 -3
- data/lib/oci/load_balancer/models/ip_address.rb +3 -3
- data/lib/oci/load_balancer/models/listener.rb +3 -3
- data/lib/oci/load_balancer/models/listener_details.rb +3 -3
- data/lib/oci/load_balancer/models/load_balancer.rb +6 -4
- data/lib/oci/load_balancer/models/load_balancer_health.rb +5 -5
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +3 -3
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +3 -3
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +3 -3
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +3 -3
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +3 -3
- data/lib/oci/load_balancer/models/ssl_configuration.rb +3 -3
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +3 -3
- data/lib/oci/load_balancer/models/update_backend_details.rb +3 -3
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +5 -6
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +3 -3
- data/lib/oci/load_balancer/models/update_listener_details.rb +3 -3
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +3 -3
- data/lib/oci/load_balancer/models/work_request.rb +5 -3
- data/lib/oci/load_balancer/models/work_request_error.rb +3 -3
- data/lib/oci/object_storage/models/bucket.rb +3 -3
- data/lib/oci/object_storage/models/bucket_summary.rb +3 -3
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +3 -3
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +3 -3
- data/lib/oci/object_storage/models/create_bucket_details.rb +3 -3
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +3 -3
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +3 -3
- data/lib/oci/object_storage/models/list_objects.rb +3 -3
- data/lib/oci/object_storage/models/multipart_upload.rb +3 -3
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +3 -3
- data/lib/oci/object_storage/models/namespace_metadata.rb +3 -3
- data/lib/oci/object_storage/models/object_summary.rb +3 -3
- data/lib/oci/object_storage/models/preauthenticated_request.rb +3 -3
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +3 -3
- data/lib/oci/object_storage/models/rename_object_details.rb +3 -3
- data/lib/oci/object_storage/models/restore_objects_details.rb +3 -3
- data/lib/oci/object_storage/models/update_bucket_details.rb +3 -3
- data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +3 -3
- data/lib/oci/version.rb +1 -1
- metadata +16 -2
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
require_relative 'instance_source_details'
|
|
5
|
+
|
|
6
|
+
module OCI
|
|
7
|
+
class Core::Models::InstanceSourceViaImageDetails < Core::Models::InstanceSourceDetails
|
|
8
|
+
# The OCID of the image used to boot the instance.
|
|
9
|
+
# @return [String]
|
|
10
|
+
attr_accessor :image_id
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Initializes the object
|
|
14
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
15
|
+
def initialize(attributes = {})
|
|
16
|
+
return unless attributes.is_a?(Hash)
|
|
17
|
+
|
|
18
|
+
attributes['sourceType'] = 'image'
|
|
19
|
+
|
|
20
|
+
super(attributes)
|
|
21
|
+
|
|
22
|
+
# convert string to symbol for hash key
|
|
23
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
24
|
+
|
|
25
|
+
if attributes[:'imageId']
|
|
26
|
+
self.image_id = attributes[:'imageId']
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Checks equality by comparing each attribute.
|
|
32
|
+
# @param [Object] other_object to be compared
|
|
33
|
+
def ==(other_object)
|
|
34
|
+
return true if self.equal?(other_object)
|
|
35
|
+
self.class == other_object.class &&
|
|
36
|
+
source_type == other_object.source_type &&
|
|
37
|
+
image_id == other_object.image_id
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# @see the `==` method
|
|
41
|
+
# @param [Object] other_object to be compared
|
|
42
|
+
def eql?(other_object)
|
|
43
|
+
self == other_object
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Calculates hash code according to all attributes.
|
|
47
|
+
# @return [Fixnum] Hash code
|
|
48
|
+
def hash
|
|
49
|
+
[source_type, image_id].hash
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Builds the object from hash
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
# @return [Object] Returns the model itself
|
|
55
|
+
def build_from_hash(attributes)
|
|
56
|
+
return nil unless attributes.is_a?(Hash)
|
|
57
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
58
|
+
if type =~ /^Array<(.*)>/i
|
|
59
|
+
# check to ensure the input is an array given that the the attribute
|
|
60
|
+
# is documented as an array but the input is not
|
|
61
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
62
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
63
|
+
end
|
|
64
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
65
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
66
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
self
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns the string representation of the object
|
|
73
|
+
# @return [String] String presentation of the object
|
|
74
|
+
def to_s
|
|
75
|
+
to_hash.to_s
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns the object in the form of hash
|
|
79
|
+
# @return [Hash] Returns the object in the form of hash
|
|
80
|
+
def to_hash
|
|
81
|
+
hash = {}
|
|
82
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
83
|
+
value = public_send(attr)
|
|
84
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
85
|
+
hash[param] = _to_hash(value)
|
|
86
|
+
end
|
|
87
|
+
hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
private
|
|
91
|
+
|
|
92
|
+
# Outputs non-array value in the form of hash
|
|
93
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
94
|
+
# @param [Object] value Any valid value
|
|
95
|
+
# @return [Hash] Returns the value in the form of hash
|
|
96
|
+
def _to_hash(value)
|
|
97
|
+
if value.is_a?(Array)
|
|
98
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
99
|
+
elsif value.is_a?(Hash)
|
|
100
|
+
{}.tap do |hash|
|
|
101
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
102
|
+
end
|
|
103
|
+
elsif value.respond_to? :to_hash
|
|
104
|
+
value.to_hash
|
|
105
|
+
else
|
|
106
|
+
value
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
113
|
+
def self.attribute_map
|
|
114
|
+
{
|
|
115
|
+
:'source_type' => :'sourceType',
|
|
116
|
+
:'image_id' => :'imageId'
|
|
117
|
+
}
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Attribute type mapping.
|
|
121
|
+
def self.swagger_types
|
|
122
|
+
{
|
|
123
|
+
:'source_type' => :'String',
|
|
124
|
+
:'image_id' => :'String'
|
|
125
|
+
}
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
@@ -131,10 +131,10 @@ module OCI
|
|
|
131
131
|
# check to ensure the input is an array given that the the attribute
|
|
132
132
|
# is documented as an array but the input is not
|
|
133
133
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
134
|
-
self.
|
|
134
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
135
135
|
end
|
|
136
136
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
137
|
-
self.
|
|
137
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
138
138
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
139
139
|
end
|
|
140
140
|
|
|
@@ -152,7 +152,7 @@ module OCI
|
|
|
152
152
|
def to_hash
|
|
153
153
|
hash = {}
|
|
154
154
|
self.class.attribute_map.each_pair do |attr, param|
|
|
155
|
-
value =
|
|
155
|
+
value = public_send(attr)
|
|
156
156
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
157
157
|
hash[param] = _to_hash(value)
|
|
158
158
|
end
|
|
@@ -142,10 +142,10 @@ module OCI
|
|
|
142
142
|
# check to ensure the input is an array given that the the attribute
|
|
143
143
|
# is documented as an array but the input is not
|
|
144
144
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
145
|
-
self.
|
|
145
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
146
146
|
end
|
|
147
147
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
148
|
-
self.
|
|
148
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
149
149
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
150
150
|
end
|
|
151
151
|
|
|
@@ -163,7 +163,7 @@ module OCI
|
|
|
163
163
|
def to_hash
|
|
164
164
|
hash = {}
|
|
165
165
|
self.class.attribute_map.each_pair do |attr, param|
|
|
166
|
-
value =
|
|
166
|
+
value = public_send(attr)
|
|
167
167
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
168
168
|
hash[param] = _to_hash(value)
|
|
169
169
|
end
|
|
@@ -80,10 +80,10 @@ module OCI
|
|
|
80
80
|
# check to ensure the input is an array given that the the attribute
|
|
81
81
|
# is documented as an array but the input is not
|
|
82
82
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
83
|
-
self.
|
|
83
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
84
84
|
end
|
|
85
85
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
86
|
-
self.
|
|
86
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
87
87
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -101,7 +101,7 @@ module OCI
|
|
|
101
101
|
def to_hash
|
|
102
102
|
hash = {}
|
|
103
103
|
self.class.attribute_map.each_pair do |attr, param|
|
|
104
|
-
value =
|
|
104
|
+
value = public_send(attr)
|
|
105
105
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
106
106
|
hash[param] = _to_hash(value)
|
|
107
107
|
end
|
|
@@ -83,10 +83,10 @@ module OCI
|
|
|
83
83
|
# check to ensure the input is an array given that the the attribute
|
|
84
84
|
# is documented as an array but the input is not
|
|
85
85
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
86
|
-
self.
|
|
86
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
87
87
|
end
|
|
88
88
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
89
|
-
self.
|
|
89
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
90
90
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
91
91
|
end
|
|
92
92
|
|
|
@@ -104,7 +104,7 @@ module OCI
|
|
|
104
104
|
def to_hash
|
|
105
105
|
hash = {}
|
|
106
106
|
self.class.attribute_map.each_pair do |attr, param|
|
|
107
|
-
value =
|
|
107
|
+
value = public_send(attr)
|
|
108
108
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
109
109
|
hash[param] = _to_hash(value)
|
|
110
110
|
end
|
|
@@ -38,14 +38,16 @@ module OCI
|
|
|
38
38
|
# @return [Hash<String, Object>]
|
|
39
39
|
attr_accessor :extended_metadata
|
|
40
40
|
|
|
41
|
-
# Deprecated. Instead
|
|
41
|
+
# Deprecated. Instead Use `hostnameLabel` in
|
|
42
42
|
# {CreateVnicDetails}.
|
|
43
43
|
# If you provide both, the values must match.
|
|
44
44
|
#
|
|
45
45
|
# @return [String]
|
|
46
46
|
attr_accessor :hostname_label
|
|
47
47
|
|
|
48
|
-
#
|
|
48
|
+
# Deprecated. Use `sourceDetails` with {#instance_source_via_image_details instance_source_via_image_details}
|
|
49
|
+
# source type instead. If you specify values for both, the values must match.
|
|
50
|
+
#
|
|
49
51
|
# @return [String]
|
|
50
52
|
attr_accessor :image_id
|
|
51
53
|
|
|
@@ -147,6 +149,10 @@ module OCI
|
|
|
147
149
|
# @return [String]
|
|
148
150
|
attr_accessor :shape
|
|
149
151
|
|
|
152
|
+
# Details for creating an instance.
|
|
153
|
+
# @return [OCI::Core::Models::InstanceSourceDetails]
|
|
154
|
+
attr_accessor :source_details
|
|
155
|
+
|
|
150
156
|
# Deprecated. Instead use `subnetId` in
|
|
151
157
|
# {CreateVnicDetails}.
|
|
152
158
|
# At least one of them is required; if you provide both, the values must match.
|
|
@@ -203,6 +209,10 @@ module OCI
|
|
|
203
209
|
self.shape = attributes[:'shape']
|
|
204
210
|
end
|
|
205
211
|
|
|
212
|
+
if attributes[:'sourceDetails']
|
|
213
|
+
self.source_details = attributes[:'sourceDetails']
|
|
214
|
+
end
|
|
215
|
+
|
|
206
216
|
if attributes[:'subnetId']
|
|
207
217
|
self.subnet_id = attributes[:'subnetId']
|
|
208
218
|
end
|
|
@@ -224,6 +234,7 @@ module OCI
|
|
|
224
234
|
ipxe_script == other_object.ipxe_script &&
|
|
225
235
|
metadata == other_object.metadata &&
|
|
226
236
|
shape == other_object.shape &&
|
|
237
|
+
source_details == other_object.source_details &&
|
|
227
238
|
subnet_id == other_object.subnet_id
|
|
228
239
|
end
|
|
229
240
|
|
|
@@ -236,7 +247,7 @@ module OCI
|
|
|
236
247
|
# Calculates hash code according to all attributes.
|
|
237
248
|
# @return [Fixnum] Hash code
|
|
238
249
|
def hash
|
|
239
|
-
[availability_domain, compartment_id, create_vnic_details, display_name, extended_metadata, hostname_label, image_id, ipxe_script, metadata, shape, subnet_id].hash
|
|
250
|
+
[availability_domain, compartment_id, create_vnic_details, display_name, extended_metadata, hostname_label, image_id, ipxe_script, metadata, shape, source_details, subnet_id].hash
|
|
240
251
|
end
|
|
241
252
|
|
|
242
253
|
# Builds the object from hash
|
|
@@ -249,10 +260,10 @@ module OCI
|
|
|
249
260
|
# check to ensure the input is an array given that the the attribute
|
|
250
261
|
# is documented as an array but the input is not
|
|
251
262
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
252
|
-
self.
|
|
263
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
253
264
|
end
|
|
254
265
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
255
|
-
self.
|
|
266
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
256
267
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
257
268
|
end
|
|
258
269
|
|
|
@@ -270,7 +281,7 @@ module OCI
|
|
|
270
281
|
def to_hash
|
|
271
282
|
hash = {}
|
|
272
283
|
self.class.attribute_map.each_pair do |attr, param|
|
|
273
|
-
value =
|
|
284
|
+
value = public_send(attr)
|
|
274
285
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
275
286
|
hash[param] = _to_hash(value)
|
|
276
287
|
end
|
|
@@ -312,6 +323,7 @@ module OCI
|
|
|
312
323
|
:'ipxe_script' => :'ipxeScript',
|
|
313
324
|
:'metadata' => :'metadata',
|
|
314
325
|
:'shape' => :'shape',
|
|
326
|
+
:'source_details' => :'sourceDetails',
|
|
315
327
|
:'subnet_id' => :'subnetId'
|
|
316
328
|
}
|
|
317
329
|
end
|
|
@@ -329,6 +341,7 @@ module OCI
|
|
|
329
341
|
:'ipxe_script' => :'String',
|
|
330
342
|
:'metadata' => :'Hash<String, String>',
|
|
331
343
|
:'shape' => :'String',
|
|
344
|
+
:'source_details' => :'OCI::Core::Models::InstanceSourceDetails',
|
|
332
345
|
:'subnet_id' => :'String'
|
|
333
346
|
}
|
|
334
347
|
end
|
|
@@ -117,10 +117,10 @@ module OCI
|
|
|
117
117
|
# check to ensure the input is an array given that the the attribute
|
|
118
118
|
# is documented as an array but the input is not
|
|
119
119
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
120
|
-
self.
|
|
120
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
121
121
|
end
|
|
122
122
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
123
|
-
self.
|
|
123
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
124
124
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
125
125
|
end
|
|
126
126
|
|
|
@@ -138,7 +138,7 @@ module OCI
|
|
|
138
138
|
def to_hash
|
|
139
139
|
hash = {}
|
|
140
140
|
self.class.attribute_map.each_pair do |attr, param|
|
|
141
|
-
value =
|
|
141
|
+
value = public_send(attr)
|
|
142
142
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
143
143
|
hash[param] = _to_hash(value)
|
|
144
144
|
end
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
class Core::Models::LocalPeeringGateway
|
|
7
|
+
|
|
8
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING',
|
|
9
|
+
LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE',
|
|
10
|
+
LIFECYCLE_STATE_TERMINATING = 'TERMINATING',
|
|
11
|
+
LIFECYCLE_STATE_TERMINATED = 'TERMINATED',
|
|
12
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
PEERING_STATUS_ENUM = [PEERING_STATUS_INVALID = 'INVALID',
|
|
16
|
+
PEERING_STATUS_NEW = 'NEW',
|
|
17
|
+
PEERING_STATUS_PEERED = 'PEERED',
|
|
18
|
+
PEERING_STATUS_PENDING = 'PENDING',
|
|
19
|
+
PEERING_STATUS_REVOKED = 'REVOKED',
|
|
20
|
+
PEERING_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
|
21
|
+
|
|
22
|
+
# The OCID of the compartment containing the LPG.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :compartment_id
|
|
25
|
+
|
|
26
|
+
# A user-friendly name. Does not have to be unique, and it's changeable. Avoid
|
|
27
|
+
# entering confidential information.
|
|
28
|
+
#
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :display_name
|
|
31
|
+
|
|
32
|
+
# The LPG's Oracle ID (OCID).
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :id
|
|
35
|
+
|
|
36
|
+
# Whether the VCN at the other end of the peering is in a different tenancy.
|
|
37
|
+
#
|
|
38
|
+
# Example: `false`
|
|
39
|
+
#
|
|
40
|
+
# @return [BOOLEAN]
|
|
41
|
+
attr_accessor :is_cross_tenancy_peering
|
|
42
|
+
|
|
43
|
+
# The LPG's current lifecycle state.
|
|
44
|
+
# @return [String]
|
|
45
|
+
attr_accessor :lifecycle_state
|
|
46
|
+
|
|
47
|
+
# The range of IP addresses available on the VCN at the other
|
|
48
|
+
# end of the peering from this LPG. The value is `null` if the LPG is not peered.
|
|
49
|
+
# You can use this as the destination CIDR for a route rule to route a subnet's
|
|
50
|
+
# traffic to this LPG.
|
|
51
|
+
#
|
|
52
|
+
# Example: `192.168.0.0/16`
|
|
53
|
+
#
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :peer_advertised_cidr
|
|
56
|
+
|
|
57
|
+
# Whether the LPG is peered with another LPG. `NEW` means the LPG has not yet been
|
|
58
|
+
# peered. `PENDING` means the peering is being established. `REVOKED` means the
|
|
59
|
+
# LPG at the other end of the peering has been deleted.
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
attr_accessor :peering_status
|
|
63
|
+
|
|
64
|
+
# Additional information regarding the peering status, if applicable.
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :peering_status_details
|
|
67
|
+
|
|
68
|
+
# The date and time the LPG was created, in the format defined by RFC3339.
|
|
69
|
+
#
|
|
70
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
|
71
|
+
#
|
|
72
|
+
# @return [DateTime]
|
|
73
|
+
attr_accessor :time_created
|
|
74
|
+
|
|
75
|
+
# The OCID of the VCN the LPG belongs to.
|
|
76
|
+
# @return [String]
|
|
77
|
+
attr_accessor :vcn_id
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
return unless attributes.is_a?(Hash)
|
|
84
|
+
|
|
85
|
+
# convert string to symbol for hash key
|
|
86
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
87
|
+
|
|
88
|
+
if attributes[:'compartmentId']
|
|
89
|
+
self.compartment_id = attributes[:'compartmentId']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes[:'displayName']
|
|
93
|
+
self.display_name = attributes[:'displayName']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes[:'id']
|
|
97
|
+
self.id = attributes[:'id']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes[:'isCrossTenancyPeering']
|
|
101
|
+
self.is_cross_tenancy_peering = attributes[:'isCrossTenancyPeering']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes[:'lifecycleState']
|
|
105
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes[:'peerAdvertisedCidr']
|
|
109
|
+
self.peer_advertised_cidr = attributes[:'peerAdvertisedCidr']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes[:'peeringStatus']
|
|
113
|
+
self.peering_status = attributes[:'peeringStatus']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes[:'peeringStatusDetails']
|
|
117
|
+
self.peering_status_details = attributes[:'peeringStatusDetails']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes[:'timeCreated']
|
|
121
|
+
self.time_created = attributes[:'timeCreated']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes[:'vcnId']
|
|
125
|
+
self.vcn_id = attributes[:'vcnId']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
131
|
+
# @param [Object] lifecycle_state Object to be assigned
|
|
132
|
+
def lifecycle_state=(lifecycle_state)
|
|
133
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
|
134
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
|
135
|
+
else
|
|
136
|
+
@lifecycle_state = lifecycle_state
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
141
|
+
# @param [Object] peering_status Object to be assigned
|
|
142
|
+
def peering_status=(peering_status)
|
|
143
|
+
if peering_status && !PEERING_STATUS_ENUM.include?(peering_status)
|
|
144
|
+
@peering_status = PEERING_STATUS_UNKNOWN_ENUM_VALUE
|
|
145
|
+
else
|
|
146
|
+
@peering_status = peering_status
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Checks equality by comparing each attribute.
|
|
151
|
+
# @param [Object] other_object to be compared
|
|
152
|
+
def ==(other_object)
|
|
153
|
+
return true if self.equal?(other_object)
|
|
154
|
+
self.class == other_object.class &&
|
|
155
|
+
compartment_id == other_object.compartment_id &&
|
|
156
|
+
display_name == other_object.display_name &&
|
|
157
|
+
id == other_object.id &&
|
|
158
|
+
is_cross_tenancy_peering == other_object.is_cross_tenancy_peering &&
|
|
159
|
+
lifecycle_state == other_object.lifecycle_state &&
|
|
160
|
+
peer_advertised_cidr == other_object.peer_advertised_cidr &&
|
|
161
|
+
peering_status == other_object.peering_status &&
|
|
162
|
+
peering_status_details == other_object.peering_status_details &&
|
|
163
|
+
time_created == other_object.time_created &&
|
|
164
|
+
vcn_id == other_object.vcn_id
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] other_object to be compared
|
|
169
|
+
def eql?(other_object)
|
|
170
|
+
self == other_object
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Fixnum] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[compartment_id, display_name, id, is_cross_tenancy_peering, lifecycle_state, peer_advertised_cidr, peering_status, peering_status_details, time_created, vcn_id].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def build_from_hash(attributes)
|
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
|
184
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
185
|
+
if type =~ /^Array<(.*)>/i
|
|
186
|
+
# check to ensure the input is an array given that the the attribute
|
|
187
|
+
# is documented as an array but the input is not
|
|
188
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
189
|
+
self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
190
|
+
end
|
|
191
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
192
|
+
self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
193
|
+
end # 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
|
+
|
|
199
|
+
# Returns the string representation of the object
|
|
200
|
+
# @return [String] String presentation of the object
|
|
201
|
+
def to_s
|
|
202
|
+
to_hash.to_s
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Returns the object in the form of hash
|
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
|
207
|
+
def to_hash
|
|
208
|
+
hash = {}
|
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
210
|
+
value = public_send(attr)
|
|
211
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
private
|
|
218
|
+
|
|
219
|
+
# Outputs non-array value in the form of hash
|
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
221
|
+
# @param [Object] value Any valid value
|
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
|
223
|
+
def _to_hash(value)
|
|
224
|
+
if value.is_a?(Array)
|
|
225
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
226
|
+
elsif value.is_a?(Hash)
|
|
227
|
+
{}.tap do |hash|
|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
229
|
+
end
|
|
230
|
+
elsif value.respond_to? :to_hash
|
|
231
|
+
value.to_hash
|
|
232
|
+
else
|
|
233
|
+
value
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
240
|
+
def self.attribute_map
|
|
241
|
+
{
|
|
242
|
+
:'compartment_id' => :'compartmentId',
|
|
243
|
+
:'display_name' => :'displayName',
|
|
244
|
+
:'id' => :'id',
|
|
245
|
+
:'is_cross_tenancy_peering' => :'isCrossTenancyPeering',
|
|
246
|
+
:'lifecycle_state' => :'lifecycleState',
|
|
247
|
+
:'peer_advertised_cidr' => :'peerAdvertisedCidr',
|
|
248
|
+
:'peering_status' => :'peeringStatus',
|
|
249
|
+
:'peering_status_details' => :'peeringStatusDetails',
|
|
250
|
+
:'time_created' => :'timeCreated',
|
|
251
|
+
:'vcn_id' => :'vcnId'
|
|
252
|
+
}
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Attribute type mapping.
|
|
256
|
+
def self.swagger_types
|
|
257
|
+
{
|
|
258
|
+
:'compartment_id' => :'String',
|
|
259
|
+
:'display_name' => :'String',
|
|
260
|
+
:'id' => :'String',
|
|
261
|
+
:'is_cross_tenancy_peering' => :'BOOLEAN',
|
|
262
|
+
:'lifecycle_state' => :'String',
|
|
263
|
+
:'peer_advertised_cidr' => :'String',
|
|
264
|
+
:'peering_status' => :'String',
|
|
265
|
+
:'peering_status_details' => :'String',
|
|
266
|
+
:'time_created' => :'DateTime',
|
|
267
|
+
:'vcn_id' => :'String'
|
|
268
|
+
}
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
end
|