oci 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/lib/oci.rb +6 -0
- data/lib/oci/api_client.rb +159 -134
- data/lib/oci/audit/audit.rb +3 -0
- data/lib/oci/audit/audit_client.rb +88 -40
- data/lib/oci/audit/audit_client_composite_operations.rb +64 -0
- data/lib/oci/audit/models/audit_event.rb +151 -200
- data/lib/oci/audit/models/configuration.rb +61 -38
- data/lib/oci/audit/models/update_configuration_details.rb +61 -38
- data/lib/oci/auth/util.rb +1 -1
- data/lib/oci/base_signer.rb +20 -29
- data/lib/oci/config.rb +9 -3
- data/lib/oci/core/blockstorage_client.rb +512 -269
- data/lib/oci/core/blockstorage_client_composite_operations.rb +342 -0
- data/lib/oci/core/compute_client.rb +959 -536
- data/lib/oci/core/compute_client_composite_operations.rb +738 -0
- data/lib/oci/core/core.rb +5 -0
- data/lib/oci/core/models/attach_boot_volume_details.rb +72 -57
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +76 -53
- data/lib/oci/core/models/attach_paravirtualized_volume_details.rb +69 -45
- data/lib/oci/core/models/attach_vnic_details.rb +79 -68
- data/lib/oci/core/models/attach_volume_details.rb +83 -74
- data/lib/oci/core/models/boot_volume.rb +119 -120
- data/lib/oci/core/models/boot_volume_attachment.rb +114 -111
- data/lib/oci/core/models/bulk_add_virtual_circuit_public_prefixes_details.rb +61 -38
- data/lib/oci/core/models/bulk_delete_virtual_circuit_public_prefixes_details.rb +61 -38
- data/lib/oci/core/models/capture_console_history_details.rb +81 -70
- data/lib/oci/core/models/connect_local_peering_gateways_details.rb +60 -38
- data/lib/oci/core/models/connect_remote_peering_connections_details.rb +67 -49
- data/lib/oci/core/models/console_history.rb +122 -123
- data/lib/oci/core/models/cpe.rb +82 -74
- data/lib/oci/core/models/create_cpe_details.rb +73 -58
- data/lib/oci/core/models/create_cross_connect_details.rb +98 -99
- data/lib/oci/core/models/create_cross_connect_group_details.rb +67 -48
- data/lib/oci/core/models/create_dhcp_details.rb +89 -84
- data/lib/oci/core/models/create_drg_attachment_details.rb +71 -56
- data/lib/oci/core/models/create_drg_details.rb +66 -47
- data/lib/oci/core/models/create_image_details.rb +108 -110
- data/lib/oci/core/models/create_instance_console_connection_details.rb +79 -69
- data/lib/oci/core/models/create_internet_gateway_details.rb +76 -65
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +83 -76
- data/lib/oci/core/models/create_local_peering_gateway_details.rb +72 -57
- data/lib/oci/core/models/create_private_ip_details.rb +97 -94
- data/lib/oci/core/models/create_public_ip_details.rb +90 -77
- data/lib/oci/core/models/create_remote_peering_connection_details.rb +72 -57
- data/lib/oci/core/models/create_route_table_details.rb +90 -87
- data/lib/oci/core/models/create_security_list_details.rb +95 -96
- data/lib/oci/core/models/create_subnet_details.rb +133 -154
- data/lib/oci/core/models/create_vcn_details.rb +96 -93
- data/lib/oci/core/models/create_virtual_circuit_details.rb +136 -153
- data/lib/oci/core/models/create_virtual_circuit_public_prefix_details.rb +62 -39
- data/lib/oci/core/models/create_vnic_details.rb +99 -97
- data/lib/oci/core/models/create_volume_backup_details.rb +94 -85
- data/lib/oci/core/models/create_volume_backup_policy_assignment_details.rb +66 -47
- data/lib/oci/core/models/create_volume_details.rb +117 -130
- data/lib/oci/core/models/cross_connect.rb +120 -121
- data/lib/oci/core/models/cross_connect_group.rb +97 -82
- data/lib/oci/core/models/cross_connect_location.rb +65 -43
- data/lib/oci/core/models/cross_connect_mapping.rb +89 -81
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +68 -48
- data/lib/oci/core/models/cross_connect_status.rb +110 -87
- data/lib/oci/core/models/delete_virtual_circuit_public_prefix_details.rb +61 -38
- data/lib/oci/core/models/dhcp_dns_option.rb +85 -60
- data/lib/oci/core/models/dhcp_option.rb +62 -38
- data/lib/oci/core/models/dhcp_options.rb +119 -118
- data/lib/oci/core/models/dhcp_search_domain_option.rb +66 -44
- data/lib/oci/core/models/drg.rb +96 -81
- data/lib/oci/core/models/drg_attachment.rb +106 -99
- data/lib/oci/core/models/egress_security_rule.rb +89 -83
- data/lib/oci/core/models/export_image_details.rb +63 -41
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +74 -59
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +65 -42
- data/lib/oci/core/models/fast_connect_provider_service.rb +155 -126
- data/lib/oci/core/models/get_public_ip_by_ip_address_details.rb +61 -39
- data/lib/oci/core/models/get_public_ip_by_private_ip_id_details.rb +61 -39
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +117 -105
- data/lib/oci/core/models/icmp_options.rb +63 -41
- data/lib/oci/core/models/image.rb +170 -185
- data/lib/oci/core/models/image_source_details.rb +79 -60
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +77 -62
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +67 -44
- data/lib/oci/core/models/ingress_security_rule.rb +89 -83
- data/lib/oci/core/models/instance.rb +190 -211
- data/lib/oci/core/models/instance_console_connection.rb +118 -117
- data/lib/oci/core/models/instance_credentials.rb +63 -41
- data/lib/oci/core/models/instance_source_details.rb +64 -41
- data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +64 -41
- data/lib/oci/core/models/instance_source_via_image_details.rb +70 -51
- data/lib/oci/core/models/internet_gateway.rb +107 -100
- data/lib/oci/core/models/ip_sec_connection.rb +113 -110
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +73 -59
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +75 -61
- data/lib/oci/core/models/launch_instance_details.rb +163 -189
- data/lib/oci/core/models/launch_options.rb +130 -93
- data/lib/oci/core/models/letter_of_authority.rb +105 -100
- data/lib/oci/core/models/local_peering_gateway.rb +141 -140
- data/lib/oci/core/models/paravirtualized_volume_attachment.rb +83 -60
- data/lib/oci/core/models/peer_region_for_remote_peering.rb +61 -37
- data/lib/oci/core/models/port_range.rb +65 -42
- data/lib/oci/core/models/private_ip.rb +131 -151
- data/lib/oci/core/models/public_ip.rb +160 -149
- data/lib/oci/core/models/remote_peering_connection.rb +148 -151
- data/lib/oci/core/models/route_rule.rb +68 -50
- data/lib/oci/core/models/route_table.rb +120 -121
- data/lib/oci/core/models/security_list.rb +125 -130
- data/lib/oci/core/models/shape.rb +60 -36
- data/lib/oci/core/models/subnet.rb +183 -220
- data/lib/oci/core/models/tcp_options.rb +67 -49
- data/lib/oci/core/models/tunnel_config.rb +76 -62
- data/lib/oci/core/models/tunnel_status.rb +94 -77
- data/lib/oci/core/models/udp_options.rb +67 -49
- data/lib/oci/core/models/update_boot_volume_details.rb +62 -39
- data/lib/oci/core/models/update_console_history_details.rb +76 -61
- data/lib/oci/core/models/update_cpe_details.rb +62 -39
- data/lib/oci/core/models/update_cross_connect_details.rb +68 -50
- data/lib/oci/core/models/update_cross_connect_group_details.rb +62 -39
- data/lib/oci/core/models/update_dhcp_details.rb +80 -67
- data/lib/oci/core/models/update_drg_attachment_details.rb +62 -39
- data/lib/oci/core/models/update_drg_details.rb +62 -39
- data/lib/oci/core/models/update_image_details.rb +77 -62
- data/lib/oci/core/models/update_instance_details.rb +77 -62
- data/lib/oci/core/models/update_internet_gateway_details.rb +67 -48
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +62 -39
- data/lib/oci/core/models/update_local_peering_gateway_details.rb +62 -39
- data/lib/oci/core/models/update_private_ip_details.rb +90 -83
- data/lib/oci/core/models/update_public_ip_details.rb +68 -49
- data/lib/oci/core/models/update_remote_peering_connection_details.rb +62 -39
- data/lib/oci/core/models/update_route_table_details.rb +81 -70
- data/lib/oci/core/models/update_security_list_details.rb +86 -79
- data/lib/oci/core/models/update_subnet_details.rb +76 -61
- data/lib/oci/core/models/update_vcn_details.rb +76 -61
- data/lib/oci/core/models/update_virtual_circuit_details.rb +114 -115
- data/lib/oci/core/models/update_vnic_details.rb +75 -60
- data/lib/oci/core/models/update_volume_backup_details.rb +76 -61
- data/lib/oci/core/models/update_volume_details.rb +76 -61
- data/lib/oci/core/models/vcn.rb +150 -167
- data/lib/oci/core/models/virtual_circuit.rb +254 -269
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +68 -48
- data/lib/oci/core/models/virtual_circuit_public_prefix.rb +79 -54
- data/lib/oci/core/models/vnic.rb +149 -166
- data/lib/oci/core/models/vnic_attachment.rb +132 -141
- data/lib/oci/core/models/volume.rb +138 -151
- data/lib/oci/core/models/volume_attachment.rb +126 -131
- data/lib/oci/core/models/volume_backup.rb +185 -200
- data/lib/oci/core/models/volume_backup_policy.rb +75 -61
- data/lib/oci/core/models/volume_backup_policy_assignment.rb +75 -63
- data/lib/oci/core/models/volume_backup_schedule.rb +101 -76
- data/lib/oci/core/models/volume_source_details.rb +62 -37
- data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +62 -38
- data/lib/oci/core/models/volume_source_from_volume_details.rb +62 -38
- data/lib/oci/core/virtual_network_client.rb +2683 -1457
- data/lib/oci/core/virtual_network_client_composite_operations.rb +1849 -0
- data/lib/oci/database/database.rb +3 -0
- data/lib/oci/database/database_client.rb +894 -454
- data/lib/oci/database/database_client_composite_operations.rb +462 -0
- data/lib/oci/database/models/backup.rb +131 -128
- data/lib/oci/database/models/backup_summary.rb +131 -128
- data/lib/oci/database/models/create_backup_details.rb +66 -47
- data/lib/oci/database/models/create_data_guard_association_details.rb +112 -102
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +73 -51
- data/lib/oci/database/models/create_database_details.rb +140 -105
- data/lib/oci/database/models/create_database_from_backup_details.rb +71 -56
- data/lib/oci/database/models/create_db_home_details.rb +70 -53
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +83 -67
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +74 -53
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +69 -44
- data/lib/oci/database/models/data_guard_association.rb +205 -204
- data/lib/oci/database/models/data_guard_association_summary.rb +205 -204
- data/lib/oci/database/models/database.rb +175 -156
- data/lib/oci/database/models/database_summary.rb +175 -156
- data/lib/oci/database/models/db_backup_config.rb +60 -38
- data/lib/oci/database/models/db_home.rb +110 -107
- data/lib/oci/database/models/db_home_summary.rb +110 -107
- data/lib/oci/database/models/db_node.rb +113 -108
- data/lib/oci/database/models/db_node_summary.rb +113 -108
- data/lib/oci/database/models/db_system.rb +299 -314
- data/lib/oci/database/models/db_system_shape_summary.rb +88 -86
- data/lib/oci/database/models/db_system_summary.rb +299 -314
- data/lib/oci/database/models/db_version_summary.rb +64 -44
- data/lib/oci/database/models/failover_data_guard_association_details.rb +60 -38
- data/lib/oci/database/models/launch_db_system_details.rb +231 -234
- data/lib/oci/database/models/patch.rb +136 -113
- data/lib/oci/database/models/patch_details.rb +73 -53
- data/lib/oci/database/models/patch_history_entry.rb +114 -99
- data/lib/oci/database/models/patch_history_entry_summary.rb +114 -99
- data/lib/oci/database/models/patch_summary.rb +136 -113
- data/lib/oci/database/models/reinstate_data_guard_association_details.rb +60 -38
- data/lib/oci/database/models/restore_database_details.rb +72 -53
- data/lib/oci/database/models/switchover_data_guard_association_details.rb +60 -38
- data/lib/oci/database/models/update_database_details.rb +97 -38
- data/lib/oci/database/models/update_db_home_details.rb +60 -38
- data/lib/oci/database/models/update_db_system_details.rb +112 -64
- data/lib/oci/dns/dns.rb +3 -0
- data/lib/oci/dns/dns_client.rb +489 -302
- data/lib/oci/dns/dns_client_composite_operations.rb +143 -0
- data/lib/oci/dns/models/create_zone_details.rb +84 -72
- data/lib/oci/dns/models/external_master.rb +67 -47
- data/lib/oci/dns/models/patch_domain_records_details.rb +60 -35
- data/lib/oci/dns/models/patch_rr_set_details.rb +60 -35
- data/lib/oci/dns/models/patch_zone_records_details.rb +60 -35
- data/lib/oci/dns/models/record.rb +92 -86
- data/lib/oci/dns/models/record_collection.rb +59 -35
- data/lib/oci/dns/models/record_details.rb +92 -86
- data/lib/oci/dns/models/record_operation.rb +113 -110
- data/lib/oci/dns/models/rr_set.rb +59 -35
- data/lib/oci/dns/models/sort_order.rb +0 -2
- data/lib/oci/dns/models/tsig.rb +68 -48
- data/lib/oci/dns/models/update_domain_records_details.rb +60 -35
- data/lib/oci/dns/models/update_rr_set_details.rb +60 -35
- data/lib/oci/dns/models/update_zone_details.rb +60 -38
- data/lib/oci/dns/models/update_zone_records_details.rb +60 -35
- data/lib/oci/dns/models/zone.rb +133 -126
- data/lib/oci/dns/models/zone_summary.rb +108 -99
- data/lib/oci/email/email.rb +3 -0
- data/lib/oci/email/email_client.rb +223 -112
- data/lib/oci/email/email_client_composite_operations.rb +103 -0
- data/lib/oci/email/models/create_sender_details.rb +65 -47
- data/lib/oci/email/models/create_suppression_details.rb +66 -48
- data/lib/oci/email/models/sender.rb +97 -84
- data/lib/oci/email/models/sender_summary.rb +89 -70
- data/lib/oci/email/models/suppression.rb +90 -69
- data/lib/oci/email/models/suppression_summary.rb +90 -69
- data/lib/oci/errors.rb +16 -0
- data/lib/oci/file_storage/file_storage.rb +3 -0
- data/lib/oci/file_storage/file_storage_client.rb +587 -333
- data/lib/oci/file_storage/file_storage_client_composite_operations.rb +460 -0
- data/lib/oci/file_storage/models/create_export_details.rb +73 -56
- data/lib/oci/file_storage/models/create_file_system_details.rb +75 -60
- data/lib/oci/file_storage/models/create_mount_target_details.rb +96 -93
- data/lib/oci/file_storage/models/create_snapshot_details.rb +68 -47
- data/lib/oci/file_storage/models/export.rb +102 -89
- data/lib/oci/file_storage/models/export_set.rb +121 -122
- data/lib/oci/file_storage/models/export_set_summary.rb +109 -102
- data/lib/oci/file_storage/models/export_summary.rb +102 -89
- data/lib/oci/file_storage/models/file_system.rb +110 -103
- data/lib/oci/file_storage/models/file_system_summary.rb +110 -103
- data/lib/oci/file_storage/models/mount_target.rb +126 -131
- data/lib/oci/file_storage/models/mount_target_summary.rb +121 -122
- data/lib/oci/file_storage/models/snapshot.rb +98 -81
- data/lib/oci/file_storage/models/snapshot_summary.rb +98 -81
- data/lib/oci/file_storage/models/update_export_set_details.rb +75 -60
- data/lib/oci/file_storage/models/update_file_system_details.rb +63 -40
- data/lib/oci/file_storage/models/update_mount_target_details.rb +63 -40
- data/lib/oci/identity/identity.rb +3 -0
- data/lib/oci/identity/identity_client.rb +1671 -872
- data/lib/oci/identity/identity_client_composite_operations.rb +818 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +66 -47
- data/lib/oci/identity/models/api_key.rb +108 -101
- data/lib/oci/identity/models/availability_domain.rb +64 -44
- data/lib/oci/identity/models/compartment.rb +118 -115
- data/lib/oci/identity/models/create_api_key_details.rb +60 -35
- data/lib/oci/identity/models/create_compartment_details.rb +83 -72
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +62 -39
- data/lib/oci/identity/models/create_dynamic_group_details.rb +75 -61
- data/lib/oci/identity/models/create_group_details.rb +82 -71
- data/lib/oci/identity/models/create_identity_provider_details.rb +115 -110
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +67 -48
- data/lib/oci/identity/models/create_policy_details.rb +94 -89
- data/lib/oci/identity/models/create_region_subscription_details.rb +64 -41
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +88 -67
- data/lib/oci/identity/models/create_smtp_credential_details.rb +61 -36
- data/lib/oci/identity/models/create_swift_password_details.rb +61 -36
- data/lib/oci/identity/models/create_tag_details.rb +77 -62
- data/lib/oci/identity/models/create_tag_namespace_details.rb +82 -71
- data/lib/oci/identity/models/create_user_details.rb +82 -71
- data/lib/oci/identity/models/customer_secret_key.rb +114 -109
- data/lib/oci/identity/models/customer_secret_key_summary.rb +109 -102
- data/lib/oci/identity/models/dynamic_group.rb +112 -105
- data/lib/oci/identity/models/group.rb +118 -115
- data/lib/oci/identity/models/identity_provider.rb +135 -138
- data/lib/oci/identity/models/idp_group_mapping.rb +112 -109
- data/lib/oci/identity/models/policy.rb +129 -132
- data/lib/oci/identity/models/region.rb +67 -45
- data/lib/oci/identity/models/region_subscription.rb +90 -71
- data/lib/oci/identity/models/saml2_identity_provider.rb +106 -92
- data/lib/oci/identity/models/smtp_credential.rb +118 -113
- data/lib/oci/identity/models/smtp_credential_summary.rb +113 -106
- data/lib/oci/identity/models/swift_password.rb +113 -106
- data/lib/oci/identity/models/tag.rb +108 -116
- data/lib/oci/identity/models/tag_namespace.rb +97 -97
- data/lib/oci/identity/models/tag_namespace_summary.rb +97 -97
- data/lib/oci/identity/models/tag_summary.rb +97 -97
- data/lib/oci/identity/models/tenancy.rb +86 -78
- data/lib/oci/identity/models/ui_password.rb +97 -82
- data/lib/oci/identity/models/update_compartment_details.rb +77 -62
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +61 -38
- data/lib/oci/identity/models/update_dynamic_group_details.rb +65 -45
- data/lib/oci/identity/models/update_group_details.rb +72 -55
- data/lib/oci/identity/models/update_identity_provider_details.rb +89 -74
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +66 -47
- data/lib/oci/identity/models/update_policy_details.rb +83 -72
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +79 -58
- data/lib/oci/identity/models/update_smtp_credential_details.rb +60 -35
- data/lib/oci/identity/models/update_state_details.rb +61 -36
- data/lib/oci/identity/models/update_swift_password_details.rb +60 -35
- data/lib/oci/identity/models/update_tag_details.rb +78 -65
- data/lib/oci/identity/models/update_tag_namespace_details.rb +78 -65
- data/lib/oci/identity/models/update_user_details.rb +72 -55
- data/lib/oci/identity/models/user.rb +120 -117
- data/lib/oci/identity/models/user_group_membership.rb +107 -100
- data/lib/oci/load_balancer/load_balancer.rb +3 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +918 -500
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +795 -0
- data/lib/oci/load_balancer/models/backend.rb +101 -94
- data/lib/oci/load_balancer/models/backend_details.rb +95 -86
- data/lib/oci/load_balancer/models/backend_health.rb +84 -57
- data/lib/oci/load_balancer/models/backend_set.rb +87 -79
- data/lib/oci/load_balancer/models/backend_set_details.rb +80 -70
- data/lib/oci/load_balancer/models/backend_set_health.rb +106 -91
- data/lib/oci/load_balancer/models/certificate.rb +78 -64
- data/lib/oci/load_balancer/models/certificate_details.rb +92 -84
- data/lib/oci/load_balancer/models/connection_configuration.rb +73 -51
- data/lib/oci/load_balancer/models/create_backend_details.rb +95 -86
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +87 -79
- data/lib/oci/load_balancer/models/create_certificate_details.rb +92 -84
- data/lib/oci/load_balancer/models/create_listener_details.rb +97 -93
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +109 -117
- data/lib/oci/load_balancer/models/create_path_route_set_details.rb +66 -46
- data/lib/oci/load_balancer/models/health_check_result.rb +98 -79
- data/lib/oci/load_balancer/models/health_checker.rb +108 -108
- data/lib/oci/load_balancer/models/health_checker_details.rb +108 -108
- data/lib/oci/load_balancer/models/ip_address.rb +70 -52
- data/lib/oci/load_balancer/models/listener.rb +97 -93
- data/lib/oci/load_balancer/models/listener_details.rb +91 -85
- data/lib/oci/load_balancer/models/load_balancer.rb +144 -157
- data/lib/oci/load_balancer/models/load_balancer_health.rb +110 -95
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +88 -61
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +59 -35
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +59 -35
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +59 -35
- data/lib/oci/load_balancer/models/path_match_type.rb +80 -51
- data/lib/oci/load_balancer/models/path_route.rb +76 -60
- data/lib/oci/load_balancer/models/path_route_set.rb +66 -46
- data/lib/oci/load_balancer/models/path_route_set_details.rb +60 -38
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +71 -55
- data/lib/oci/load_balancer/models/ssl_configuration.rb +78 -66
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +78 -66
- data/lib/oci/load_balancer/models/update_backend_details.rb +82 -67
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +80 -70
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +108 -108
- data/lib/oci/load_balancer/models/update_listener_details.rb +91 -85
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +62 -40
- data/lib/oci/load_balancer/models/update_path_route_set_details.rb +60 -38
- data/lib/oci/load_balancer/models/work_request.rb +115 -108
- data/lib/oci/load_balancer/models/work_request_error.rb +76 -49
- data/lib/oci/object_storage/models/bucket.rb +136 -133
- data/lib/oci/object_storage/models/bucket_summary.rb +95 -95
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +66 -48
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +64 -44
- data/lib/oci/object_storage/models/create_bucket_details.rb +113 -111
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +80 -70
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +87 -74
- data/lib/oci/object_storage/models/list_objects.rb +71 -53
- data/lib/oci/object_storage/models/multipart_upload.rb +77 -65
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +72 -56
- data/lib/oci/object_storage/models/namespace_metadata.rb +69 -53
- data/lib/oci/object_storage/models/object_summary.rb +73 -57
- data/lib/oci/object_storage/models/preauthenticated_request.rb +105 -96
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +99 -86
- data/lib/oci/object_storage/models/rename_object_details.rb +80 -74
- data/lib/oci/object_storage/models/restore_objects_details.rb +66 -45
- data/lib/oci/object_storage/models/update_bucket_details.rb +101 -97
- data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +65 -47
- data/lib/oci/object_storage/object_storage.rb +2 -0
- data/lib/oci/object_storage/object_storage_client.rb +737 -435
- data/lib/oci/object_storage/object_storage_client_composite_operations.rb +24 -0
- data/lib/oci/signer.rb +20 -7
- data/lib/oci/version.rb +1 -1
- metadata +13 -2
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
|
+
require 'logger'
|
|
4
5
|
|
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
5
7
|
module OCI
|
|
6
8
|
# Represents an attachment between a VNIC and an instance. For more information, see
|
|
7
9
|
# [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm).
|
|
8
10
|
#
|
|
9
|
-
class Core::Models::VnicAttachment
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
class Core::Models::VnicAttachment # rubocop:disable Metrics/LineLength
|
|
12
|
+
LIFECYCLE_STATE_ENUM = [
|
|
13
|
+
LIFECYCLE_STATE_ATTACHING = 'ATTACHING'.freeze,
|
|
14
|
+
LIFECYCLE_STATE_ATTACHED = 'ATTACHED'.freeze,
|
|
15
|
+
LIFECYCLE_STATE_DETACHING = 'DETACHING'.freeze,
|
|
16
|
+
LIFECYCLE_STATE_DETACHED = 'DETACHED'.freeze,
|
|
17
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
18
|
+
].freeze
|
|
16
19
|
|
|
17
20
|
# **[Required]** The Availability Domain of the instance.
|
|
18
|
-
#
|
|
21
|
+
#
|
|
19
22
|
# Example: `Uocm:PHX-AD-1`
|
|
20
|
-
#
|
|
23
|
+
#
|
|
21
24
|
# @return [String]
|
|
22
25
|
attr_accessor :availability_domain
|
|
23
26
|
|
|
24
27
|
# **[Required]** The OCID of the compartment the VNIC attachment is in, which is the same
|
|
25
28
|
# compartment the instance is in.
|
|
26
|
-
#
|
|
29
|
+
#
|
|
27
30
|
# @return [String]
|
|
28
31
|
attr_accessor :compartment_id
|
|
29
32
|
|
|
30
33
|
# A user-friendly name. Does not have to be unique.
|
|
31
34
|
# Avoid entering confidential information.
|
|
32
|
-
#
|
|
35
|
+
#
|
|
33
36
|
# @return [String]
|
|
34
37
|
attr_accessor :display_name
|
|
35
38
|
|
|
@@ -43,14 +46,14 @@ module OCI
|
|
|
43
46
|
|
|
44
47
|
# **[Required]** The current state of the VNIC attachment.
|
|
45
48
|
# @return [String]
|
|
46
|
-
|
|
49
|
+
attr_reader :lifecycle_state
|
|
47
50
|
|
|
48
51
|
# Which physical network interface card (NIC) the VNIC uses.
|
|
49
52
|
# Certain bare metal instance shapes have two active physical NICs (0 and 1). If
|
|
50
53
|
# you add a secondary VNIC to one of these instances, you can specify which NIC
|
|
51
54
|
# the VNIC will use. For more information, see
|
|
52
55
|
# [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm).
|
|
53
|
-
#
|
|
56
|
+
#
|
|
54
57
|
# @return [Integer]
|
|
55
58
|
attr_accessor :nic_index
|
|
56
59
|
|
|
@@ -59,17 +62,17 @@ module OCI
|
|
|
59
62
|
attr_accessor :subnet_id
|
|
60
63
|
|
|
61
64
|
# **[Required]** The date and time the VNIC attachment was created, in the format defined by RFC3339.
|
|
62
|
-
#
|
|
65
|
+
#
|
|
63
66
|
# Example: `2016-08-25T21:10:29.600Z`
|
|
64
|
-
#
|
|
67
|
+
#
|
|
65
68
|
# @return [DateTime]
|
|
66
69
|
attr_accessor :time_created
|
|
67
70
|
|
|
68
71
|
# The Oracle-assigned VLAN tag of the attached VNIC. Available after the
|
|
69
72
|
# attachment process is complete.
|
|
70
|
-
#
|
|
73
|
+
#
|
|
71
74
|
# Example: `0`
|
|
72
|
-
#
|
|
75
|
+
#
|
|
73
76
|
# @return [Integer]
|
|
74
77
|
attr_accessor :vlan_tag
|
|
75
78
|
|
|
@@ -77,6 +80,47 @@ module OCI
|
|
|
77
80
|
# @return [String]
|
|
78
81
|
attr_accessor :vnic_id
|
|
79
82
|
|
|
83
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
84
|
+
def self.attribute_map
|
|
85
|
+
{
|
|
86
|
+
# rubocop:disable Style/SymbolLiteral
|
|
87
|
+
'availability_domain': :'availabilityDomain',
|
|
88
|
+
'compartment_id': :'compartmentId',
|
|
89
|
+
'display_name': :'displayName',
|
|
90
|
+
'id': :'id',
|
|
91
|
+
'instance_id': :'instanceId',
|
|
92
|
+
'lifecycle_state': :'lifecycleState',
|
|
93
|
+
'nic_index': :'nicIndex',
|
|
94
|
+
'subnet_id': :'subnetId',
|
|
95
|
+
'time_created': :'timeCreated',
|
|
96
|
+
'vlan_tag': :'vlanTag',
|
|
97
|
+
'vnic_id': :'vnicId'
|
|
98
|
+
# rubocop:enable Style/SymbolLiteral
|
|
99
|
+
}
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Attribute type mapping.
|
|
103
|
+
def self.swagger_types
|
|
104
|
+
{
|
|
105
|
+
# rubocop:disable Style/SymbolLiteral
|
|
106
|
+
'availability_domain': :'String',
|
|
107
|
+
'compartment_id': :'String',
|
|
108
|
+
'display_name': :'String',
|
|
109
|
+
'id': :'String',
|
|
110
|
+
'instance_id': :'String',
|
|
111
|
+
'lifecycle_state': :'String',
|
|
112
|
+
'nic_index': :'Integer',
|
|
113
|
+
'subnet_id': :'String',
|
|
114
|
+
'time_created': :'DateTime',
|
|
115
|
+
'vlan_tag': :'Integer',
|
|
116
|
+
'vnic_id': :'String'
|
|
117
|
+
# rubocop:enable Style/SymbolLiteral
|
|
118
|
+
}
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
122
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
123
|
+
|
|
80
124
|
|
|
81
125
|
# Initializes the object
|
|
82
126
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
@@ -95,153 +139,128 @@ module OCI
|
|
|
95
139
|
return unless attributes.is_a?(Hash)
|
|
96
140
|
|
|
97
141
|
# convert string to symbol for hash key
|
|
98
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
142
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
99
143
|
|
|
100
|
-
if attributes[:'availabilityDomain']
|
|
101
|
-
self.availability_domain = attributes[:'availabilityDomain']
|
|
102
|
-
end
|
|
144
|
+
self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']
|
|
103
145
|
|
|
104
146
|
raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
|
|
105
147
|
|
|
106
|
-
if attributes[:'availability_domain']
|
|
107
|
-
self.availability_domain = attributes[:'availability_domain']
|
|
108
|
-
end
|
|
148
|
+
self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain']
|
|
109
149
|
|
|
110
|
-
if attributes[:'compartmentId']
|
|
111
|
-
self.compartment_id = attributes[:'compartmentId']
|
|
112
|
-
end
|
|
150
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
|
113
151
|
|
|
114
152
|
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
|
115
153
|
|
|
116
|
-
if attributes[:'compartment_id']
|
|
117
|
-
self.compartment_id = attributes[:'compartment_id']
|
|
118
|
-
end
|
|
154
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
|
119
155
|
|
|
120
|
-
if attributes[:'displayName']
|
|
121
|
-
self.display_name = attributes[:'displayName']
|
|
122
|
-
end
|
|
156
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
123
157
|
|
|
124
158
|
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
125
159
|
|
|
126
|
-
if attributes[:'display_name']
|
|
127
|
-
self.display_name = attributes[:'display_name']
|
|
128
|
-
end
|
|
160
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
129
161
|
|
|
130
|
-
if attributes[:'id']
|
|
131
|
-
self.id = attributes[:'id']
|
|
132
|
-
end
|
|
162
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
|
133
163
|
|
|
134
|
-
if attributes[:'instanceId']
|
|
135
|
-
self.instance_id = attributes[:'instanceId']
|
|
136
|
-
end
|
|
164
|
+
self.instance_id = attributes[:'instanceId'] if attributes[:'instanceId']
|
|
137
165
|
|
|
138
166
|
raise 'You cannot provide both :instanceId and :instance_id' if attributes.key?(:'instanceId') && attributes.key?(:'instance_id')
|
|
139
167
|
|
|
140
|
-
if attributes[:'instance_id']
|
|
141
|
-
self.instance_id = attributes[:'instance_id']
|
|
142
|
-
end
|
|
168
|
+
self.instance_id = attributes[:'instance_id'] if attributes[:'instance_id']
|
|
143
169
|
|
|
144
|
-
if attributes[:'lifecycleState']
|
|
145
|
-
self.lifecycle_state = attributes[:'lifecycleState']
|
|
146
|
-
end
|
|
170
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
|
147
171
|
|
|
148
172
|
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
|
149
173
|
|
|
150
|
-
if attributes[:'lifecycle_state']
|
|
151
|
-
self.lifecycle_state = attributes[:'lifecycle_state']
|
|
152
|
-
end
|
|
174
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
|
153
175
|
|
|
154
|
-
if attributes[:'nicIndex']
|
|
155
|
-
self.nic_index = attributes[:'nicIndex']
|
|
156
|
-
end
|
|
176
|
+
self.nic_index = attributes[:'nicIndex'] if attributes[:'nicIndex']
|
|
157
177
|
|
|
158
178
|
raise 'You cannot provide both :nicIndex and :nic_index' if attributes.key?(:'nicIndex') && attributes.key?(:'nic_index')
|
|
159
179
|
|
|
160
|
-
if attributes[:'nic_index']
|
|
161
|
-
self.nic_index = attributes[:'nic_index']
|
|
162
|
-
end
|
|
180
|
+
self.nic_index = attributes[:'nic_index'] if attributes[:'nic_index']
|
|
163
181
|
|
|
164
|
-
if attributes[:'subnetId']
|
|
165
|
-
self.subnet_id = attributes[:'subnetId']
|
|
166
|
-
end
|
|
182
|
+
self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId']
|
|
167
183
|
|
|
168
184
|
raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id')
|
|
169
185
|
|
|
170
|
-
if attributes[:'subnet_id']
|
|
171
|
-
self.subnet_id = attributes[:'subnet_id']
|
|
172
|
-
end
|
|
186
|
+
self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id']
|
|
173
187
|
|
|
174
|
-
if attributes[:'timeCreated']
|
|
175
|
-
self.time_created = attributes[:'timeCreated']
|
|
176
|
-
end
|
|
188
|
+
self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
|
|
177
189
|
|
|
178
190
|
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
|
179
191
|
|
|
180
|
-
if attributes[:'time_created']
|
|
181
|
-
self.time_created = attributes[:'time_created']
|
|
182
|
-
end
|
|
192
|
+
self.time_created = attributes[:'time_created'] if attributes[:'time_created']
|
|
183
193
|
|
|
184
|
-
if attributes[:'vlanTag']
|
|
185
|
-
self.vlan_tag = attributes[:'vlanTag']
|
|
186
|
-
end
|
|
194
|
+
self.vlan_tag = attributes[:'vlanTag'] if attributes[:'vlanTag']
|
|
187
195
|
|
|
188
196
|
raise 'You cannot provide both :vlanTag and :vlan_tag' if attributes.key?(:'vlanTag') && attributes.key?(:'vlan_tag')
|
|
189
197
|
|
|
190
|
-
if attributes[:'vlan_tag']
|
|
191
|
-
self.vlan_tag = attributes[:'vlan_tag']
|
|
192
|
-
end
|
|
198
|
+
self.vlan_tag = attributes[:'vlan_tag'] if attributes[:'vlan_tag']
|
|
193
199
|
|
|
194
|
-
if attributes[:'vnicId']
|
|
195
|
-
self.vnic_id = attributes[:'vnicId']
|
|
196
|
-
end
|
|
200
|
+
self.vnic_id = attributes[:'vnicId'] if attributes[:'vnicId']
|
|
197
201
|
|
|
198
202
|
raise 'You cannot provide both :vnicId and :vnic_id' if attributes.key?(:'vnicId') && attributes.key?(:'vnic_id')
|
|
199
203
|
|
|
200
|
-
if attributes[:'vnic_id']
|
|
201
|
-
self.vnic_id = attributes[:'vnic_id']
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
+
self.vnic_id = attributes[:'vnic_id'] if attributes[:'vnic_id']
|
|
204
205
|
end
|
|
206
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
207
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
205
208
|
|
|
206
209
|
# Custom attribute writer method checking allowed values (enum).
|
|
207
210
|
# @param [Object] lifecycle_state Object to be assigned
|
|
208
211
|
def lifecycle_state=(lifecycle_state)
|
|
212
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
209
213
|
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
|
214
|
+
# rubocop: disable Metrics/LineLength
|
|
215
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
216
|
+
# rubocop: enable Metrics/LineLength
|
|
210
217
|
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
|
211
218
|
else
|
|
212
219
|
@lifecycle_state = lifecycle_state
|
|
213
220
|
end
|
|
221
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
214
222
|
end
|
|
215
223
|
|
|
224
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
225
|
+
|
|
226
|
+
|
|
216
227
|
# Checks equality by comparing each attribute.
|
|
217
|
-
# @param [Object]
|
|
218
|
-
def ==(
|
|
219
|
-
return true if
|
|
220
|
-
self.class ==
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
# @param [Object] other the other object to be compared
|
|
229
|
+
def ==(other)
|
|
230
|
+
return true if equal?(other)
|
|
231
|
+
self.class == other.class &&
|
|
232
|
+
availability_domain == other.availability_domain &&
|
|
233
|
+
compartment_id == other.compartment_id &&
|
|
234
|
+
display_name == other.display_name &&
|
|
235
|
+
id == other.id &&
|
|
236
|
+
instance_id == other.instance_id &&
|
|
237
|
+
lifecycle_state == other.lifecycle_state &&
|
|
238
|
+
nic_index == other.nic_index &&
|
|
239
|
+
subnet_id == other.subnet_id &&
|
|
240
|
+
time_created == other.time_created &&
|
|
241
|
+
vlan_tag == other.vlan_tag &&
|
|
242
|
+
vnic_id == other.vnic_id
|
|
232
243
|
end
|
|
244
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
233
245
|
|
|
234
246
|
# @see the `==` method
|
|
235
|
-
# @param [Object]
|
|
236
|
-
def eql?(
|
|
237
|
-
self ==
|
|
247
|
+
# @param [Object] other the other object to be compared
|
|
248
|
+
def eql?(other)
|
|
249
|
+
self == other
|
|
238
250
|
end
|
|
239
251
|
|
|
252
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
253
|
+
|
|
254
|
+
|
|
240
255
|
# Calculates hash code according to all attributes.
|
|
241
256
|
# @return [Fixnum] Hash code
|
|
242
257
|
def hash
|
|
243
258
|
[availability_domain, compartment_id, display_name, id, instance_id, lifecycle_state, nic_index, subnet_id, time_created, vlan_tag, vnic_id].hash
|
|
244
259
|
end
|
|
260
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
261
|
+
|
|
262
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
263
|
+
|
|
245
264
|
|
|
246
265
|
# Builds the object from hash
|
|
247
266
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
@@ -253,15 +272,22 @@ module OCI
|
|
|
253
272
|
# check to ensure the input is an array given that the the attribute
|
|
254
273
|
# is documented as an array but the input is not
|
|
255
274
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
256
|
-
|
|
275
|
+
public_method("#{key}=").call(
|
|
276
|
+
attributes[self.class.attribute_map[key]]
|
|
277
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
278
|
+
)
|
|
257
279
|
end
|
|
258
280
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
259
|
-
|
|
260
|
-
|
|
281
|
+
public_method("#{key}=").call(
|
|
282
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
283
|
+
)
|
|
284
|
+
end
|
|
285
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
261
286
|
end
|
|
262
287
|
|
|
263
288
|
self
|
|
264
289
|
end
|
|
290
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
265
291
|
|
|
266
292
|
# Returns the string representation of the object
|
|
267
293
|
# @return [String] String presentation of the object
|
|
@@ -285,11 +311,11 @@ module OCI
|
|
|
285
311
|
|
|
286
312
|
# Outputs non-array value in the form of hash
|
|
287
313
|
# For object, use to_hash. Otherwise, just return the value
|
|
288
|
-
# @param [Object] value Any valid value
|
|
314
|
+
# @param [Object] value Any valid value
|
|
289
315
|
# @return [Hash] Returns the value in the form of hash
|
|
290
316
|
def _to_hash(value)
|
|
291
317
|
if value.is_a?(Array)
|
|
292
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
318
|
+
value.compact.map { |v| _to_hash(v) }
|
|
293
319
|
elsif value.is_a?(Hash)
|
|
294
320
|
{}.tap do |hash|
|
|
295
321
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -300,41 +326,6 @@ module OCI
|
|
|
300
326
|
value
|
|
301
327
|
end
|
|
302
328
|
end
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
307
|
-
def self.attribute_map
|
|
308
|
-
{
|
|
309
|
-
:'availability_domain' => :'availabilityDomain',
|
|
310
|
-
:'compartment_id' => :'compartmentId',
|
|
311
|
-
:'display_name' => :'displayName',
|
|
312
|
-
:'id' => :'id',
|
|
313
|
-
:'instance_id' => :'instanceId',
|
|
314
|
-
:'lifecycle_state' => :'lifecycleState',
|
|
315
|
-
:'nic_index' => :'nicIndex',
|
|
316
|
-
:'subnet_id' => :'subnetId',
|
|
317
|
-
:'time_created' => :'timeCreated',
|
|
318
|
-
:'vlan_tag' => :'vlanTag',
|
|
319
|
-
:'vnic_id' => :'vnicId'
|
|
320
|
-
}
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
# Attribute type mapping.
|
|
324
|
-
def self.swagger_types
|
|
325
|
-
{
|
|
326
|
-
:'availability_domain' => :'String',
|
|
327
|
-
:'compartment_id' => :'String',
|
|
328
|
-
:'display_name' => :'String',
|
|
329
|
-
:'id' => :'String',
|
|
330
|
-
:'instance_id' => :'String',
|
|
331
|
-
:'lifecycle_state' => :'String',
|
|
332
|
-
:'nic_index' => :'Integer',
|
|
333
|
-
:'subnet_id' => :'String',
|
|
334
|
-
:'time_created' => :'DateTime',
|
|
335
|
-
:'vlan_tag' => :'Integer',
|
|
336
|
-
:'vnic_id' => :'String'
|
|
337
|
-
}
|
|
338
|
-
end
|
|
339
329
|
end
|
|
340
330
|
end
|
|
331
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
|
+
require 'logger'
|
|
4
5
|
|
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
5
7
|
module OCI
|
|
6
8
|
# A detachable block volume device that allows you to dynamically expand
|
|
7
9
|
# the storage capacity of an instance. For more information, see
|
|
@@ -11,20 +13,21 @@ module OCI
|
|
|
11
13
|
# talk to an administrator. If you're an administrator who needs to write policies to give users access, see
|
|
12
14
|
# [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
|
13
15
|
#
|
|
14
|
-
class Core::Models::Volume
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
class Core::Models::Volume # rubocop:disable Metrics/LineLength
|
|
17
|
+
LIFECYCLE_STATE_ENUM = [
|
|
18
|
+
LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
|
|
19
|
+
LIFECYCLE_STATE_RESTORING = 'RESTORING'.freeze,
|
|
20
|
+
LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
|
|
21
|
+
LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
|
|
22
|
+
LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
|
|
23
|
+
LIFECYCLE_STATE_FAULTY = 'FAULTY'.freeze,
|
|
24
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
25
|
+
].freeze
|
|
23
26
|
|
|
24
27
|
# **[Required]** The Availability Domain of the volume.
|
|
25
|
-
#
|
|
28
|
+
#
|
|
26
29
|
# Example: `Uocm:PHX-AD-1`
|
|
27
|
-
#
|
|
30
|
+
#
|
|
28
31
|
# @return [String]
|
|
29
32
|
attr_accessor :availability_domain
|
|
30
33
|
|
|
@@ -34,24 +37,24 @@ module OCI
|
|
|
34
37
|
|
|
35
38
|
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
|
36
39
|
# For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
|
37
|
-
#
|
|
40
|
+
#
|
|
38
41
|
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
|
39
|
-
#
|
|
42
|
+
#
|
|
40
43
|
# @return [Hash<String, Hash<String, Object>>]
|
|
41
44
|
attr_accessor :defined_tags
|
|
42
45
|
|
|
43
46
|
# **[Required]** A user-friendly name. Does not have to be unique, and it's changeable.
|
|
44
47
|
# Avoid entering confidential information.
|
|
45
|
-
#
|
|
48
|
+
#
|
|
46
49
|
# @return [String]
|
|
47
50
|
attr_accessor :display_name
|
|
48
51
|
|
|
49
52
|
# Free-form tags for this resource. Each tag is a simple key-value pair with no
|
|
50
53
|
# predefined name, type, or namespace. For more information, see
|
|
51
54
|
# [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
|
52
|
-
#
|
|
55
|
+
#
|
|
53
56
|
# Example: `{\"Department\": \"Finance\"}`
|
|
54
|
-
#
|
|
57
|
+
#
|
|
55
58
|
# @return [Hash<String, String>]
|
|
56
59
|
attr_accessor :freeform_tags
|
|
57
60
|
|
|
@@ -65,7 +68,7 @@ module OCI
|
|
|
65
68
|
|
|
66
69
|
# **[Required]** The current state of a volume.
|
|
67
70
|
# @return [String]
|
|
68
|
-
|
|
71
|
+
attr_reader :lifecycle_state
|
|
69
72
|
|
|
70
73
|
# The size of the volume in GBs.
|
|
71
74
|
# @return [Integer]
|
|
@@ -77,7 +80,7 @@ module OCI
|
|
|
77
80
|
|
|
78
81
|
# The volume source, either an existing volume in the same Availability Domain or a volume backup.
|
|
79
82
|
# If null, an empty volume is created.
|
|
80
|
-
#
|
|
83
|
+
#
|
|
81
84
|
# @return [OCI::Core::Models::VolumeSourceDetails]
|
|
82
85
|
attr_accessor :source_details
|
|
83
86
|
|
|
@@ -85,6 +88,49 @@ module OCI
|
|
|
85
88
|
# @return [DateTime]
|
|
86
89
|
attr_accessor :time_created
|
|
87
90
|
|
|
91
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
92
|
+
def self.attribute_map
|
|
93
|
+
{
|
|
94
|
+
# rubocop:disable Style/SymbolLiteral
|
|
95
|
+
'availability_domain': :'availabilityDomain',
|
|
96
|
+
'compartment_id': :'compartmentId',
|
|
97
|
+
'defined_tags': :'definedTags',
|
|
98
|
+
'display_name': :'displayName',
|
|
99
|
+
'freeform_tags': :'freeformTags',
|
|
100
|
+
'id': :'id',
|
|
101
|
+
'is_hydrated': :'isHydrated',
|
|
102
|
+
'lifecycle_state': :'lifecycleState',
|
|
103
|
+
'size_in_gbs': :'sizeInGBs',
|
|
104
|
+
'size_in_mbs': :'sizeInMBs',
|
|
105
|
+
'source_details': :'sourceDetails',
|
|
106
|
+
'time_created': :'timeCreated'
|
|
107
|
+
# rubocop:enable Style/SymbolLiteral
|
|
108
|
+
}
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Attribute type mapping.
|
|
112
|
+
def self.swagger_types
|
|
113
|
+
{
|
|
114
|
+
# rubocop:disable Style/SymbolLiteral
|
|
115
|
+
'availability_domain': :'String',
|
|
116
|
+
'compartment_id': :'String',
|
|
117
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
|
118
|
+
'display_name': :'String',
|
|
119
|
+
'freeform_tags': :'Hash<String, String>',
|
|
120
|
+
'id': :'String',
|
|
121
|
+
'is_hydrated': :'BOOLEAN',
|
|
122
|
+
'lifecycle_state': :'String',
|
|
123
|
+
'size_in_gbs': :'Integer',
|
|
124
|
+
'size_in_mbs': :'Integer',
|
|
125
|
+
'source_details': :'OCI::Core::Models::VolumeSourceDetails',
|
|
126
|
+
'time_created': :'DateTime'
|
|
127
|
+
# rubocop:enable Style/SymbolLiteral
|
|
128
|
+
}
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
132
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
133
|
+
|
|
88
134
|
|
|
89
135
|
# Initializes the object
|
|
90
136
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
@@ -104,164 +150,135 @@ module OCI
|
|
|
104
150
|
return unless attributes.is_a?(Hash)
|
|
105
151
|
|
|
106
152
|
# convert string to symbol for hash key
|
|
107
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
153
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
108
154
|
|
|
109
|
-
if attributes[:'availabilityDomain']
|
|
110
|
-
self.availability_domain = attributes[:'availabilityDomain']
|
|
111
|
-
end
|
|
155
|
+
self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']
|
|
112
156
|
|
|
113
157
|
raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
|
|
114
158
|
|
|
115
|
-
if attributes[:'availability_domain']
|
|
116
|
-
self.availability_domain = attributes[:'availability_domain']
|
|
117
|
-
end
|
|
159
|
+
self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain']
|
|
118
160
|
|
|
119
|
-
if attributes[:'compartmentId']
|
|
120
|
-
self.compartment_id = attributes[:'compartmentId']
|
|
121
|
-
end
|
|
161
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
|
122
162
|
|
|
123
163
|
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
|
124
164
|
|
|
125
|
-
if attributes[:'compartment_id']
|
|
126
|
-
self.compartment_id = attributes[:'compartment_id']
|
|
127
|
-
end
|
|
165
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
|
128
166
|
|
|
129
|
-
if attributes[:'definedTags']
|
|
130
|
-
self.defined_tags = attributes[:'definedTags']
|
|
131
|
-
end
|
|
167
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
|
132
168
|
|
|
133
169
|
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
|
134
170
|
|
|
135
|
-
if attributes[:'defined_tags']
|
|
136
|
-
self.defined_tags = attributes[:'defined_tags']
|
|
137
|
-
end
|
|
171
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
|
138
172
|
|
|
139
|
-
if attributes[:'displayName']
|
|
140
|
-
self.display_name = attributes[:'displayName']
|
|
141
|
-
end
|
|
173
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
142
174
|
|
|
143
175
|
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
144
176
|
|
|
145
|
-
if attributes[:'display_name']
|
|
146
|
-
self.display_name = attributes[:'display_name']
|
|
147
|
-
end
|
|
177
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
148
178
|
|
|
149
|
-
if attributes[:'freeformTags']
|
|
150
|
-
self.freeform_tags = attributes[:'freeformTags']
|
|
151
|
-
end
|
|
179
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
|
152
180
|
|
|
153
181
|
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
|
154
182
|
|
|
155
|
-
if attributes[:'freeform_tags']
|
|
156
|
-
self.freeform_tags = attributes[:'freeform_tags']
|
|
157
|
-
end
|
|
183
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
|
158
184
|
|
|
159
|
-
if attributes[:'id']
|
|
160
|
-
self.id = attributes[:'id']
|
|
161
|
-
end
|
|
185
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
|
162
186
|
|
|
163
|
-
unless attributes[:'isHydrated'].nil?
|
|
164
|
-
self.is_hydrated = attributes[:'isHydrated']
|
|
165
|
-
end
|
|
187
|
+
self.is_hydrated = attributes[:'isHydrated'] unless attributes[:'isHydrated'].nil?
|
|
166
188
|
|
|
167
189
|
raise 'You cannot provide both :isHydrated and :is_hydrated' if attributes.key?(:'isHydrated') && attributes.key?(:'is_hydrated')
|
|
168
190
|
|
|
169
|
-
unless attributes[:'is_hydrated'].nil?
|
|
170
|
-
self.is_hydrated = attributes[:'is_hydrated']
|
|
171
|
-
end
|
|
191
|
+
self.is_hydrated = attributes[:'is_hydrated'] unless attributes[:'is_hydrated'].nil?
|
|
172
192
|
|
|
173
|
-
if attributes[:'lifecycleState']
|
|
174
|
-
self.lifecycle_state = attributes[:'lifecycleState']
|
|
175
|
-
end
|
|
193
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
|
176
194
|
|
|
177
195
|
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
|
178
196
|
|
|
179
|
-
if attributes[:'lifecycle_state']
|
|
180
|
-
self.lifecycle_state = attributes[:'lifecycle_state']
|
|
181
|
-
end
|
|
197
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
|
182
198
|
|
|
183
|
-
if attributes[:'sizeInGBs']
|
|
184
|
-
self.size_in_gbs = attributes[:'sizeInGBs']
|
|
185
|
-
end
|
|
199
|
+
self.size_in_gbs = attributes[:'sizeInGBs'] if attributes[:'sizeInGBs']
|
|
186
200
|
|
|
187
201
|
raise 'You cannot provide both :sizeInGBs and :size_in_gbs' if attributes.key?(:'sizeInGBs') && attributes.key?(:'size_in_gbs')
|
|
188
202
|
|
|
189
|
-
if attributes[:'size_in_gbs']
|
|
190
|
-
self.size_in_gbs = attributes[:'size_in_gbs']
|
|
191
|
-
end
|
|
203
|
+
self.size_in_gbs = attributes[:'size_in_gbs'] if attributes[:'size_in_gbs']
|
|
192
204
|
|
|
193
|
-
if attributes[:'sizeInMBs']
|
|
194
|
-
self.size_in_mbs = attributes[:'sizeInMBs']
|
|
195
|
-
end
|
|
205
|
+
self.size_in_mbs = attributes[:'sizeInMBs'] if attributes[:'sizeInMBs']
|
|
196
206
|
|
|
197
207
|
raise 'You cannot provide both :sizeInMBs and :size_in_mbs' if attributes.key?(:'sizeInMBs') && attributes.key?(:'size_in_mbs')
|
|
198
208
|
|
|
199
|
-
if attributes[:'size_in_mbs']
|
|
200
|
-
self.size_in_mbs = attributes[:'size_in_mbs']
|
|
201
|
-
end
|
|
209
|
+
self.size_in_mbs = attributes[:'size_in_mbs'] if attributes[:'size_in_mbs']
|
|
202
210
|
|
|
203
|
-
if attributes[:'sourceDetails']
|
|
204
|
-
self.source_details = attributes[:'sourceDetails']
|
|
205
|
-
end
|
|
211
|
+
self.source_details = attributes[:'sourceDetails'] if attributes[:'sourceDetails']
|
|
206
212
|
|
|
207
213
|
raise 'You cannot provide both :sourceDetails and :source_details' if attributes.key?(:'sourceDetails') && attributes.key?(:'source_details')
|
|
208
214
|
|
|
209
|
-
if attributes[:'source_details']
|
|
210
|
-
self.source_details = attributes[:'source_details']
|
|
211
|
-
end
|
|
215
|
+
self.source_details = attributes[:'source_details'] if attributes[:'source_details']
|
|
212
216
|
|
|
213
|
-
if attributes[:'timeCreated']
|
|
214
|
-
self.time_created = attributes[:'timeCreated']
|
|
215
|
-
end
|
|
217
|
+
self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
|
|
216
218
|
|
|
217
219
|
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
|
218
220
|
|
|
219
|
-
if attributes[:'time_created']
|
|
220
|
-
self.time_created = attributes[:'time_created']
|
|
221
|
-
end
|
|
222
|
-
|
|
221
|
+
self.time_created = attributes[:'time_created'] if attributes[:'time_created']
|
|
223
222
|
end
|
|
223
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
224
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
224
225
|
|
|
225
226
|
# Custom attribute writer method checking allowed values (enum).
|
|
226
227
|
# @param [Object] lifecycle_state Object to be assigned
|
|
227
228
|
def lifecycle_state=(lifecycle_state)
|
|
229
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
228
230
|
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
|
231
|
+
# rubocop: disable Metrics/LineLength
|
|
232
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
233
|
+
# rubocop: enable Metrics/LineLength
|
|
229
234
|
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
|
230
235
|
else
|
|
231
236
|
@lifecycle_state = lifecycle_state
|
|
232
237
|
end
|
|
238
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
233
239
|
end
|
|
234
240
|
|
|
241
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
242
|
+
|
|
243
|
+
|
|
235
244
|
# Checks equality by comparing each attribute.
|
|
236
|
-
# @param [Object]
|
|
237
|
-
def ==(
|
|
238
|
-
return true if
|
|
239
|
-
self.class ==
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
245
|
+
# @param [Object] other the other object to be compared
|
|
246
|
+
def ==(other)
|
|
247
|
+
return true if equal?(other)
|
|
248
|
+
self.class == other.class &&
|
|
249
|
+
availability_domain == other.availability_domain &&
|
|
250
|
+
compartment_id == other.compartment_id &&
|
|
251
|
+
defined_tags == other.defined_tags &&
|
|
252
|
+
display_name == other.display_name &&
|
|
253
|
+
freeform_tags == other.freeform_tags &&
|
|
254
|
+
id == other.id &&
|
|
255
|
+
is_hydrated == other.is_hydrated &&
|
|
256
|
+
lifecycle_state == other.lifecycle_state &&
|
|
257
|
+
size_in_gbs == other.size_in_gbs &&
|
|
258
|
+
size_in_mbs == other.size_in_mbs &&
|
|
259
|
+
source_details == other.source_details &&
|
|
260
|
+
time_created == other.time_created
|
|
252
261
|
end
|
|
262
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
253
263
|
|
|
254
264
|
# @see the `==` method
|
|
255
|
-
# @param [Object]
|
|
256
|
-
def eql?(
|
|
257
|
-
self ==
|
|
265
|
+
# @param [Object] other the other object to be compared
|
|
266
|
+
def eql?(other)
|
|
267
|
+
self == other
|
|
258
268
|
end
|
|
259
269
|
|
|
270
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
271
|
+
|
|
272
|
+
|
|
260
273
|
# Calculates hash code according to all attributes.
|
|
261
274
|
# @return [Fixnum] Hash code
|
|
262
275
|
def hash
|
|
263
276
|
[availability_domain, compartment_id, defined_tags, display_name, freeform_tags, id, is_hydrated, lifecycle_state, size_in_gbs, size_in_mbs, source_details, time_created].hash
|
|
264
277
|
end
|
|
278
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
279
|
+
|
|
280
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
281
|
+
|
|
265
282
|
|
|
266
283
|
# Builds the object from hash
|
|
267
284
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
@@ -273,15 +290,22 @@ module OCI
|
|
|
273
290
|
# check to ensure the input is an array given that the the attribute
|
|
274
291
|
# is documented as an array but the input is not
|
|
275
292
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
276
|
-
|
|
293
|
+
public_method("#{key}=").call(
|
|
294
|
+
attributes[self.class.attribute_map[key]]
|
|
295
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
296
|
+
)
|
|
277
297
|
end
|
|
278
298
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
279
|
-
|
|
280
|
-
|
|
299
|
+
public_method("#{key}=").call(
|
|
300
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
301
|
+
)
|
|
302
|
+
end
|
|
303
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
281
304
|
end
|
|
282
305
|
|
|
283
306
|
self
|
|
284
307
|
end
|
|
308
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
285
309
|
|
|
286
310
|
# Returns the string representation of the object
|
|
287
311
|
# @return [String] String presentation of the object
|
|
@@ -305,11 +329,11 @@ module OCI
|
|
|
305
329
|
|
|
306
330
|
# Outputs non-array value in the form of hash
|
|
307
331
|
# For object, use to_hash. Otherwise, just return the value
|
|
308
|
-
# @param [Object] value Any valid value
|
|
332
|
+
# @param [Object] value Any valid value
|
|
309
333
|
# @return [Hash] Returns the value in the form of hash
|
|
310
334
|
def _to_hash(value)
|
|
311
335
|
if value.is_a?(Array)
|
|
312
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
336
|
+
value.compact.map { |v| _to_hash(v) }
|
|
313
337
|
elsif value.is_a?(Hash)
|
|
314
338
|
{}.tap do |hash|
|
|
315
339
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -320,43 +344,6 @@ module OCI
|
|
|
320
344
|
value
|
|
321
345
|
end
|
|
322
346
|
end
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
327
|
-
def self.attribute_map
|
|
328
|
-
{
|
|
329
|
-
:'availability_domain' => :'availabilityDomain',
|
|
330
|
-
:'compartment_id' => :'compartmentId',
|
|
331
|
-
:'defined_tags' => :'definedTags',
|
|
332
|
-
:'display_name' => :'displayName',
|
|
333
|
-
:'freeform_tags' => :'freeformTags',
|
|
334
|
-
:'id' => :'id',
|
|
335
|
-
:'is_hydrated' => :'isHydrated',
|
|
336
|
-
:'lifecycle_state' => :'lifecycleState',
|
|
337
|
-
:'size_in_gbs' => :'sizeInGBs',
|
|
338
|
-
:'size_in_mbs' => :'sizeInMBs',
|
|
339
|
-
:'source_details' => :'sourceDetails',
|
|
340
|
-
:'time_created' => :'timeCreated'
|
|
341
|
-
}
|
|
342
|
-
end
|
|
343
|
-
|
|
344
|
-
# Attribute type mapping.
|
|
345
|
-
def self.swagger_types
|
|
346
|
-
{
|
|
347
|
-
:'availability_domain' => :'String',
|
|
348
|
-
:'compartment_id' => :'String',
|
|
349
|
-
:'defined_tags' => :'Hash<String, Hash<String, Object>>',
|
|
350
|
-
:'display_name' => :'String',
|
|
351
|
-
:'freeform_tags' => :'Hash<String, String>',
|
|
352
|
-
:'id' => :'String',
|
|
353
|
-
:'is_hydrated' => :'BOOLEAN',
|
|
354
|
-
:'lifecycle_state' => :'String',
|
|
355
|
-
:'size_in_gbs' => :'Integer',
|
|
356
|
-
:'size_in_mbs' => :'Integer',
|
|
357
|
-
:'source_details' => :'OCI::Core::Models::VolumeSourceDetails',
|
|
358
|
-
:'time_created' => :'DateTime'
|
|
359
|
-
}
|
|
360
|
-
end
|
|
361
347
|
end
|
|
362
348
|
end
|
|
349
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|