From d0a43d142f7eebd6ee65f8f51d210ad703829885 Mon Sep 17 00:00:00 2001 From: Harvey Lowndes Date: Mon, 16 Jul 2018 16:49:08 +0100 Subject: [PATCH] Update Official OCI Go SDK --- .../github.com/oracle/oci-go-sdk/CHANGELOG.md | 104 +- vendor/github.com/oracle/oci-go-sdk/Makefile | 9 +- .../oracle/oci-go-sdk/audit/audit_client.go | 89 +- .../oracle/oci-go-sdk/audit/audit_event.go | 4 + .../get_configuration_request_response.go | 23 + .../audit/list_events_request_response.go | 21 +- .../update_configuration_request_response.go | 23 + .../oci-go-sdk/cmd/genver/version_template.go | 2 - .../common/auth/certificate_retriever.go | 4 + .../oci-go-sdk/common/auth/configuration.go | 2 +- .../common/auth/federation_client.go | 6 +- .../auth/instance_principal_key_provider.go | 7 +- .../oracle/oci-go-sdk/common/client.go | 89 +- .../oracle/oci-go-sdk/common/common.go | 4 + .../oracle/oci-go-sdk/common/configuration.go | 49 +- .../oracle/oci-go-sdk/common/errors.go | 11 + .../oracle/oci-go-sdk/common/helpers.go | 12 + .../oracle/oci-go-sdk/common/http.go | 99 +- .../oracle/oci-go-sdk/common/http_signer.go | 15 +- .../oracle/oci-go-sdk/common/log.go | 19 +- .../oracle/oci-go-sdk/common/retry.go | 139 + .../oracle/oci-go-sdk/common/version.go | 2 +- .../containerengine/add_on_options.go | 27 + .../oci-go-sdk/containerengine/cluster.go | 85 + .../containerengine/cluster_create_options.go | 30 + .../containerengine/cluster_endpoints.go | 24 + .../cluster_lifecycle_state.go | 21 + .../containerengine/cluster_metadata.go | 48 + .../containerengine/cluster_options.go | 24 + .../containerengine/cluster_summary.go | 85 + .../containerengine/containerengine_client.go | 761 ++++ .../containerengine/create_cluster_details.go | 36 + ...eate_cluster_kubeconfig_content_details.go | 27 + .../create_cluster_request_response.go | 64 + .../create_kubeconfig_request_response.go | 65 + .../create_node_pool_details.go | 51 + .../create_node_pool_request_response.go | 64 + .../delete_cluster_request_response.go | 65 + .../delete_node_pool_request_response.go | 65 + .../delete_work_request_request_response.go | 63 + .../get_cluster_options_request_response.go | 61 + .../get_cluster_request_response.go | 64 + .../get_node_pool_options_request_response.go | 61 + .../get_node_pool_request_response.go | 64 + .../get_work_request_request_response.go | 67 + .../oci-go-sdk/containerengine/key_value.go | 27 + .../kubernetes_network_config.go | 27 + .../list_clusters_request_response.go | 163 + .../list_node_pools_request_response.go | 132 + ...st_work_request_errors_request_response.go | 64 + ...list_work_request_logs_request_response.go | 64 + .../list_work_requests_request_response.go | 198 + .../oracle/oci-go-sdk/containerengine/node.go | 81 + .../oci-go-sdk/containerengine/node_error.go | 33 + .../oci-go-sdk/containerengine/node_pool.go | 60 + .../containerengine/node_pool_options.go | 30 + .../containerengine/node_pool_summary.go | 57 + .../oci-go-sdk/containerengine/sort_order.go | 21 + .../containerengine/update_cluster_details.go | 27 + .../update_cluster_request_response.go | 68 + .../update_node_pool_details.go | 36 + .../update_node_pool_request_response.go | 68 + .../containerengine/work_request.go | 109 + .../containerengine/work_request_error.go | 30 + .../containerengine/work_request_log_entry.go | 27 + .../work_request_operation_type.go | 21 + .../containerengine/work_request_resource.go | 64 + .../containerengine/work_request_status.go | 21 + .../containerengine/work_request_summary.go | 109 + .../attach_boot_volume_request_response.go | 23 + .../core/attach_i_scsi_volume_details.go | 8 + .../attach_paravirtualized_volume_details.go | 68 + .../attach_service_id_request_response.go | 69 + .../core/attach_vnic_request_response.go | 23 + .../oci-go-sdk/core/attach_volume_details.go | 14 + .../core/attach_volume_request_response.go | 23 + .../oracle/oci-go-sdk/core/boot_volume.go | 68 +- .../oci-go-sdk/core/boot_volume_backup.go | 161 + .../core/boot_volume_source_details.go | 60 + ..._source_from_boot_volume_backup_details.go | 39 + ..._volume_source_from_boot_volume_details.go | 39 + ...ircuit_public_prefixes_request_response.go | 23 + ...ircuit_public_prefixes_request_response.go | 23 + .../core/capture_console_history_details.go | 11 + ...apture_console_history_request_response.go | 23 + ...local_peering_gateways_request_response.go | 23 + ...nect_remote_peering_connections_details.go | 28 + ...te_peering_connections_request_response.go | 61 + .../oracle/oci-go-sdk/core/console_history.go | 11 + .../core/core_blockstorage_client.go | 1275 +++++- .../oci-go-sdk/core/core_compute_client.go | 1100 ++++- .../core/core_virtualnetwork_client.go | 3693 +++++++++++++++-- .../github.com/oracle/oci-go-sdk/core/cpe.go | 11 + .../core/create_boot_volume_backup_details.go | 65 + ...ate_boot_volume_backup_request_response.go | 71 + .../core/create_boot_volume_details.go | 81 + .../create_boot_volume_request_response.go | 71 + .../oci-go-sdk/core/create_cpe_details.go | 11 + .../core/create_cpe_request_response.go | 23 + ...te_cross_connect_group_request_response.go | 23 + .../create_cross_connect_request_response.go | 23 + .../oci-go-sdk/core/create_dhcp_details.go | 25 +- .../create_dhcp_options_request_response.go | 23 + .../create_drg_attachment_request_response.go | 23 + .../oci-go-sdk/core/create_drg_details.go | 11 + .../core/create_drg_request_response.go | 23 + ...ate_i_p_sec_connection_request_response.go | 23 + .../oci-go-sdk/core/create_image_details.go | 58 +- .../core/create_image_request_response.go | 23 + ...ate_instance_console_connection_details.go | 11 + ...nce_console_connection_request_response.go | 23 + .../core/create_internet_gateway_details.go | 11 + ...reate_internet_gateway_request_response.go | 23 + .../core/create_ip_sec_connection_details.go | 11 + .../create_local_peering_gateway_details.go | 11 + ..._local_peering_gateway_request_response.go | 23 + .../core/create_private_ip_details.go | 11 + .../create_private_ip_request_response.go | 23 + .../core/create_public_ip_details.go | 76 + .../core/create_public_ip_request_response.go | 71 + ...reate_remote_peering_connection_details.go | 31 + ...ote_peering_connection_request_response.go | 71 + .../core/create_route_table_details.go | 11 + .../create_route_table_request_response.go | 23 + .../core/create_security_list_details.go | 11 + .../create_security_list_request_response.go | 23 + .../core/create_service_gateway_details.go | 45 + ...create_service_gateway_request_response.go | 68 + .../oci-go-sdk/core/create_subnet_details.go | 11 + .../core/create_subnet_request_response.go | 23 + .../oci-go-sdk/core/create_vcn_details.go | 11 + .../core/create_vcn_request_response.go | 23 + ...create_virtual_circuit_request_response.go | 23 + .../oci-go-sdk/core/create_vnic_details.go | 20 +- .../core/create_volume_backup_details.go | 37 + ...volume_backup_policy_assignment_details.go | 27 + ...ckup_policy_assignment_request_response.go | 64 + .../create_volume_backup_request_response.go | 23 + .../oci-go-sdk/core/create_volume_details.go | 37 +- .../create_volume_group_backup_details.go | 67 + ...te_volume_group_backup_request_response.go | 71 + .../core/create_volume_group_details.go | 74 + .../create_volume_group_request_response.go | 71 + .../core/create_volume_request_response.go | 23 + ...ete_boot_volume_backup_request_response.go | 63 + .../delete_boot_volume_request_response.go | 23 + ...delete_console_history_request_response.go | 23 + .../core/delete_cpe_request_response.go | 23 + ...te_cross_connect_group_request_response.go | 23 + .../delete_cross_connect_request_response.go | 23 + .../delete_dhcp_options_request_response.go | 23 + .../delete_drg_attachment_request_response.go | 23 + .../core/delete_drg_request_response.go | 23 + ...ete_i_p_sec_connection_request_response.go | 23 + .../core/delete_image_request_response.go | 23 + ...nce_console_connection_request_response.go | 23 + ...elete_internet_gateway_request_response.go | 23 + ..._local_peering_gateway_request_response.go | 23 + .../delete_private_ip_request_response.go | 25 +- .../core/delete_public_ip_request_response.go | 63 + ...ote_peering_connection_request_response.go | 63 + .../delete_route_table_request_response.go | 23 + .../delete_security_list_request_response.go | 23 + ...delete_service_gateway_request_response.go | 63 + .../core/delete_subnet_request_response.go | 23 + .../core/delete_vcn_request_response.go | 23 + ...delete_virtual_circuit_request_response.go | 23 + ...ckup_policy_assignment_request_response.go | 63 + .../delete_volume_backup_request_response.go | 23 + ...te_volume_group_backup_request_response.go | 63 + .../delete_volume_group_request_response.go | 63 + .../core/delete_volume_request_response.go | 23 + .../detach_boot_volume_request_response.go | 23 + .../detach_service_id_request_response.go | 69 + .../core/detach_vnic_request_response.go | 23 + .../core/detach_volume_request_response.go | 23 + .../oracle/oci-go-sdk/core/dhcp_options.go | 31 +- .../github.com/oracle/oci-go-sdk/core/drg.go | 11 + .../oci-go-sdk/core/egress_security_rule.go | 32 +- .../core/export_image_request_response.go | 23 + ...boot_volume_attachment_request_response.go | 23 + ...get_boot_volume_backup_request_response.go | 64 + .../core/get_boot_volume_request_response.go | 23 + ...onsole_history_content_request_response.go | 23 + .../get_console_history_request_response.go | 23 + .../core/get_cpe_request_response.go | 23 + ...et_cross_connect_group_request_response.go | 23 + ...ct_letter_of_authority_request_response.go | 23 + .../get_cross_connect_request_response.go | 23 + ...t_cross_connect_status_request_response.go | 23 + .../core/get_dhcp_options_request_response.go | 23 + .../get_drg_attachment_request_response.go | 23 + .../core/get_drg_request_response.go | 23 + ...nnect_provider_service_request_response.go | 23 + ...nnection_device_config_request_response.go | 23 + ...nnection_device_status_request_response.go | 23 + ...get_i_p_sec_connection_request_response.go | 23 + .../core/get_image_request_response.go | 23 + ...nce_console_connection_request_response.go | 23 + .../core/get_instance_request_response.go | 23 + .../get_internet_gateway_request_response.go | 23 + ..._local_peering_gateway_request_response.go | 23 + .../core/get_private_ip_request_response.go | 25 +- .../get_public_ip_by_ip_address_details.go | 25 + ...ublic_ip_by_ip_address_request_response.go | 64 + .../get_public_ip_by_private_ip_id_details.go | 24 + ...ic_ip_by_private_ip_id_request_response.go | 64 + .../core/get_public_ip_request_response.go | 64 + ...ote_peering_connection_request_response.go | 64 + .../core/get_route_table_request_response.go | 23 + .../get_security_list_request_response.go | 23 + .../get_service_gateway_request_response.go | 64 + .../core/get_service_request_response.go | 64 + .../core/get_subnet_request_response.go | 23 + .../core/get_vcn_request_response.go | 23 + .../get_virtual_circuit_request_response.go | 23 + .../get_vnic_attachment_request_response.go | 23 + .../core/get_vnic_request_response.go | 23 + .../get_volume_attachment_request_response.go | 23 + ...olicy_asset_assignment_request_response.go | 73 + ...ckup_policy_assignment_request_response.go | 64 + ...t_volume_backup_policy_request_response.go | 64 + .../get_volume_backup_request_response.go | 23 + ...et_volume_group_backup_request_response.go | 64 + .../core/get_volume_group_request_response.go | 64 + .../core/get_volume_request_response.go | 23 + ...ce_initial_credentials_request_response.go | 23 + .../core/i_scsi_volume_attachment.go | 8 + .../oracle/oci-go-sdk/core/image.go | 48 + .../oci-go-sdk/core/image_source_details.go | 38 +- ...source_via_object_storage_tuple_details.go | 9 + ...e_source_via_object_storage_uri_details.go | 9 + .../oci-go-sdk/core/ingress_security_rule.go | 34 +- .../oracle/oci-go-sdk/core/instance.go | 80 +- .../core/instance_action_request_response.go | 25 + .../core/instance_console_connection.go | 15 + .../core/instance_source_via_image_details.go | 3 + .../oci-go-sdk/core/internet_gateway.go | 11 + .../oci-go-sdk/core/ip_sec_connection.go | 11 + .../core/launch_instance_details.go | 46 +- .../core/launch_instance_request_response.go | 23 + .../oracle/oci-go-sdk/core/launch_options.go | 157 + ...ons_for_remote_peering_request_response.go | 58 + ...oot_volume_attachments_request_response.go | 25 +- ...st_boot_volume_backups_request_response.go | 141 + .../list_boot_volumes_request_response.go | 28 +- ...list_console_histories_request_response.go | 25 +- .../core/list_cpes_request_response.go | 25 +- ...t_cross_connect_groups_request_response.go | 25 +- ...ross_connect_locations_request_response.go | 25 +- .../list_cross_connects_request_response.go | 25 +- ...nect_port_speed_shapes_request_response.go | 25 +- .../list_dhcp_options_request_response.go | 25 +- .../list_drg_attachments_request_response.go | 25 +- .../core/list_drgs_request_response.go | 25 +- ...nect_provider_services_request_response.go | 25 +- ...rcuit_bandwidth_shapes_request_response.go | 25 +- ...st_i_p_sec_connections_request_response.go | 25 +- .../core/list_images_request_response.go | 28 +- ...ce_console_connections_request_response.go | 25 +- .../core/list_instances_request_response.go | 25 +- ...list_internet_gateways_request_response.go | 25 +- ...local_peering_gateways_request_response.go | 25 +- .../core/list_private_ips_request_response.go | 27 +- .../core/list_public_ips_request_response.go | 108 + ...te_peering_connections_request_response.go | 74 + .../list_route_tables_request_response.go | 25 +- .../list_security_lists_request_response.go | 25 +- .../list_service_gateways_request_response.go | 138 + .../core/list_services_request_response.go | 70 + .../core/list_shapes_request_response.go | 25 +- .../core/list_subnets_request_response.go | 25 +- .../core/list_vcns_request_response.go | 25 +- ...rcuit_bandwidth_shapes_request_response.go | 25 +- ...ircuit_public_prefixes_request_response.go | 23 + .../list_virtual_circuits_request_response.go | 25 +- .../list_vnic_attachments_request_response.go | 25 +- ...ist_volume_attachments_request_response.go | 25 +- ...volume_backup_policies_request_response.go | 70 + .../list_volume_backups_request_response.go | 25 +- ...t_volume_group_backups_request_response.go | 138 + .../list_volume_groups_request_response.go | 142 + .../core/list_volumes_request_response.go | 28 +- .../oci-go-sdk/core/local_peering_gateway.go | 11 + .../core/paravirtualized_volume_attachment.go | 112 + .../core/peer_region_for_remote_peering.go | 25 + .../oracle/oci-go-sdk/core/private_ip.go | 11 + .../oracle/oci-go-sdk/core/public_ip.go | 171 + .../core/remote_peering_connection.go | 123 + .../oracle/oci-go-sdk/core/route_rule.go | 35 + .../oracle/oci-go-sdk/core/route_table.go | 11 + .../oracle/oci-go-sdk/core/security_list.go | 11 + .../oracle/oci-go-sdk/core/service.go | 35 + .../oracle/oci-go-sdk/core/service_gateway.go | 97 + .../core/service_id_request_details.go | 24 + .../core/service_id_response_details.go | 27 + .../oracle/oci-go-sdk/core/subnet.go | 11 + .../terminate_instance_request_response.go | 23 + .../core/update_boot_volume_backup_details.go | 36 + ...ate_boot_volume_backup_request_response.go | 68 + .../core/update_boot_volume_details.go | 11 + .../update_boot_volume_request_response.go | 23 + .../core/update_console_history_details.go | 11 + ...update_console_history_request_response.go | 23 + .../oci-go-sdk/core/update_cpe_details.go | 11 + .../core/update_cpe_request_response.go | 23 + ...te_cross_connect_group_request_response.go | 23 + .../update_cross_connect_request_response.go | 23 + .../oci-go-sdk/core/update_dhcp_details.go | 21 +- .../update_dhcp_options_request_response.go | 23 + .../update_drg_attachment_request_response.go | 23 + .../oci-go-sdk/core/update_drg_details.go | 11 + .../core/update_drg_request_response.go | 23 + ...ate_i_p_sec_connection_request_response.go | 23 + .../oci-go-sdk/core/update_image_details.go | 11 + .../core/update_image_request_response.go | 23 + .../core/update_instance_details.go | 11 + .../core/update_instance_request_response.go | 23 + .../core/update_internet_gateway_details.go | 11 + ...pdate_internet_gateway_request_response.go | 23 + .../core/update_ip_sec_connection_details.go | 11 + .../update_local_peering_gateway_details.go | 11 + ..._local_peering_gateway_request_response.go | 23 + .../core/update_private_ip_details.go | 11 + .../update_private_ip_request_response.go | 25 +- .../core/update_public_ip_details.go | 43 + .../core/update_public_ip_request_response.go | 72 + ...pdate_remote_peering_connection_details.go | 25 + ...ote_peering_connection_request_response.go | 72 + .../core/update_route_table_details.go | 11 + .../update_route_table_request_response.go | 23 + .../core/update_security_list_details.go | 11 + .../update_security_list_request_response.go | 23 + .../core/update_service_gateway_details.go | 49 + ...update_service_gateway_request_response.go | 72 + .../oci-go-sdk/core/update_subnet_details.go | 11 + .../core/update_subnet_request_response.go | 23 + .../oci-go-sdk/core/update_vcn_details.go | 11 + .../core/update_vcn_request_response.go | 23 + ...update_virtual_circuit_request_response.go | 23 + .../oci-go-sdk/core/update_vnic_details.go | 11 + .../core/update_vnic_request_response.go | 23 + .../core/update_volume_backup_details.go | 11 + .../update_volume_backup_request_response.go | 23 + .../oci-go-sdk/core/update_volume_details.go | 11 + .../update_volume_group_backup_details.go | 35 + ...te_volume_group_backup_request_response.go | 68 + .../core/update_volume_group_details.go | 38 + .../update_volume_group_request_response.go | 72 + .../core/update_volume_request_response.go | 23 + .../github.com/oracle/oci-go-sdk/core/vcn.go | 11 + .../github.com/oracle/oci-go-sdk/core/vnic.go | 11 + .../oracle/oci-go-sdk/core/volume.go | 42 +- .../oci-go-sdk/core/volume_attachment.go | 14 + .../oracle/oci-go-sdk/core/volume_backup.go | 70 + .../oci-go-sdk/core/volume_backup_policy.go | 34 + .../core/volume_backup_policy_assignment.go | 33 + .../oci-go-sdk/core/volume_backup_schedule.go | 85 + .../oracle/oci-go-sdk/core/volume_group.go | 136 + .../oci-go-sdk/core/volume_group_backup.go | 136 + .../core/volume_group_source_details.go | 64 + ...source_from_volume_group_backup_details.go | 39 + ..._group_source_from_volume_group_details.go | 39 + ...olume_group_source_from_volumes_details.go | 39 + .../oracle/oci-go-sdk/database/backup.go | 6 + .../oci-go-sdk/database/backup_summary.go | 6 + .../create_backup_request_response.go | 23 + ...data_guard_association_request_response.go | 23 + .../database/create_database_details.go | 10 + .../create_db_home_from_backup_details.go | 25 + .../create_db_home_request_response.go | 23 + .../oracle/oci-go-sdk/database/database.go | 10 + .../oci-go-sdk/database/database_client.go | 1095 ++++- .../oci-go-sdk/database/database_summary.go | 10 + .../db_node_action_request_response.go | 23 + .../oracle/oci-go-sdk/database/db_system.go | 12 +- .../database/db_system_shape_summary.go | 14 +- .../oci-go-sdk/database/db_system_summary.go | 12 +- .../delete_backup_request_response.go | 23 + .../delete_db_home_request_response.go | 23 + ...data_guard_association_request_response.go | 23 + .../database/get_backup_request_response.go | 23 + ...data_guard_association_request_response.go | 23 + .../database/get_database_request_response.go | 23 + ...me_patch_history_entry_request_response.go | 23 + .../get_db_home_patch_request_response.go | 23 + .../database/get_db_home_request_response.go | 23 + .../database/get_db_node_request_response.go | 23 + ...em_patch_history_entry_request_response.go | 23 + .../get_db_system_patch_request_response.go | 23 + .../get_db_system_request_response.go | 23 + .../database/launch_db_system_base.go | 245 ++ .../database/launch_db_system_details.go | 131 +- .../launch_db_system_from_backup_details.go | 276 ++ .../launch_db_system_request_response.go | 25 +- .../database/list_backups_request_response.go | 25 +- ...ata_guard_associations_request_response.go | 25 +- .../list_databases_request_response.go | 25 +- ..._patch_history_entries_request_response.go | 25 +- .../list_db_home_patches_request_response.go | 25 +- .../list_db_homes_request_response.go | 25 +- .../list_db_nodes_request_response.go | 25 +- ..._patch_history_entries_request_response.go | 25 +- ...list_db_system_patches_request_response.go | 25 +- .../list_db_system_shapes_request_response.go | 25 +- .../list_db_systems_request_response.go | 28 +- .../list_db_versions_request_response.go | 28 +- ...data_guard_association_request_response.go | 23 + .../restore_database_request_response.go | 23 + ...data_guard_association_request_response.go | 23 + .../terminate_db_system_request_response.go | 23 + .../database/update_database_details.go | 10 + .../update_database_request_response.go | 23 + .../update_db_home_request_response.go | 23 + .../database/update_db_system_details.go | 10 + .../update_db_system_request_response.go | 23 + .../oci-go-sdk/dns/create_zone_details.go | 56 + .../dns/create_zone_request_response.go | 69 + .../delete_domain_records_request_response.go | 79 + .../dns/delete_r_r_set_request_response.go | 82 + .../dns/delete_zone_request_response.go | 76 + .../oracle/oci-go-sdk/dns/dns_client.go | 707 ++++ .../oracle/oci-go-sdk/dns/external_master.go | 29 + .../get_domain_records_request_response.go | 159 + .../dns/get_r_r_set_request_response.go | 106 + .../dns/get_zone_records_request_response.go | 166 + .../dns/get_zone_request_response.go | 81 + .../dns/list_zones_request_response.go | 206 + .../dns/patch_domain_records_details.go | 22 + .../patch_domain_records_request_response.go | 99 + .../dns/patch_r_r_set_request_response.go | 102 + .../oci-go-sdk/dns/patch_rr_set_details.go | 22 + .../dns/patch_zone_records_details.go | 22 + .../patch_zone_records_request_response.go | 96 + .../oracle/oci-go-sdk/dns/record.go | 46 + .../oci-go-sdk/dns/record_collection.go | 22 + .../oracle/oci-go-sdk/dns/record_details.go | 46 + .../oracle/oci-go-sdk/dns/record_operation.go | 89 + .../oracle/oci-go-sdk/dns/rr_set.go | 23 + .../oracle/oci-go-sdk/dns/sort_order.go | 21 + .../github.com/oracle/oci-go-sdk/dns/tsig.go | 32 + .../dns/update_domain_records_details.go | 22 + .../update_domain_records_request_response.go | 99 + .../dns/update_r_r_set_request_response.go | 102 + .../oci-go-sdk/dns/update_rr_set_details.go | 22 + .../oci-go-sdk/dns/update_zone_details.go | 24 + .../dns/update_zone_records_details.go | 22 + .../update_zone_records_request_response.go | 96 + .../dns/update_zone_request_response.go | 86 + .../github.com/oracle/oci-go-sdk/dns/zone.go | 107 + .../oracle/oci-go-sdk/dns/zone_summary.go | 72 + .../oci-go-sdk/email/create_sender_details.go | 27 + .../email/create_sender_request_response.go | 62 + .../email/create_suppression_details.go | 29 + .../create_suppression_request_response.go | 60 + .../email/delete_sender_request_response.go | 59 + .../delete_suppression_request_response.go | 59 + .../oracle/oci-go-sdk/email/email_client.go | 376 ++ .../email/get_sender_request_response.go | 62 + .../email/get_suppression_request_response.go | 60 + .../email/list_senders_request_response.go | 140 + .../list_suppressions_request_response.go | 151 + .../oracle/oci-go-sdk/email/sender.go | 65 + .../oracle/oci-go-sdk/email/sender_summary.go | 61 + .../oracle/oci-go-sdk/email/suppression.go | 65 + .../oci-go-sdk/email/suppression_summary.go | 66 + .../oracle/oci-go-sdk/example/helpers/args.go | 9 +- .../oci-go-sdk/example/helpers/helper.go | 46 +- .../filestorage/create_export_details.go | 32 + .../create_export_request_response.go | 72 + .../filestorage/create_file_system_details.go | 33 + .../create_file_system_request_response.go | 72 + .../create_mount_target_details.go | 54 + .../create_mount_target_request_response.go | 72 + .../filestorage/create_snapshot_details.go | 31 + .../create_snapshot_request_response.go | 72 + .../delete_export_request_response.go | 66 + .../delete_file_system_request_response.go | 66 + .../delete_mount_target_request_response.go | 66 + .../delete_snapshot_request_response.go | 66 + .../oracle/oci-go-sdk/filestorage/export.go | 92 + .../oci-go-sdk/filestorage/export_set.go | 98 + .../filestorage/export_set_summary.go | 75 + .../oci-go-sdk/filestorage/export_summary.go | 70 + .../oci-go-sdk/filestorage/file_system.go | 86 + .../filestorage/file_system_summary.go | 78 + .../filestorage/filestorage_client.go | 934 +++++ .../get_export_request_response.go | 65 + .../get_export_set_request_response.go | 65 + .../get_file_system_request_response.go | 65 + .../get_mount_target_request_response.go | 65 + .../get_snapshot_request_response.go | 65 + .../list_export_sets_request_response.go | 177 + .../list_exports_request_response.go | 175 + .../list_file_systems_request_response.go | 177 + .../list_mount_targets_request_response.go | 180 + .../list_snapshots_request_response.go | 140 + .../oci-go-sdk/filestorage/mount_target.go | 90 + .../filestorage/mount_target_summary.go | 85 + .../oracle/oci-go-sdk/filestorage/snapshot.go | 68 + .../filestorage/snapshot_summary.go | 68 + .../filestorage/update_export_set_details.go | 48 + .../update_export_set_request_response.go | 75 + .../filestorage/update_file_system_details.go | 26 + .../update_file_system_request_response.go | 75 + .../update_mount_target_details.go | 26 + .../update_mount_target_request_response.go | 75 + .../add_user_to_group_request_response.go | 23 + .../oracle/oci-go-sdk/identity/auth_token.go | 85 + .../oracle/oci-go-sdk/identity/compartment.go | 13 +- .../identity/create_auth_token_details.go | 24 + .../create_auth_token_request_response.go | 74 + .../identity/create_compartment_details.go | 12 +- .../create_compartment_request_response.go | 23 + ...te_customer_secret_key_request_response.go | 23 + .../identity/create_dynamic_group_details.go | 35 + .../create_dynamic_group_request_response.go | 71 + .../identity/create_group_details.go | 10 + .../identity/create_group_request_response.go | 23 + .../create_identity_provider_details.go | 24 + ...eate_identity_provider_request_response.go | 23 + ...eate_idp_group_mapping_request_response.go | 23 + ..._or_reset_u_i_password_request_response.go | 23 + .../identity/create_policy_details.go | 10 + .../create_policy_request_response.go | 23 + .../create_region_subscription_details.go | 1 + ...te_region_subscription_request_response.go | 23 + .../create_saml2_identity_provider_details.go | 20 + .../create_smtp_credential_details.go | 24 + ...create_smtp_credential_request_response.go | 74 + .../create_swift_password_request_response.go | 23 + .../oci-go-sdk/identity/create_tag_details.go | 37 + .../identity/create_tag_namespace_details.go | 40 + .../create_tag_namespace_request_response.go | 68 + .../identity/create_tag_request_response.go | 71 + .../identity/create_user_details.go | 10 + .../identity/create_user_request_response.go | 23 + .../delete_api_key_request_response.go | 23 + .../delete_auth_token_request_response.go | 66 + ...te_customer_secret_key_request_response.go | 23 + .../delete_dynamic_group_request_response.go | 63 + .../identity/delete_group_request_response.go | 23 + ...lete_identity_provider_request_response.go | 23 + ...lete_idp_group_mapping_request_response.go | 23 + .../delete_policy_request_response.go | 23 + ...delete_smtp_credential_request_response.go | 66 + .../delete_swift_password_request_response.go | 23 + .../identity/delete_user_request_response.go | 23 + .../oci-go-sdk/identity/dynamic_group.go | 85 + .../oci-go-sdk/identity/fault_domain.go | 32 - .../get_compartment_request_response.go | 23 + .../get_dynamic_group_request_response.go | 64 + .../identity/get_group_request_response.go | 23 + .../get_identity_provider_request_response.go | 23 + .../get_idp_group_mapping_request_response.go | 23 + .../identity/get_policy_request_response.go | 23 + .../get_tag_namespace_request_response.go | 61 + .../identity/get_tag_request_response.go | 64 + .../identity/get_tenancy_request_response.go | 23 + ..._user_group_membership_request_response.go | 23 + .../identity/get_user_request_response.go | 23 + .../oracle/oci-go-sdk/identity/group.go | 10 + .../oci-go-sdk/identity/identity_client.go | 2397 +++++++++-- .../oci-go-sdk/identity/identity_provider.go | 24 + .../list_api_keys_request_response.go | 23 + .../list_auth_tokens_request_response.go | 66 + ...t_availability_domains_request_response.go | 23 + .../list_compartments_request_response.go | 25 +- ...t_customer_secret_keys_request_response.go | 23 + .../list_dynamic_groups_request_response.go | 72 + .../list_fault_domains_request_response.go | 41 - .../identity/list_groups_request_response.go | 25 +- ...ist_identity_providers_request_response.go | 25 +- ...ist_idp_group_mappings_request_response.go | 25 +- .../list_policies_request_response.go | 25 +- ...t_region_subscriptions_request_response.go | 23 + .../identity/list_regions_request_response.go | 23 + .../list_smtp_credentials_request_response.go | 66 + .../list_swift_passwords_request_response.go | 23 + .../list_tag_namespaces_request_response.go | 76 + .../identity/list_tags_request_response.go | 72 + ...user_group_memberships_request_response.go | 25 +- .../identity/list_users_request_response.go | 25 +- .../oracle/oci-go-sdk/identity/policy.go | 10 + .../oracle/oci-go-sdk/identity/region.go | 2 + .../identity/region_subscription.go | 2 + ...remove_user_from_group_request_response.go | 23 + .../identity/saml2_identity_provider.go | 20 + .../oci-go-sdk/identity/smtp_credential.go | 86 + .../identity/smtp_credential_summary.go | 80 + .../oci-go-sdk/identity/swift_password.go | 5 +- .../oracle/oci-go-sdk/identity/tag.go | 59 + .../oci-go-sdk/identity/tag_namespace.go | 52 + .../identity/tag_namespace_summary.go | 51 + .../oracle/oci-go-sdk/identity/tag_summary.go | 51 + .../oracle/oci-go-sdk/identity/tenancy.go | 14 +- .../identity/update_auth_token_details.go | 24 + .../update_auth_token_request_response.go | 75 + .../identity/update_compartment_details.go | 11 + .../update_compartment_request_response.go | 23 + ...te_customer_secret_key_request_response.go | 23 + .../identity/update_dynamic_group_details.go | 28 + .../update_dynamic_group_request_response.go | 72 + .../identity/update_group_details.go | 10 + .../identity/update_group_request_response.go | 23 + .../update_identity_provider_details.go | 30 +- ...date_identity_provider_request_response.go | 23 + ...date_idp_group_mapping_request_response.go | 23 + .../identity/update_policy_details.go | 10 + .../update_policy_request_response.go | 23 + .../update_saml2_identity_provider_details.go | 20 + .../update_smtp_credential_details.go | 24 + ...update_smtp_credential_request_response.go | 75 + .../update_swift_password_request_response.go | 23 + .../oci-go-sdk/identity/update_tag_details.go | 38 + .../identity/update_tag_namespace_details.go | 38 + .../update_tag_namespace_request_response.go | 64 + .../identity/update_tag_request_response.go | 67 + .../identity/update_user_details.go | 10 + .../identity/update_user_request_response.go | 23 + .../update_user_state_request_response.go | 23 + .../upload_api_key_request_response.go | 23 + .../oracle/oci-go-sdk/identity/user.go | 13 +- .../oracle/oci-go-sdk/loadbalancer/backend.go | 10 +- .../loadbalancer/backend_details.go | 8 +- .../oci-go-sdk/loadbalancer/backend_set.go | 2 +- .../loadbalancer/backend_set_health.go | 8 +- .../oci-go-sdk/loadbalancer/certificate.go | 4 +- .../loadbalancer/certificate_details.go | 5 +- .../loadbalancer/connection_configuration.go | 28 + .../loadbalancer/create_backend_details.go | 8 +- .../create_backend_request_response.go | 21 +- .../create_backend_set_details.go | 2 +- .../create_backend_set_request_response.go | 19 + .../create_certificate_details.go | 11 +- .../create_certificate_request_response.go | 23 +- .../loadbalancer/create_hostname_details.go | 31 + .../create_hostname_request_response.go | 71 + .../loadbalancer/create_listener_details.go | 15 +- .../create_listener_request_response.go | 19 + .../create_load_balancer_details.go | 8 +- .../create_load_balancer_request_response.go | 19 + .../create_path_route_set_details.go | 29 + .../create_path_route_set_request_response.go | 71 + .../delete_backend_request_response.go | 23 +- .../delete_backend_set_request_response.go | 21 +- .../delete_certificate_request_response.go | 26 +- .../delete_hostname_request_response.go | 65 + .../delete_listener_request_response.go | 21 +- .../delete_load_balancer_request_response.go | 19 + .../delete_path_route_set_request_response.go | 65 + .../get_backend_health_request_response.go | 23 +- .../get_backend_request_response.go | 23 +- ...get_backend_set_health_request_response.go | 21 +- .../get_backend_set_request_response.go | 21 +- .../get_health_checker_request_response.go | 21 +- .../get_hostname_request_response.go | 65 + ...t_load_balancer_health_request_response.go | 19 + .../get_load_balancer_request_response.go | 19 + .../get_path_route_set_request_response.go | 65 + .../get_work_request_request_response.go | 19 + .../loadbalancer/health_check_result.go | 4 +- .../oci-go-sdk/loadbalancer/health_checker.go | 6 +- .../loadbalancer/health_checker_details.go | 6 +- .../oci-go-sdk/loadbalancer/hostname.go | 31 + .../loadbalancer/hostname_details.go | 30 + .../oci-go-sdk/loadbalancer/ip_address.go | 2 +- .../list_backend_sets_request_response.go | 19 + .../list_backends_request_response.go | 21 +- .../list_certificates_request_response.go | 22 +- .../list_hostnames_request_response.go | 62 + ..._load_balancer_healths_request_response.go | 21 +- .../list_load_balancers_request_response.go | 32 +- .../list_path_route_sets_request_response.go | 62 + .../list_policies_request_response.go | 21 +- .../list_protocols_request_response.go | 21 +- .../list_shapes_request_response.go | 21 +- .../list_work_requests_request_response.go | 21 +- .../oci-go-sdk/loadbalancer/listener.go | 15 +- .../loadbalancer/listener_details.go | 11 + .../oci-go-sdk/loadbalancer/load_balancer.go | 7 +- .../loadbalancer/load_balancer_health.go | 6 +- .../loadbalancer/load_balancer_policy.go | 3 +- .../loadbalancer/load_balancer_protocol.go | 5 +- .../loadbalancer/load_balancer_shape.go | 1 + .../loadbalancer/loadbalancer_client.go | 1357 +++++- .../loadbalancer/path_match_type.go | 59 + .../oci-go-sdk/loadbalancer/path_route.go | 36 + .../oci-go-sdk/loadbalancer/path_route_set.go | 29 + .../loadbalancer/path_route_set_details.go | 24 + ...ssion_persistence_configuration_details.go | 4 +- .../loadbalancer/ssl_configuration.go | 2 +- .../loadbalancer/ssl_configuration_details.go | 2 +- .../loadbalancer/update_backend_details.go | 6 +- .../update_backend_request_response.go | 23 +- .../update_backend_set_request_response.go | 21 +- .../update_health_checker_details.go | 6 +- .../update_health_checker_request_response.go | 21 +- .../loadbalancer/update_hostname_details.go | 28 + .../update_hostname_request_response.go | 69 + .../loadbalancer/update_listener_details.go | 11 + .../update_listener_request_response.go | 21 +- .../update_load_balancer_details.go | 2 +- .../update_load_balancer_request_response.go | 19 + .../update_path_route_set_details.go | 24 + .../update_path_route_set_request_response.go | 75 + .../oci-go-sdk/loadbalancer/work_request.go | 1 + ...abort_multipart_upload_request_response.go | 25 +- .../oracle/oci-go-sdk/objectstorage/bucket.go | 70 +- .../objectstorage/bucket_summary.go | 17 +- .../commit_multipart_upload_details.go | 2 +- .../commit_multipart_upload_part_details.go | 2 +- ...ommit_multipart_upload_request_response.go | 31 +- .../objectstorage/create_bucket_details.go | 63 +- .../create_bucket_request_response.go | 21 +- .../create_multipart_upload_details.go | 13 +- ...reate_multipart_upload_request_response.go | 26 +- ...create_preauthenticated_request_details.go | 11 +- ...eauthenticated_request_request_response.go | 25 +- .../delete_bucket_request_response.go | 23 +- .../delete_object_request_response.go | 25 +- ...eauthenticated_request_request_response.go | 27 +- .../get_bucket_request_response.go | 26 +- ...get_namespace_metadata_request_response.go | 63 + .../get_namespace_request_response.go | 19 + .../get_object_request_response.go | 63 +- ...eauthenticated_request_request_response.go | 27 +- .../head_bucket_request_response.go | 26 +- .../head_object_request_response.go | 61 +- .../list_buckets_request_response.go | 51 +- ...multipart_upload_parts_request_response.go | 27 +- ...list_multipart_uploads_request_response.go | 28 +- .../oci-go-sdk/objectstorage/list_objects.go | 5 +- .../list_objects_request_response.go | 31 +- ...authenticated_requests_request_response.go | 27 +- .../objectstorage/multipart_upload.go | 11 +- .../multipart_upload_part_summary.go | 17 +- .../objectstorage/namespace_metadata.go | 30 + .../objectstorage/object_summary.go | 7 +- .../objectstorage/objectstorage_client.go | 916 +++- .../objectstorage/preauthenticated_request.go | 27 +- .../preauthenticated_request_summary.go | 18 +- .../put_object_request_response.go | 28 +- .../objectstorage/rename_object_details.go | 38 + .../rename_object_request_response.go | 73 + .../objectstorage/restore_objects_details.go | 28 + .../restore_objects_request_response.go | 67 + .../objectstorage/update_bucket_details.go | 36 +- .../update_bucket_request_response.go | 23 +- .../update_namespace_metadata_details.go | 28 + ...ate_namespace_metadata_request_response.go | 66 + .../upload_part_request_response.go | 28 +- vendor/github.com/oracle/oci-go-sdk/oci.go | 34 +- vendor/vendor.json | 10 +- 754 files changed, 41830 insertions(+), 1878 deletions(-) create mode 100644 vendor/github.com/oracle/oci-go-sdk/common/retry.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/attach_paravirtualized_volume_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/attach_service_id_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/boot_volume_backup.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/delete_public_ip_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/delete_remote_peering_connection_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/delete_service_gateway_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_policy_assignment_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/detach_service_id_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_remote_peering_connection_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_service_gateway_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_service_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_asset_assignment_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_assignment_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/launch_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_allowed_peer_regions_for_remote_peering_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_backups_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_public_ips_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_remote_peering_connections_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_service_gateways_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_services_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_volume_backup_policies_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_volume_group_backups_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/list_volume_groups_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/paravirtualized_volume_attachment.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/peer_region_for_remote_peering.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/public_ip.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/remote_peering_connection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/service.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/service_gateway.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/service_id_request_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/service_id_response_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy_assignment.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_backup_schedule.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_group.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_group_backup.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volumes_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/external_master.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/tsig.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/zone.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/email_client.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/sender.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/suppression.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/fault_domain.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_fault_domains_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go diff --git a/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md b/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md index e1a29e257..5818eef9b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md +++ b/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md @@ -4,6 +4,108 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 1.8.0 - 2018-06-28 +### Added +- Support for service gateway management in the Networking service +- Support for backup and clone of boot volumes in the Block Storage service + +## 1.7.0 - 2018-06-14 +### Added +- Support for the Container Engine service. A sample showing how to use this service from the SDK is available [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_containerengine_test.go) + +### Fixed +- Empty string was send to backend service for optional enum if it's not set + +## 1.6.0 - 2018-05-31 +### Added +- Support for the "soft shutdown" instance action in the Compute service +- Support for Auth Token management in the Identity service +- Support for backup or clone of multiple volumes at once using volume groups in the Block Storage service +- Support for launching a database system from a backup in the Database service + +### Breaking changes +- ``LaunchDbSystemDetails`` is renamed to ``LaunchDbSystemBase`` and the type changed from struct to interface in ``LaunchDbSystemRequest``. Here is sample code that shows how to update your code to incorporate this change. + + - Before + + ```golang + // create a LaunchDbSystemRequest + // There were two ways to initialize the LaunchDbSystemRequest struct. + // This breaking change only impact option #2 + request := database.LaunchDbSystemRequest{} + + // #1. explicity create LaunchDbSystemDetails struct (No impact) + details := database.LaunchDbSystemDetails{} + details.AvailabilityDomain = common.String(validAD()) + details.CompartmentId = common.String(getCompartmentID()) + // ... other properties + request.LaunchDbSystemDetails = details + + // #2. use anonymous fields (Will break) + request.AvailabilityDomain = common.String(validAD()) + request.CompartmentId = common.String(getCompartmentID()) + // ... + ``` + + - After + + ```golang + // create a LaunchDbSystemRequest + request := database.LaunchDbSystemRequest{} + details := database.LaunchDbSystemDetails{} + details.AvailabilityDomain = common.String(validAD()) + details.CompartmentId = common.String(getCompartmentID()) + // ... other properties + + // set the details to LaunchDbSystemBase + request.LaunchDbSystemBase = details + // ... + ``` + +## 1.5.0 - 2018-05-17 +### Added +- ~~Support for backup or clone of multiple volumes at once using volume groups in the Block Storage service~~ +- Support for the ability to optionally specify a compartment filter when listing exports in the File Storage service +- Support for tagging virtual cloud network resources in the Networking service +- Support for specifying the PARAVIRTUALIZED remote volume type when creating a virtual image or launching a new instance in the Compute service +- Support for tilde in private key path in configuration files + +## 1.4.0 - 2018-05-03 +### Added +- Support for ``event_name`` in Audit Service +- Support for multiple ``hostnames`` for loadbalancer listener in LoadBalance service +- Support for auto-generating opc-request-id for all operations +- Add opc-request-id property for all requests except for Object Storage which use opc-client-request-id + +## 1.3.0 - 2018-04-19 +### Added +- Support for retry on OCI service APIs. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_retry_test.go) +- Support for tagging DbSystem and Database resources in the Database Service +- Support for filtering by DbSystemId in ListDbVersions operation in Database Service + +### Fixed +- Fixed a request signing bug for PatchZoneRecords API +- Fixed a bug in DebugLn + +## 1.2.0 - 2018-04-05 +### Added +- Support for Email Delivery Service. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_email_test.go) +- Support for paravirtualized volume attachments in Core Services +- Support for remote VCN peering across regions +- Support for variable size boot volumes in Core Services +- Support for SMTP credentials in the Identity Service +- Support for tagging Bucket resources in the Object Storage Service + +## 1.1.0 - 2018-03-27 +### Added +- Support for DNS service +- Support for File Storage service +- Support for PathRouteSets and Listeners in Load Balancing service +- Support for Public IPs in Core Services +- Support for Dynamic Groups in Identity service +- Support for tagging in Core Services and Identity service. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_tagging_test.go) +- Fix ComposingConfigurationProvider to not accept a nil ConfigurationProvider +- Support for passphrase configuration to FileConfiguration provider ## 1.0.0 - 2018-02-28 Initial Release ### Added @@ -12,4 +114,4 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) - Support for Database service - Support for IAM service - Support for Load Balancing service -- Suport for Object Storage service +- Support for Object Storage service diff --git a/vendor/github.com/oracle/oci-go-sdk/Makefile b/vendor/github.com/oracle/oci-go-sdk/Makefile index d69dfd999..b717249de 100644 --- a/vendor/github.com/oracle/oci-go-sdk/Makefile +++ b/vendor/github.com/oracle/oci-go-sdk/Makefile @@ -1,6 +1,6 @@ DOC_SERVER_URL=https:\/\/docs.us-phoenix-1.oraclecloud.com -GEN_TARGETS = identity core objectstorage loadbalancer database audit +GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine NON_GEN_TARGETS = common common/auth TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS) @@ -45,6 +45,13 @@ $(TARGETS_CLEAN): clean-%:% @echo "cleaning $<" @-rm -rf $< +# clean all generated code under GEN_TARGETS folder +clean-generate: + for target in ${GEN_TARGETS}; do \ + echo "cleaning $$target"; \ + rm -rf $$target; \ + done + pre-doc: @echo "Rendering doc server to ${DOC_SERVER_URL}" find . -name \*.go |xargs sed -i '' 's/{{DOC_SERVER_URL}}/${DOC_SERVER_URL}/g' diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go b/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go index ce0ad0c55..e9c07f183 100644 --- a/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go @@ -48,8 +48,8 @@ func (client *AuditClient) setConfigurationProvider(configProvider common.Config // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -60,54 +60,117 @@ func (client *AuditClient) ConfigurationProvider() *common.ConfigurationProvider // GetConfiguration Get the configuration func (client AuditClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/configuration", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getConfiguration, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConfigurationResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getConfiguration implements the OCIOperation interface (enables retrying operations) +func (client AuditClient) getConfiguration(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/configuration") + if err != nil { + return nil, err + } + + var response GetConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListEvents Returns all audit events for the specified compartment that were processed within the specified time range. func (client AuditClient) ListEvents(ctx context.Context, request ListEventsRequest) (response ListEventsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/auditEvents", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listEvents, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListEventsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListEventsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listEvents implements the OCIOperation interface (enables retrying operations) +func (client AuditClient) listEvents(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/auditEvents") + if err != nil { + return nil, err + } + + var response ListEventsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateConfiguration Update the configuration func (client AuditClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/configuration", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateConfiguration, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateConfigurationResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateConfiguration implements the OCIOperation interface (enables retrying operations) +func (client AuditClient) updateConfiguration(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/configuration") + if err != nil { + return nil, err + } + + var response UpdateConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go b/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go index bc0012c6d..2887502ce 100644 --- a/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go +++ b/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go @@ -24,6 +24,10 @@ type AuditEvent struct { // The GUID of the event. EventId *string `mandatory:"false" json:"eventId"` + // The name of the event. + // Example: `LaunchInstance` + EventName *string `mandatory:"false" json:"eventName"` + // The source of the event. EventSource *string `mandatory:"false" json:"eventSource"` diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go index 684d790b0..b6afa90f7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go @@ -13,12 +13,30 @@ type GetConfigurationRequest struct { // ID of the root compartment (tenancy) CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetConfigurationRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetConfigurationRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetConfigurationResponse wrapper for the GetConfiguration operation type GetConfigurationResponse struct { @@ -32,3 +50,8 @@ type GetConfigurationResponse struct { func (response GetConfigurationResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go index e8c6b8d6b..568e935e0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go @@ -30,19 +30,33 @@ type ListEventsRequest struct { // Unique Oracle-assigned identifier for the request. // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListEventsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListEventsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListEventsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListEventsResponse wrapper for the ListEvents operation type ListEventsResponse struct { // The underlying http response RawResponse *http.Response - // The []AuditEvent instance + // A list of []AuditEvent instances Items []AuditEvent `presentIn:"body"` // For pagination of a list of audit events. When this header appears in the response, @@ -58,3 +72,8 @@ type ListEventsResponse struct { func (response ListEventsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListEventsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go index 2d709a8a8..d6d9ed1ea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go @@ -16,12 +16,30 @@ type UpdateConfigurationRequest struct { // The configuration properties UpdateConfigurationDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateConfigurationRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateConfigurationRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateConfigurationResponse wrapper for the UpdateConfiguration operation type UpdateConfigurationResponse struct { @@ -39,3 +57,8 @@ type UpdateConfigurationResponse struct { func (response UpdateConfigurationResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go b/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go index 5c684fd5e..f9fc03c9f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go +++ b/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go @@ -1,6 +1,5 @@ package main - const versionTemplate = ` // Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. // Code generated by go generate; DO NOT EDIT @@ -39,4 +38,3 @@ func Version() string { return version } ` - diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go index e2e04ee7a..dcd452da1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go @@ -82,6 +82,10 @@ func (r *urlBasedX509CertificateRetriever) renewCertificate(url string) (certifi certificatePemRaw = body.Bytes() var block *pem.Block block, _ = pem.Decode(certificatePemRaw) + if block == nil { + return nil, nil, fmt.Errorf("failed to parse the new certificate, not valid pem data") + } + if certificate, err = x509.ParseCertificate(block.Bytes); err != nil { return nil, nil, fmt.Errorf("failed to parse the new certificate: %s", err.Error()) } diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go index b0f455e9b..32be79574 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go @@ -42,7 +42,7 @@ func (p instancePrincipalConfigurationProvider) KeyID() (string, error) { } func (p instancePrincipalConfigurationProvider) TenancyOCID() (string, error) { - return "", nil + return p.keyProvider.TenancyOCID() } func (p instancePrincipalConfigurationProvider) UserOCID() (string, error) { diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go index f15aff82d..1aa258e83 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go @@ -53,7 +53,11 @@ var ( func newAuthClient(region common.Region, provider common.KeyProvider) *common.BaseClient { signer := common.RequestSigner(provider, genericHeaders, bodyHeaders) client := common.DefaultBaseClientWithSigner(signer) - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "auth", string(region)) + if region == common.RegionSEA { + client.Host = "https://auth.r1.oracleiaas.com" + } else { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "auth", string(region)) + } client.BasePath = "v1/x509" return &client } diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go index ecf14b072..b0f329e32 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go @@ -27,6 +27,7 @@ const ( type instancePrincipalKeyProvider struct { regionForFederationClient common.Region federationClient federationClient + tenancyID string } // newInstancePrincipalKeyProvider creates and returns an instancePrincipalKeyProvider instance based on @@ -61,7 +62,7 @@ func newInstancePrincipalKeyProvider() (provider *instancePrincipalKeyProvider, federationClient := newX509FederationClient( region, tenancyID, leafCertificateRetriever, intermediateCertificateRetrievers) - provider = &instancePrincipalKeyProvider{regionForFederationClient: region, federationClient: federationClient} + provider = &instancePrincipalKeyProvider{regionForFederationClient: region, federationClient: federationClient, tenancyID: tenancyID} return } @@ -93,3 +94,7 @@ func (p *instancePrincipalKeyProvider) KeyID() (string, error) { } return fmt.Sprintf("ST$%s", securityToken), nil } + +func (p *instancePrincipalKeyProvider) TenancyOCID() (string, error) { + return p.tenancyID, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/client.go b/vendor/github.com/oracle/oci-go-sdk/common/client.go index d67e99777..ceda00192 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/client.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/client.go @@ -6,6 +6,7 @@ package common import ( "context" "fmt" + "math/rand" "net/http" "net/http/httputil" "net/url" @@ -14,16 +15,55 @@ import ( "path" "runtime" "strings" + "sync/atomic" "time" ) const ( // DefaultHostURLTemplate The default url template for service hosts - DefaultHostURLTemplate = "%s.%s.oraclecloud.com" + DefaultHostURLTemplate = "%s.%s.oraclecloud.com" + + // requestHeaderAccept The key for passing a header to indicate Accept + requestHeaderAccept = "Accept" + + // requestHeaderAuthorization The key for passing a header to indicate Authorization + requestHeaderAuthorization = "Authorization" + + // requestHeaderContentLength The key for passing a header to indicate Content Length + requestHeaderContentLength = "Content-Length" + + // requestHeaderContentType The key for passing a header to indicate Content Type + requestHeaderContentType = "Content-Type" + + // requestHeaderDate The key for passing a header to indicate Date + requestHeaderDate = "Date" + + // requestHeaderIfMatch The key for passing a header to indicate If Match + requestHeaderIfMatch = "if-match" + + // requestHeaderOpcClientInfo The key for passing a header to indicate OPC Client Info + requestHeaderOpcClientInfo = "opc-client-info" + + // requestHeaderOpcRetryToken The key for passing a header to indicate OPC Retry Token + requestHeaderOpcRetryToken = "opc-retry-token" + + // requestHeaderOpcRequestID The key for unique Oracle-assigned identifier for the request. + requestHeaderOpcRequestID = "opc-request-id" + + // requestHeaderOpcClientRequestID The key for unique Oracle-assigned identifier for the request. + requestHeaderOpcClientRequestID = "opc-client-request-id" + + // requestHeaderUserAgent The key for passing a header to indicate User Agent + requestHeaderUserAgent = "User-Agent" + + // requestHeaderXContentSHA256 The key for passing a header to indicate SHA256 hash + requestHeaderXContentSHA256 = "X-Content-SHA256" + + // private constants defaultScheme = "https" defaultSDKMarker = "Oracle-GoSDK" defaultUserAgentTemplate = "%s/%s (%s/%s; go/%s)" //SDK/SDKVersion (OS/OSVersion; Lang/LangVersion) - defaultTimeout = time.Second * 30 + defaultTimeout = 60 * time.Second defaultConfigFileName = "config" defaultConfigDirName = ".oci" secondaryConfigDirName = ".oraclebmc" @@ -65,7 +105,15 @@ func defaultUserAgent() string { return userAgent } +var clientCounter int64 + +func getNextSeed() int64 { + newCounterValue := atomic.AddInt64(&clientCounter, 1) + return newCounterValue + time.Now().UnixNano() +} + func newBaseClient(signer HTTPRequestSigner, dispatcher HTTPRequestDispatcher) BaseClient { + rand.Seed(getNextSeed()) return BaseClient{ UserAgent: defaultUserAgent(), Interceptor: nil, @@ -146,7 +194,12 @@ func (client *BaseClient) prepareRequest(request *http.Request) (err error) { if request.Header == nil { request.Header = http.Header{} } - request.Header.Set("User-Agent", client.UserAgent) + request.Header.Set(requestHeaderUserAgent, client.UserAgent) + request.Header.Set(requestHeaderDate, time.Now().UTC().Format(http.TimeFormat)) + + if request.Header.Get(requestHeaderOpcRetryToken) == "" { + request.Header.Set(requestHeaderOpcRetryToken, generateRetryToken()) + } if !strings.Contains(client.Host, "http") && !strings.Contains(client.Host, "https") { @@ -160,7 +213,9 @@ func (client *BaseClient) prepareRequest(request *http.Request) (err error) { request.URL.Host = clientURL.Host request.URL.Scheme = clientURL.Scheme currentPath := request.URL.Path - request.URL.Path = path.Clean(fmt.Sprintf("/%s/%s", client.BasePath, currentPath)) + if !strings.Contains(currentPath, fmt.Sprintf("/%s", client.BasePath)) { + request.URL.Path = path.Clean(fmt.Sprintf("/%s/%s", client.BasePath, currentPath)) + } return } @@ -177,10 +232,32 @@ func checkForSuccessfulResponse(res *http.Response) error { return newServiceFailureFromResponse(res) } return nil - } -//Call executes the underlying http requrest with the given context +// OCIRequest is any request made to an OCI service. +type OCIRequest interface { + // HTTPRequest assembles an HTTP request. + HTTPRequest(method, path string) (http.Request, error) +} + +// RequestMetadata is metadata about an OCIRequest. This structure represents the behavior exhibited by the SDK when +// issuing (or reissuing) a request. +type RequestMetadata struct { + // RetryPolicy is the policy for reissuing the request. If no retry policy is set on the request, + // then the request will be issued exactly once. + RetryPolicy *RetryPolicy +} + +// OCIResponse is the response from issuing a request to an OCI service. +type OCIResponse interface { + // HTTPResponse returns the raw HTTP response. + HTTPResponse() *http.Response +} + +// OCIOperation is the generalization of a request-response cycle undergone by an OCI service. +type OCIOperation func(context.Context, OCIRequest) (OCIResponse, error) + +// Call executes the http request with the given context func (client BaseClient) Call(ctx context.Context, request *http.Request) (response *http.Response, err error) { Debugln("Atempting to call downstream service") request = request.WithContext(ctx) diff --git a/vendor/github.com/oracle/oci-go-sdk/common/common.go b/vendor/github.com/oracle/oci-go-sdk/common/common.go index 9164562b4..c284f9371 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/common.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/common.go @@ -18,6 +18,8 @@ const ( RegionIAD Region = "us-ashburn-1" //RegionFRA region FRA RegionFRA Region = "eu-frankfurt-1" + //RegionLHR region LHR + RegionLHR Region = "uk-london-1" ) //StringToRegion convert a string to Region type @@ -31,6 +33,8 @@ func StringToRegion(stringRegion string) (r Region) { r = RegionIAD case "fra", "eu-frankfurt-1": r = RegionFRA + case "lhr", "uk-london-1": + r = RegionLHR default: r = Region(stringRegion) Debugf("region named: %s, is not recognized", stringRegion) diff --git a/vendor/github.com/oracle/oci-go-sdk/common/configuration.go b/vendor/github.com/oracle/oci-go-sdk/common/configuration.go index d2292bb9d..2e4c92b64 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/configuration.go @@ -8,6 +8,7 @@ import ( "fmt" "io/ioutil" "os" + "path" "regexp" "strings" ) @@ -95,7 +96,7 @@ func (p rawConfigurationProvider) Region() (string, error) { } // environmentConfigurationProvider reads configuration from environment variables -type environmentConfigurationProvider struct { // TODO: Support Instance Principal +type environmentConfigurationProvider struct { PrivateKeyPassword string EnvironmentVariablePrefix string } @@ -120,7 +121,8 @@ func (p environmentConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, return nil, fmt.Errorf("can not read PrivateKey from env variable: %s", environmentVariable) } - pemFileContent, err := ioutil.ReadFile(value) + expandedPath := expandPath(value) + pemFileContent, err := ioutil.ReadFile(expandedPath) if err != nil { Debugln("Can not read PrivateKey location from environment variable: " + environmentVariable) return @@ -186,7 +188,7 @@ func (p environmentConfigurationProvider) Region() (value string, err error) { } // fileConfigurationProvider. reads configuration information from a file -type fileConfigurationProvider struct { // TODO: Support Instance Principal +type fileConfigurationProvider struct { //The path to the configuration file ConfigPath string @@ -227,8 +229,8 @@ func ConfigurationProviderFromFileWithProfile(configFilePath, profile, privateKe } type configFileInfo struct { - UserOcid, Fingerprint, KeyFilePath, TenancyOcid, Region string - PresentConfiguration byte + UserOcid, Fingerprint, KeyFilePath, TenancyOcid, Region, Passphrase string + PresentConfiguration byte } const ( @@ -237,6 +239,7 @@ const ( hasFingerprint hasRegion hasKeyFile + hasPassphrase none ) @@ -277,6 +280,9 @@ func parseConfigAtLine(start int, content []string) (info *configFileInfo, err e splits := strings.Split(line, "=") switch key, value := strings.TrimSpace(splits[0]), strings.TrimSpace(splits[1]); strings.ToLower(key) { + case "passphrase", "pass_phrase": + configurationPresent = configurationPresent | hasPassphrase + info.Passphrase = value case "user": configurationPresent = configurationPresent | hasUser info.UserOcid = value @@ -299,8 +305,21 @@ func parseConfigAtLine(start int, content []string) (info *configFileInfo, err e } +// cleans and expands the path if it contains a tilde , returns the expanded path or the input path as is if not expansion +// was performed +func expandPath(filepath string) (expandedPath string) { + cleanedPath := path.Clean(filepath) + expandedPath = cleanedPath + if strings.HasPrefix(cleanedPath, "~/") { + rest := cleanedPath[2:] + expandedPath = path.Join(getHomeFolder(), rest) + } + return +} + func openConfigFile(configFilePath string) (data []byte, err error) { - data, err = ioutil.ReadFile(configFilePath) + expandedPath := expandPath(configFilePath) + data, err = ioutil.ReadFile(expandedPath) if err != nil { err = fmt.Errorf("can not read config file: %s due to: %s", configFilePath, err.Error()) } @@ -391,13 +410,21 @@ func (p fileConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err err if err != nil { return } - pemFileContent, err := ioutil.ReadFile(filePath) + + expandedPath := expandPath(filePath) + pemFileContent, err := ioutil.ReadFile(expandedPath) if err != nil { err = fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error()) return } - key, err = PrivateKeyFromBytes(pemFileContent, &p.PrivateKeyPassword) + password := p.PrivateKeyPassword + + if password == "" && ((info.PresentConfiguration & hasPassphrase) == hasPassphrase) { + password = info.Passphrase + } + + key, err = PrivateKeyFromBytes(pemFileContent, &password) return } @@ -424,6 +451,12 @@ func ComposingConfigurationProvider(providers []ConfigurationProvider) (Configur if len(providers) == 0 { return nil, fmt.Errorf("providers can not be an empty slice") } + + for i, p := range providers { + if p == nil { + return nil, fmt.Errorf("provider in position: %d is nil. ComposingConfiurationProvider does not support nil values", i) + } + } return composingConfigurationProvider{Providers: providers}, nil } diff --git a/vendor/github.com/oracle/oci-go-sdk/common/errors.go b/vendor/github.com/oracle/oci-go-sdk/common/errors.go index 290bd08bf..f4757a2ec 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/errors.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/errors.go @@ -78,3 +78,14 @@ func IsServiceError(err error) (failure ServiceError, ok bool) { failure, ok = err.(servicefailure) return } + +type deadlineExceededByBackoffError struct{} + +func (deadlineExceededByBackoffError) Error() string { + return "now() + computed backoff duration exceeds request deadline" +} + +// DeadlineExceededByBackoff is the error returned by Call() when GetNextDuration() returns a time.Duration that would +// force the user to wait past the request deadline before re-issuing a request. This enables us to exit early, since +// we cannot succeed based on the configured retry policy. +var DeadlineExceededByBackoff error = deadlineExceededByBackoffError{} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/helpers.go b/vendor/github.com/oracle/oci-go-sdk/common/helpers.go index 554436944..9e99734c5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/helpers.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/helpers.go @@ -3,6 +3,7 @@ package common import ( + "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/pem" @@ -166,3 +167,14 @@ func PrivateKeyFromBytes(pemData []byte, password *string) (key *rsa.PrivateKey, } return } + +func generateRandUUID() (string, error) { + b := make([]byte, 16) + _, err := rand.Read(b) + if err != nil { + return "", err + } + uuid := fmt.Sprintf("%x%x%x%x%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]) + + return uuid, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/http.go b/vendor/github.com/oracle/oci-go-sdk/common/http.go index 5e75ed4b3..0452669f1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/http.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/http.go @@ -72,8 +72,8 @@ func addBinaryBody(request *http.Request, value reflect.Value) (e error) { request.Body = readCloser //Set the default content type to application/octet-stream if not set - if request.Header.Get("Content-Type") == "" { - request.Header.Set("Content-Type", "application/octet-stream") + if request.Header.Get(requestHeaderContentType) == "" { + request.Header.Set(requestHeaderContentType, "application/octet-stream") } return nil } @@ -128,7 +128,7 @@ func isNillableType(value *reflect.Value) bool { return false } -// omitNilFieldsInJSON, removes json keys whose struct value is nil, and the field is tag with the json and +// omitNilFieldsInJSON, removes json keys whose struct value is nil, and the field is tagged with the json and // mandatory:false tags func omitNilFieldsInJSON(data interface{}, value reflect.Value) (interface{}, error) { switch value.Kind() { @@ -160,6 +160,12 @@ func omitNilFieldsInJSON(data interface{}, value reflect.Value) (interface{}, er continue } + // Check to make sure the field is part of the json representation of the value + if _, contains := jsonMap[jsonFieldName]; !contains { + Debugf("Field %s is not present in json, omitting", jsonFieldName) + continue + } + if currentFieldValue.Type() == timeType || currentFieldValue.Type() == timeTypePtr { continue } @@ -239,8 +245,8 @@ func addToBody(request *http.Request, value reflect.Value, field reflect.StructF Debugf("Marshaled body is: %s", string(marshaled)) bodyBytes := bytes.NewReader(marshaled) request.ContentLength = int64(bodyBytes.Len()) - request.Header.Set("Content-Length", strconv.FormatInt(request.ContentLength, 10)) - request.Header.Set("Content-Type", "application/json") + request.Header.Set(requestHeaderContentLength, strconv.FormatInt(request.ContentLength, 10)) + request.Header.Set(requestHeaderContentType, "application/json") request.Body = ioutil.NopCloser(bodyBytes) request.GetBody = func() (io.ReadCloser, error) { return ioutil.NopCloser(bodyBytes), nil @@ -269,11 +275,35 @@ func addToQuery(request *http.Request, value reflect.Value, field reflect.Struct //if not mandatory and nil. Omit if !mandatory && isNil(value) { - Debugf("Query parameter value is not mandatory and is nil pointer in field: %s. Skipping header", field.Name) + Debugf("Query parameter value is not mandatory and is nil pointer in field: %s. Skipping query", field.Name) return } - if queryParameterValue, e = toStringValue(value, field); e != nil { + encoding := strings.ToLower(field.Tag.Get("collectionFormat")) + var collectionFormatStringValues []string + switch encoding { + case "csv", "multi": + if value.Kind() != reflect.Slice && value.Kind() != reflect.Array { + e = fmt.Errorf("query parameter is tagged as csv or multi yet its type is neither an Array nor a Slice: %s", field.Name) + break + } + + numOfElements := value.Len() + collectionFormatStringValues = make([]string, numOfElements) + for i := 0; i < numOfElements; i++ { + collectionFormatStringValues[i], e = toStringValue(value.Index(i), field) + if e != nil { + break + } + } + queryParameterValue = strings.Join(collectionFormatStringValues, ",") + case "": + queryParameterValue, e = toStringValue(value, field) + default: + e = fmt.Errorf("encoding of type %s is not supported for query param: %s", encoding, field.Name) + } + + if e != nil { return } @@ -282,18 +312,28 @@ func addToQuery(request *http.Request, value reflect.Value, field reflect.Struct if omitEmpty, present := field.Tag.Lookup("omitEmpty"); present { omitEmptyBool, _ := strconv.ParseBool(strings.ToLower(omitEmpty)) if queryParameterValue != "" || !omitEmptyBool { - query.Set(queryParameterName, queryParameterValue) + addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues) } else { Debugf("Omitting %s, is empty and omitEmpty tag is set", field.Name) } } else { - query.Set(queryParameterName, queryParameterValue) + addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues) } request.URL.RawQuery = query.Encode() return } +func addToQueryForEncoding(query *url.Values, encoding string, queryParameterName string, queryParameterValue string, collectionFormatStringValues []string) { + if encoding == "multi" { + for _, stringValue := range collectionFormatStringValues { + query.Add(queryParameterName, stringValue) + } + } else { + query.Set(queryParameterName, queryParameterValue) + } +} + // Adds to the path of the url in the order they appear in the structure func addToPath(request *http.Request, value reflect.Value, field reflect.StructField) (e error) { var additionalURLPathPart string @@ -301,6 +341,11 @@ func addToPath(request *http.Request, value reflect.Value, field reflect.StructF return fmt.Errorf("can not marshal to path in request for field %s. Due to %s", field.Name, e.Error()) } + // path should not be empty for any operations + if len(additionalURLPathPart) == 0 { + return fmt.Errorf("value cannot be empty for field %s in path", field.Name) + } + if request.URL == nil { request.URL = &url.URL{} request.URL.Path = "" @@ -356,6 +401,9 @@ func addToHeader(request *http.Request, value reflect.Value, field reflect.Struc return fmt.Errorf("marshaling request to a header requires not nil pointer for field: %s", field.Name) } + // generate opc-request-id if header value is nil and header name matches + value = generateOpcRequestID(headerName, value) + //if not mandatory and nil. Omit if !mandatory && isNil(value) { Debugf("Header value is not mandatory and is nil pointer in field: %s. Skipping header", field.Name) @@ -471,8 +519,8 @@ func structToRequestPart(request *http.Request, val reflect.Value) (err error) { } //If headers are and the content type was not set, we default to application/json - if request.Header != nil && request.Header.Get("Content-Type") == "" { - request.Header.Set("Content-Type", "application/json") + if request.Header != nil && request.Header.Get(requestHeaderContentType) == "" { + request.Header.Set(requestHeaderContentType, "application/json") } return @@ -511,10 +559,10 @@ func MakeDefaultHTTPRequest(method, path string) (httpRequest http.Request) { URL: &url.URL{}, } - httpRequest.Header.Set("Content-Length", "0") - httpRequest.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) - httpRequest.Header.Set("Opc-Client-Info", strings.Join([]string{defaultSDKMarker, Version()}, "/")) - httpRequest.Header.Set("Accept", "*/*") + httpRequest.Header.Set(requestHeaderContentLength, "0") + httpRequest.Header.Set(requestHeaderDate, time.Now().UTC().Format(http.TimeFormat)) + httpRequest.Header.Set(requestHeaderOpcClientInfo, strings.Join([]string{defaultSDKMarker, Version()}, "/")) + httpRequest.Header.Set(requestHeaderAccept, "*/*") httpRequest.Method = method httpRequest.URL.Path = path return @@ -861,3 +909,24 @@ func UnmarshalResponseWithPolymorphicBody(httpResponse *http.Response, responseS return nil } + +// generate request id if user not provided and for each retry operation re-gen a new request id +func generateOpcRequestID(headerName string, value reflect.Value) (newValue reflect.Value) { + newValue = value + isNilValue := isNil(newValue) + isOpcRequestIDHeader := headerName == requestHeaderOpcRequestID || headerName == requestHeaderOpcClientRequestID + + if isNilValue && isOpcRequestIDHeader { + requestID, err := generateRandUUID() + + if err != nil { + // this will not fail the request, just skip add opc-request-id + Debugf("unable to generate opc-request-id. %s", err.Error()) + } else { + newValue = reflect.ValueOf(String(requestID)) + Debugf("add request id for header: %s, with value: %s", headerName, requestID) + } + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/http_signer.go b/vendor/github.com/oracle/oci-go-sdk/common/http_signer.go index 3e82931aa..c62be35e9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/http_signer.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/http_signer.go @@ -46,7 +46,7 @@ var ( defaultGenericHeaders = []string{"date", "(request-target)", "host"} defaultBodyHeaders = []string{"content-length", "content-type", "x-content-sha256"} defaultBodyHashPredicate = func(r *http.Request) bool { - return r.Method == http.MethodPost || r.Method == http.MethodPut + return r.Method == http.MethodPost || r.Method == http.MethodPut || r.Method == http.MethodPatch } ) @@ -55,6 +55,15 @@ func DefaultRequestSigner(provider KeyProvider) HTTPRequestSigner { return RequestSigner(provider, defaultGenericHeaders, defaultBodyHeaders) } +// RequestSignerExcludeBody creates a signer without hash the body. +func RequestSignerExcludeBody(provider KeyProvider) HTTPRequestSigner { + bodyHashPredicate := func(r *http.Request) bool { + // week request signer will not hash the body + return false + } + return RequestSignerWithBodyHashingPredicate(provider, defaultGenericHeaders, defaultBodyHeaders, bodyHashPredicate) +} + // RequestSigner creates a signer that utilizes the specified headers for signing // and the default predicate for using the body of the request as part of the signature func RequestSigner(provider KeyProvider, genericHeaders, bodyHeaders []string) HTTPRequestSigner { @@ -125,7 +134,7 @@ func calculateHashOfBody(request *http.Request) (err error) { } else { hash = hashAndEncode([]byte("")) } - request.Header.Set("X-Content-Sha256", hash) + request.Header.Set(requestHeaderXContentSHA256, hash) return } @@ -224,7 +233,7 @@ func (signer ociRequestSigner) Sign(request *http.Request) (err error) { authValue := fmt.Sprintf("Signature version=\"%s\",headers=\"%s\",keyId=\"%s\",algorithm=\"rsa-sha256\",signature=\"%s\"", signerVersion, signingHeaders, keyID, signature) - request.Header.Set("Authorization", authValue) + request.Header.Set(requestHeaderAuthorization, authValue) return } diff --git a/vendor/github.com/oracle/oci-go-sdk/common/log.go b/vendor/github.com/oracle/oci-go-sdk/common/log.go index 328485fdd..9cb8ec560 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/log.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/log.go @@ -4,7 +4,6 @@ package common import ( "fmt" - "io" "io/ioutil" "log" "os" @@ -18,34 +17,32 @@ var mainLog = log.New(os.Stderr, "", log.Ldate|log.Ltime|log.Lshortfile) var isDebugLogEnabled bool var checkDebug sync.Once -func getOutputForEnv() (writer io.Writer) { +func setOutputForEnv() { checkDebug.Do(func() { isDebugLogEnabled = *new(bool) _, isDebugLogEnabled = os.LookupEnv("OCI_GO_SDK_DEBUG") - }) - writer = ioutil.Discard - if isDebugLogEnabled { - writer = os.Stderr - } - return + if !isDebugLogEnabled { + debugLog.SetOutput(ioutil.Discard) + } + }) } // Debugf logs v with the provided format if debug mode is set func Debugf(format string, v ...interface{}) { - debugLog.SetOutput(getOutputForEnv()) + setOutputForEnv() debugLog.Output(3, fmt.Sprintf(format, v...)) } // Debug logs v if debug mode is set func Debug(v ...interface{}) { - debugLog.SetOutput(getOutputForEnv()) + setOutputForEnv() debugLog.Output(3, fmt.Sprint(v...)) } // Debugln logs v appending a new line if debug mode is set func Debugln(v ...interface{}) { - debugLog.SetOutput(getOutputForEnv()) + setOutputForEnv() debugLog.Output(3, fmt.Sprintln(v...)) } diff --git a/vendor/github.com/oracle/oci-go-sdk/common/retry.go b/vendor/github.com/oracle/oci-go-sdk/common/retry.go new file mode 100644 index 000000000..74e4abd9c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/retry.go @@ -0,0 +1,139 @@ +package common + +import ( + "context" + "fmt" + "math/rand" + "time" +) + +const ( + // UnlimitedNumAttemptsValue is the value for indicating unlimited attempts for reaching success + UnlimitedNumAttemptsValue = uint(0) + + // number of characters contained in the generated retry token + generatedRetryTokenLength = 30 +) + +// OCIRetryableRequest represents a request that can be reissued according to the specified policy. +type OCIRetryableRequest interface { + // Any retryable request must implement the OCIRequest interface + OCIRequest + + // Each operation specifies default retry behavior. By passing no arguments to this method, the default retry + // behavior, as determined on a per-operation-basis, will be honored. Variadic retry policy option arguments + // passed to this method will override the default behavior. + RetryPolicy() *RetryPolicy +} + +// OCIOperationResponse represents the output of an OCIOperation, with additional context of error message +// and operation attempt number. +type OCIOperationResponse struct { + // Response from OCI Operation + Response OCIResponse + + // Error from OCI Operation + Error error + + // Operation Attempt Number (one-based) + AttemptNumber uint +} + +// NewOCIOperationResponse assembles an OCI Operation Response object. +func NewOCIOperationResponse(response OCIResponse, err error, attempt uint) OCIOperationResponse { + return OCIOperationResponse{ + Response: response, + Error: err, + AttemptNumber: attempt, + } +} + +// RetryPolicy is the class that holds all relevant information for retrying operations. +type RetryPolicy struct { + // MaximumNumberAttempts is the maximum number of times to retry a request. Zero indicates an unlimited + // number of attempts. + MaximumNumberAttempts uint + + // ShouldRetryOperation inspects the http response, error, and operation attempt number, and + // - returns true if we should retry the operation + // - returns false otherwise + ShouldRetryOperation func(OCIOperationResponse) bool + + // GetNextDuration computes the duration to pause between operation retries. + NextDuration func(OCIOperationResponse) time.Duration +} + +// NoRetryPolicy is a helper method that assembles and returns a return policy that indicates an operation should +// never be retried (the operation is performed exactly once). +func NoRetryPolicy() RetryPolicy { + dontRetryOperation := func(OCIOperationResponse) bool { return false } + zeroNextDuration := func(OCIOperationResponse) time.Duration { return 0 * time.Second } + return NewRetryPolicy(uint(1), dontRetryOperation, zeroNextDuration) +} + +// NewRetryPolicy is a helper method for assembling a Retry Policy object. +func NewRetryPolicy(attempts uint, retryOperation func(OCIOperationResponse) bool, nextDuration func(OCIOperationResponse) time.Duration) RetryPolicy { + return RetryPolicy{ + MaximumNumberAttempts: attempts, + ShouldRetryOperation: retryOperation, + NextDuration: nextDuration, + } +} + +// shouldContinueIssuingRequests returns true if we should continue retrying a request, based on the current attempt +// number and the maximum number of attempts specified, or false otherwise. +func shouldContinueIssuingRequests(current, maximum uint) bool { + return maximum == UnlimitedNumAttemptsValue || current <= maximum +} + +// generateRetryToken generates a retry token that must be included on any request passed to the Retry method. +func generateRetryToken() string { + alphanumericChars := []rune("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") + retryToken := make([]rune, generatedRetryTokenLength) + for i := range retryToken { + retryToken[i] = alphanumericChars[rand.Intn(len(alphanumericChars))] + } + return string(retryToken) +} + +// Retry is a package-level operation that executes the retryable request using the specified operation and retry policy. +func Retry(ctx context.Context, request OCIRetryableRequest, operation OCIOperation, policy RetryPolicy) (OCIResponse, error) { + // use a one-based counter because it's easier to think about operation retry in terms of attempt numbering + for currentOperationAttempt := uint(1); shouldContinueIssuingRequests(currentOperationAttempt, policy.MaximumNumberAttempts); currentOperationAttempt++ { + Debugln(fmt.Sprintf("operation attempt #%v", currentOperationAttempt)) + response, err := operation(ctx, request) + operationResponse := NewOCIOperationResponse(response, err, currentOperationAttempt) + + select { + case <-ctx.Done(): + // return why the request was aborted (could be user interrupted or deadline exceeded) + // => include last received response for information (user may choose to re-issue request) + return response, ctx.Err() + default: + // non-blocking select + } + + if policy.ShouldRetryOperation(operationResponse) { + // this conditional is explicitly not added to the encompassing if condition to retry based on response + // => it is only to determine if, on the last round of this loop, we still skip sleeping (if we're the + // last attempt, then there's no point sleeping before we round the loop again and fall out to the + // Maximum Number Attempts exceeded error) + if currentOperationAttempt != policy.MaximumNumberAttempts { + // sleep before retrying the operation + duration := policy.NextDuration(operationResponse) + if deadline, ok := ctx.Deadline(); ok && time.Now().Add(duration).After(deadline) { + // we want to retry the operation, but the policy is telling us to wait for a duration that exceeds + // the specified overall deadline for the operation => instead of waiting for however long that + // time period is and then aborting, abort now and save the cycles + return response, DeadlineExceededByBackoff + } + Debugln(fmt.Sprintf("waiting %v before retrying operation", duration)) + time.Sleep(duration) + } + } else { + // we should NOT retry operation based on response and/or error => return + return response, err + } + } + return nil, fmt.Errorf("maximum number of attempts exceeded (%v)", policy.MaximumNumberAttempts) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/version.go b/vendor/github.com/oracle/oci-go-sdk/common/version.go index be610d170..05ba949b7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/common/version.go +++ b/vendor/github.com/oracle/oci-go-sdk/common/version.go @@ -11,7 +11,7 @@ import ( const ( major = "1" - minor = "0" + minor = "8" patch = "0" tag = "" ) diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go new file mode 100644 index 000000000..769f7c72d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// AddOnOptions The properties that define options for supported add-ons. +type AddOnOptions struct { + + // Whether or not to enable the Kubernetes Dashboard add-on. + IsKubernetesDashboardEnabled *bool `mandatory:"false" json:"isKubernetesDashboardEnabled"` + + // Whether or not to enable the Tiller add-on. + IsTillerEnabled *bool `mandatory:"false" json:"isTillerEnabled"` +} + +func (m AddOnOptions) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go new file mode 100644 index 000000000..4cb004f80 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Cluster A Kubernetes cluster. +type Cluster struct { + + // The OCID of the cluster. + Id *string `mandatory:"false" json:"id"` + + // The name of the cluster. + Name *string `mandatory:"false" json:"name"` + + // The OCID of the compartment in which the cluster exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the virtual cloud network (VCN) in which the cluster exists. + VcnId *string `mandatory:"false" json:"vcnId"` + + // The version of Kubernetes running on the cluster masters. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // Optional attributes for the cluster. + Options *ClusterCreateOptions `mandatory:"false" json:"options"` + + // Metadata about the cluster. + Metadata *ClusterMetadata `mandatory:"false" json:"metadata"` + + // The state of the cluster masters. + LifecycleState ClusterLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the cluster masters. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Endpoints served up by the cluster masters. + Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"` + + // Available Kubernetes versions to which the clusters masters may be upgraded. + AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"` +} + +func (m Cluster) String() string { + return common.PointerString(m) +} + +// ClusterLifecycleStateEnum Enum with underlying type: string +type ClusterLifecycleStateEnum string + +// Set of constants representing the allowable values for ClusterLifecycleState +const ( + ClusterLifecycleStateCreating ClusterLifecycleStateEnum = "CREATING" + ClusterLifecycleStateActive ClusterLifecycleStateEnum = "ACTIVE" + ClusterLifecycleStateFailed ClusterLifecycleStateEnum = "FAILED" + ClusterLifecycleStateDeleting ClusterLifecycleStateEnum = "DELETING" + ClusterLifecycleStateDeleted ClusterLifecycleStateEnum = "DELETED" + ClusterLifecycleStateUpdating ClusterLifecycleStateEnum = "UPDATING" +) + +var mappingClusterLifecycleState = map[string]ClusterLifecycleStateEnum{ + "CREATING": ClusterLifecycleStateCreating, + "ACTIVE": ClusterLifecycleStateActive, + "FAILED": ClusterLifecycleStateFailed, + "DELETING": ClusterLifecycleStateDeleting, + "DELETED": ClusterLifecycleStateDeleted, + "UPDATING": ClusterLifecycleStateUpdating, +} + +// GetClusterLifecycleStateEnumValues Enumerates the set of values for ClusterLifecycleState +func GetClusterLifecycleStateEnumValues() []ClusterLifecycleStateEnum { + values := make([]ClusterLifecycleStateEnum, 0) + for _, v := range mappingClusterLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go new file mode 100644 index 000000000..7d43d5998 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ClusterCreateOptions The properties that define extra options for a cluster. +type ClusterCreateOptions struct { + + // The OCIDs of the subnets used for Kubernetes services load balancers. + ServiceLbSubnetIds []string `mandatory:"false" json:"serviceLbSubnetIds"` + + // Network configuration for Kubernetes. + KubernetesNetworkConfig *KubernetesNetworkConfig `mandatory:"false" json:"kubernetesNetworkConfig"` + + // Configurable cluster add-ons + AddOns *AddOnOptions `mandatory:"false" json:"addOns"` +} + +func (m ClusterCreateOptions) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go new file mode 100644 index 000000000..97a46981e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ClusterEndpoints The properties that define endpoints for a cluster. +type ClusterEndpoints struct { + + // The Kubernetes API server endpoint. + Kubernetes *string `mandatory:"false" json:"kubernetes"` +} + +func (m ClusterEndpoints) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go new file mode 100644 index 000000000..369d7a35e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go @@ -0,0 +1,21 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ClusterLifecycleState The lifecycle state of a cluster. +type ClusterLifecycleState struct { +} + +func (m ClusterLifecycleState) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go new file mode 100644 index 000000000..588eaf0b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ClusterMetadata The properties that define meta data for a cluster. +type ClusterMetadata struct { + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The user who created the cluster. + CreatedByUserId *string `mandatory:"false" json:"createdByUserId"` + + // The OCID of the work request which created the cluster. + CreatedByWorkRequestId *string `mandatory:"false" json:"createdByWorkRequestId"` + + // The time the cluster was deleted. + TimeDeleted *common.SDKTime `mandatory:"false" json:"timeDeleted"` + + // The user who deleted the cluster. + DeletedByUserId *string `mandatory:"false" json:"deletedByUserId"` + + // The OCID of the work request which deleted the cluster. + DeletedByWorkRequestId *string `mandatory:"false" json:"deletedByWorkRequestId"` + + // The time the cluster was updated. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The user who updated the cluster. + UpdatedByUserId *string `mandatory:"false" json:"updatedByUserId"` + + // The OCID of the work request which updated the cluster. + UpdatedByWorkRequestId *string `mandatory:"false" json:"updatedByWorkRequestId"` +} + +func (m ClusterMetadata) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go new file mode 100644 index 000000000..e8ee0ffe6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ClusterOptions Options for creating or updating clusters. +type ClusterOptions struct { + + // Available Kubernetes versions. + KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"` +} + +func (m ClusterOptions) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go new file mode 100644 index 000000000..8cd31731c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ClusterSummary The properties that define a cluster summary. +type ClusterSummary struct { + + // The OCID of the cluster. + Id *string `mandatory:"false" json:"id"` + + // The name of the cluster. + Name *string `mandatory:"false" json:"name"` + + // The OCID of the compartment in which the cluster exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the virtual cloud network (VCN) in which the cluster exists + VcnId *string `mandatory:"false" json:"vcnId"` + + // The version of Kubernetes running on the cluster masters. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // Optional attributes for the cluster. + Options *ClusterCreateOptions `mandatory:"false" json:"options"` + + // Metadata about the cluster. + Metadata *ClusterMetadata `mandatory:"false" json:"metadata"` + + // The state of the cluster masters. + LifecycleState ClusterSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the cluster masters. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Endpoints served up by the cluster masters. + Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"` + + // Available Kubernetes versions to which the clusters masters may be upgraded. + AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"` +} + +func (m ClusterSummary) String() string { + return common.PointerString(m) +} + +// ClusterSummaryLifecycleStateEnum Enum with underlying type: string +type ClusterSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for ClusterSummaryLifecycleState +const ( + ClusterSummaryLifecycleStateCreating ClusterSummaryLifecycleStateEnum = "CREATING" + ClusterSummaryLifecycleStateActive ClusterSummaryLifecycleStateEnum = "ACTIVE" + ClusterSummaryLifecycleStateFailed ClusterSummaryLifecycleStateEnum = "FAILED" + ClusterSummaryLifecycleStateDeleting ClusterSummaryLifecycleStateEnum = "DELETING" + ClusterSummaryLifecycleStateDeleted ClusterSummaryLifecycleStateEnum = "DELETED" + ClusterSummaryLifecycleStateUpdating ClusterSummaryLifecycleStateEnum = "UPDATING" +) + +var mappingClusterSummaryLifecycleState = map[string]ClusterSummaryLifecycleStateEnum{ + "CREATING": ClusterSummaryLifecycleStateCreating, + "ACTIVE": ClusterSummaryLifecycleStateActive, + "FAILED": ClusterSummaryLifecycleStateFailed, + "DELETING": ClusterSummaryLifecycleStateDeleting, + "DELETED": ClusterSummaryLifecycleStateDeleted, + "UPDATING": ClusterSummaryLifecycleStateUpdating, +} + +// GetClusterSummaryLifecycleStateEnumValues Enumerates the set of values for ClusterSummaryLifecycleState +func GetClusterSummaryLifecycleStateEnumValues() []ClusterSummaryLifecycleStateEnum { + values := make([]ClusterSummaryLifecycleStateEnum, 0) + for _, v := range mappingClusterSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go new file mode 100644 index 000000000..edaf4dc7d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go @@ -0,0 +1,761 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//ContainerEngineClient a client for ContainerEngine +type ContainerEngineClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewContainerEngineClientWithConfigurationProvider Creates a new default ContainerEngine client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewContainerEngineClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ContainerEngineClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = ContainerEngineClient{BaseClient: baseClient} + client.BasePath = "20180222" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *ContainerEngineClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "containerengine", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *ContainerEngineClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ContainerEngineClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateCluster Create a new cluster. +func (client ContainerEngineClient) CreateCluster(ctx context.Context, request CreateClusterRequest) (response CreateClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createCluster, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateClusterResponse") + } + return +} + +// createCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters") + if err != nil { + return nil, err + } + + var response CreateClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateKubeconfig Create the Kubeconfig YAML for a cluster. +func (client ContainerEngineClient) CreateKubeconfig(ctx context.Context, request CreateKubeconfigRequest) (response CreateKubeconfigResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createKubeconfig, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateKubeconfigResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateKubeconfigResponse") + } + return +} + +// createKubeconfig implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createKubeconfig(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/kubeconfig/content") + if err != nil { + return nil, err + } + + var response CreateKubeconfigResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateNodePool Create a new node pool. +func (client ContainerEngineClient) CreateNodePool(ctx context.Context, request CreateNodePoolRequest) (response CreateNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createNodePool, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateNodePoolResponse") + } + return +} + +// createNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/nodePools") + if err != nil { + return nil, err + } + + var response CreateNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCluster Delete a cluster. +func (client ContainerEngineClient) DeleteCluster(ctx context.Context, request DeleteClusterRequest) (response DeleteClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCluster, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteClusterResponse") + } + return +} + +// deleteCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusters/{clusterId}") + if err != nil { + return nil, err + } + + var response DeleteClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteNodePool Delete a node pool. +func (client ContainerEngineClient) DeleteNodePool(ctx context.Context, request DeleteNodePoolRequest) (response DeleteNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteNodePool, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteNodePoolResponse") + } + return +} + +// deleteNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/nodePools/{nodePoolId}") + if err != nil { + return nil, err + } + + var response DeleteNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteWorkRequest Cancel a work request that has not started. +func (client ContainerEngineClient) DeleteWorkRequest(ctx context.Context, request DeleteWorkRequestRequest) (response DeleteWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteWorkRequest, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteWorkRequestResponse") + } + return +} + +// deleteWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workRequests/{workRequestId}") + if err != nil { + return nil, err + } + + var response DeleteWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCluster Get the details of a cluster. +func (client ContainerEngineClient) GetCluster(ctx context.Context, request GetClusterRequest) (response GetClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCluster, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetClusterResponse") + } + return +} + +// getCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}") + if err != nil { + return nil, err + } + + var response GetClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetClusterOptions Get options available for clusters. +func (client ContainerEngineClient) GetClusterOptions(ctx context.Context, request GetClusterOptionsRequest) (response GetClusterOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getClusterOptions, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetClusterOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetClusterOptionsResponse") + } + return +} + +// getClusterOptions implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getClusterOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusterOptions/{clusterOptionId}") + if err != nil { + return nil, err + } + + var response GetClusterOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNodePool Get the details of a node pool. +func (client ContainerEngineClient) GetNodePool(ctx context.Context, request GetNodePoolRequest) (response GetNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNodePool, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolResponse") + } + return +} + +// getNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools/{nodePoolId}") + if err != nil { + return nil, err + } + + var response GetNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNodePoolOptions Get options available for node pools. +func (client ContainerEngineClient) GetNodePoolOptions(ctx context.Context, request GetNodePoolOptionsRequest) (response GetNodePoolOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNodePoolOptions, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetNodePoolOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolOptionsResponse") + } + return +} + +// getNodePoolOptions implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getNodePoolOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePoolOptions/{nodePoolOptionId}") + if err != nil { + return nil, err + } + + var response GetNodePoolOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetWorkRequest Get the details of a work request. +func (client ContainerEngineClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} + +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}") + if err != nil { + return nil, err + } + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListClusters List all the cluster objects in a compartment. +func (client ContainerEngineClient) ListClusters(ctx context.Context, request ListClustersRequest) (response ListClustersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listClusters, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListClustersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListClustersResponse") + } + return +} + +// listClusters implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listClusters(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters") + if err != nil { + return nil, err + } + + var response ListClustersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListNodePools List all the node pools in a compartment, and optionally filter by cluster. +func (client ContainerEngineClient) ListNodePools(ctx context.Context, request ListNodePoolsRequest) (response ListNodePoolsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listNodePools, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListNodePoolsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListNodePoolsResponse") + } + return +} + +// listNodePools implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listNodePools(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools") + if err != nil { + return nil, err + } + + var response ListNodePoolsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Get the errors of a work request. +func (client ContainerEngineClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors") + if err != nil { + return nil, err + } + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Get the logs of a work request. +func (client ContainerEngineClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs") + if err != nil { + return nil, err + } + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests List all work requests in a compartment. +func (client ContainerEngineClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkRequests(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests") + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCluster Update the details of a cluster. +func (client ContainerEngineClient) UpdateCluster(ctx context.Context, request UpdateClusterRequest) (response UpdateClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCluster, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateClusterResponse") + } + return +} + +// updateCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusters/{clusterId}") + if err != nil { + return nil, err + } + + var response UpdateClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateNodePool Update the details of a node pool. +func (client ContainerEngineClient) UpdateNodePool(ctx context.Context, request UpdateNodePoolRequest) (response UpdateNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateNodePool, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateNodePoolResponse") + } + return +} + +// updateNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/nodePools/{nodePoolId}") + if err != nil { + return nil, err + } + + var response UpdateNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go new file mode 100644 index 000000000..7505a549f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateClusterDetails The properties that define a request to create a cluster. +type CreateClusterDetails struct { + + // The name of the cluster. Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + // The OCID of the compartment in which to create the cluster. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the virtual cloud network (VCN) in which to create the cluster. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The version of Kubernetes to install into the cluster masters. + KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"` + + // Optional attributes for the cluster. + Options *ClusterCreateOptions `mandatory:"false" json:"options"` +} + +func (m CreateClusterDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go new file mode 100644 index 000000000..e1870c79a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateClusterKubeconfigContentDetails The properties that define a request to create a cluster kubeconfig. +type CreateClusterKubeconfigContentDetails struct { + + // The version of the kubeconfig token. + TokenVersion *string `mandatory:"false" json:"tokenVersion"` + + // The desired expiration, in seconds, to use for the kubeconfig token. + Expiration *int `mandatory:"false" json:"expiration"` +} + +func (m CreateClusterKubeconfigContentDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go new file mode 100644 index 000000000..5c6c00c5b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateClusterRequest wrapper for the CreateCluster operation +type CreateClusterRequest struct { + + // The details of the cluster to create. + CreateClusterDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateClusterRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateClusterResponse wrapper for the CreateCluster operation +type CreateClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go new file mode 100644 index 000000000..827fd54b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "io" + "net/http" +) + +// CreateKubeconfigRequest wrapper for the CreateKubeconfig operation +type CreateKubeconfigRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The details of the cluster kubeconfig to create. + CreateClusterKubeconfigContentDetails `contributesTo:"body"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateKubeconfigRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateKubeconfigRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateKubeconfigRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateKubeconfigResponse wrapper for the CreateKubeconfig operation +type CreateKubeconfigResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateKubeconfigResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateKubeconfigResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go new file mode 100644 index 000000000..abd3f39fa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateNodePoolDetails The properties that define a request to create a node pool. +type CreateNodePoolDetails struct { + + // The OCID of the compartment in which the node pool exists. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the cluster to which this node pool is attached. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // The name of the node pool. Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + // The version of Kubernetes to install on the nodes in the node pool. + KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"` + + // The name of the image running on the nodes in the node pool. + NodeImageName *string `mandatory:"true" json:"nodeImageName"` + + // The name of the node shape of the nodes in the node pool. + NodeShape *string `mandatory:"true" json:"nodeShape"` + + // The OCIDs of the subnets in which to place nodes for this node pool. + SubnetIds []string `mandatory:"true" json:"subnetIds"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The SSH public key to add to each node in the node pool. + SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` + + // The number of nodes to create in each subnet. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` +} + +func (m CreateNodePoolDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go new file mode 100644 index 000000000..d3a5e452d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateNodePoolRequest wrapper for the CreateNodePool operation +type CreateNodePoolRequest struct { + + // The details of the node pool to create. + CreateNodePoolDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateNodePoolResponse wrapper for the CreateNodePool operation +type CreateNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go new file mode 100644 index 000000000..6b0d76f8d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteClusterRequest wrapper for the DeleteCluster operation +type DeleteClusterRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteClusterRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteClusterResponse wrapper for the DeleteCluster operation +type DeleteClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go new file mode 100644 index 000000000..bba9853bf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteNodePoolRequest wrapper for the DeleteNodePool operation +type DeleteNodePoolRequest struct { + + // The OCID of the node pool. + NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteNodePoolResponse wrapper for the DeleteNodePool operation +type DeleteNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go new file mode 100644 index 000000000..e50708263 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteWorkRequestRequest wrapper for the DeleteWorkRequest operation +type DeleteWorkRequestRequest struct { + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteWorkRequestResponse wrapper for the DeleteWorkRequest operation +type DeleteWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go new file mode 100644 index 000000000..94d5a784d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetClusterOptionsRequest wrapper for the GetClusterOptions operation +type GetClusterOptionsRequest struct { + + // The id of the option set to retrieve. Only "all" is supported. + ClusterOptionId *string `mandatory:"true" contributesTo:"path" name:"clusterOptionId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetClusterOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetClusterOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetClusterOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetClusterOptionsResponse wrapper for the GetClusterOptions operation +type GetClusterOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ClusterOptions instance + ClusterOptions `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetClusterOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetClusterOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go new file mode 100644 index 000000000..76a67753a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetClusterRequest wrapper for the GetCluster operation +type GetClusterRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetClusterRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetClusterResponse wrapper for the GetCluster operation +type GetClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Cluster instance + Cluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go new file mode 100644 index 000000000..a4201f07a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetNodePoolOptionsRequest wrapper for the GetNodePoolOptions operation +type GetNodePoolOptionsRequest struct { + + // The id of the option set to retrieve. Use "all" get all options, or use a cluster ID to get options specific to the provided cluster. + NodePoolOptionId *string `mandatory:"true" contributesTo:"path" name:"nodePoolOptionId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNodePoolOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNodePoolOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNodePoolOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetNodePoolOptionsResponse wrapper for the GetNodePoolOptions operation +type GetNodePoolOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NodePoolOptions instance + NodePoolOptions `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNodePoolOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNodePoolOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go new file mode 100644 index 000000000..47648ba65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetNodePoolRequest wrapper for the GetNodePool operation +type GetNodePoolRequest struct { + + // The OCID of the node pool. + NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetNodePoolResponse wrapper for the GetNodePool operation +type GetNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NodePool instance + NodePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go new file mode 100644 index 000000000..60dda6916 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +type GetWorkRequestRequest struct { + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetWorkRequestResponse wrapper for the GetWorkRequest operation +type GetWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkRequest instance + WorkRequest `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // the number of seconds to should wait before polling this endpoint again + RetryAfter *int `presentIn:"header" name:"retry-after"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go new file mode 100644 index 000000000..5a28b4f5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// KeyValue The properties that define a key value pair. +type KeyValue struct { + + // The key of the pair. + Key *string `mandatory:"false" json:"key"` + + // The value of the pair. + Value *string `mandatory:"false" json:"value"` +} + +func (m KeyValue) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go new file mode 100644 index 000000000..a84232182 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// KubernetesNetworkConfig The properties that define the network configuration for Kubernetes. +type KubernetesNetworkConfig struct { + + // The CIDR block for Kubernetes pods. + PodsCidr *string `mandatory:"false" json:"podsCidr"` + + // The CIDR block for Kubernetes services. + ServicesCidr *string `mandatory:"false" json:"servicesCidr"` +} + +func (m KubernetesNetworkConfig) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go new file mode 100644 index 000000000..42ba892ac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go @@ -0,0 +1,163 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListClustersRequest wrapper for the ListClusters operation +type ListClustersRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A cluster lifecycle state to filter on. Can have multiple parameters of this name. + LifecycleState []ListClustersLifecycleStateEnum `contributesTo:"query" name:"lifecycleState" omitEmpty:"true" collectionFormat:"multi"` + + // The name to filter on. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListClustersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListClustersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListClustersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListClustersRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListClustersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListClustersResponse wrapper for the ListClusters operation +type ListClustersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ClusterSummary instances + Items []ClusterSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there might be additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListClustersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListClustersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListClustersLifecycleStateEnum Enum with underlying type: string +type ListClustersLifecycleStateEnum string + +// Set of constants representing the allowable values for ListClustersLifecycleState +const ( + ListClustersLifecycleStateCreating ListClustersLifecycleStateEnum = "CREATING" + ListClustersLifecycleStateActive ListClustersLifecycleStateEnum = "ACTIVE" + ListClustersLifecycleStateFailed ListClustersLifecycleStateEnum = "FAILED" + ListClustersLifecycleStateDeleting ListClustersLifecycleStateEnum = "DELETING" + ListClustersLifecycleStateDeleted ListClustersLifecycleStateEnum = "DELETED" + ListClustersLifecycleStateUpdating ListClustersLifecycleStateEnum = "UPDATING" +) + +var mappingListClustersLifecycleState = map[string]ListClustersLifecycleStateEnum{ + "CREATING": ListClustersLifecycleStateCreating, + "ACTIVE": ListClustersLifecycleStateActive, + "FAILED": ListClustersLifecycleStateFailed, + "DELETING": ListClustersLifecycleStateDeleting, + "DELETED": ListClustersLifecycleStateDeleted, + "UPDATING": ListClustersLifecycleStateUpdating, +} + +// GetListClustersLifecycleStateEnumValues Enumerates the set of values for ListClustersLifecycleState +func GetListClustersLifecycleStateEnumValues() []ListClustersLifecycleStateEnum { + values := make([]ListClustersLifecycleStateEnum, 0) + for _, v := range mappingListClustersLifecycleState { + values = append(values, v) + } + return values +} + +// ListClustersSortOrderEnum Enum with underlying type: string +type ListClustersSortOrderEnum string + +// Set of constants representing the allowable values for ListClustersSortOrder +const ( + ListClustersSortOrderAsc ListClustersSortOrderEnum = "ASC" + ListClustersSortOrderDesc ListClustersSortOrderEnum = "DESC" +) + +var mappingListClustersSortOrder = map[string]ListClustersSortOrderEnum{ + "ASC": ListClustersSortOrderAsc, + "DESC": ListClustersSortOrderDesc, +} + +// GetListClustersSortOrderEnumValues Enumerates the set of values for ListClustersSortOrder +func GetListClustersSortOrderEnumValues() []ListClustersSortOrderEnum { + values := make([]ListClustersSortOrderEnum, 0) + for _, v := range mappingListClustersSortOrder { + values = append(values, v) + } + return values +} + +// ListClustersSortByEnum Enum with underlying type: string +type ListClustersSortByEnum string + +// Set of constants representing the allowable values for ListClustersSortBy +const ( + ListClustersSortById ListClustersSortByEnum = "ID" + ListClustersSortByName ListClustersSortByEnum = "NAME" + ListClustersSortByTimeCreated ListClustersSortByEnum = "TIME_CREATED" +) + +var mappingListClustersSortBy = map[string]ListClustersSortByEnum{ + "ID": ListClustersSortById, + "NAME": ListClustersSortByName, + "TIME_CREATED": ListClustersSortByTimeCreated, +} + +// GetListClustersSortByEnumValues Enumerates the set of values for ListClustersSortBy +func GetListClustersSortByEnumValues() []ListClustersSortByEnum { + values := make([]ListClustersSortByEnum, 0) + for _, v := range mappingListClustersSortBy { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go new file mode 100644 index 000000000..841513143 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go @@ -0,0 +1,132 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListNodePoolsRequest wrapper for the ListNodePools operation +type ListNodePoolsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"` + + // The name to filter on. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListNodePoolsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListNodePoolsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNodePoolsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNodePoolsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNodePoolsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListNodePoolsResponse wrapper for the ListNodePools operation +type ListNodePoolsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []NodePoolSummary instances + Items []NodePoolSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there might be additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListNodePoolsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNodePoolsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListNodePoolsSortOrderEnum Enum with underlying type: string +type ListNodePoolsSortOrderEnum string + +// Set of constants representing the allowable values for ListNodePoolsSortOrder +const ( + ListNodePoolsSortOrderAsc ListNodePoolsSortOrderEnum = "ASC" + ListNodePoolsSortOrderDesc ListNodePoolsSortOrderEnum = "DESC" +) + +var mappingListNodePoolsSortOrder = map[string]ListNodePoolsSortOrderEnum{ + "ASC": ListNodePoolsSortOrderAsc, + "DESC": ListNodePoolsSortOrderDesc, +} + +// GetListNodePoolsSortOrderEnumValues Enumerates the set of values for ListNodePoolsSortOrder +func GetListNodePoolsSortOrderEnumValues() []ListNodePoolsSortOrderEnum { + values := make([]ListNodePoolsSortOrderEnum, 0) + for _, v := range mappingListNodePoolsSortOrder { + values = append(values, v) + } + return values +} + +// ListNodePoolsSortByEnum Enum with underlying type: string +type ListNodePoolsSortByEnum string + +// Set of constants representing the allowable values for ListNodePoolsSortBy +const ( + ListNodePoolsSortById ListNodePoolsSortByEnum = "ID" + ListNodePoolsSortByName ListNodePoolsSortByEnum = "NAME" + ListNodePoolsSortByTimeCreated ListNodePoolsSortByEnum = "TIME_CREATED" +) + +var mappingListNodePoolsSortBy = map[string]ListNodePoolsSortByEnum{ + "ID": ListNodePoolsSortById, + "NAME": ListNodePoolsSortByName, + "TIME_CREATED": ListNodePoolsSortByTimeCreated, +} + +// GetListNodePoolsSortByEnumValues Enumerates the set of values for ListNodePoolsSortBy +func GetListNodePoolsSortByEnumValues() []ListNodePoolsSortByEnum { + values := make([]ListNodePoolsSortByEnum, 0) + for _, v := range mappingListNodePoolsSortBy { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go new file mode 100644 index 000000000..6cb11ab2d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestErrorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []WorkRequestError instance + Items []WorkRequestError `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestErrorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go new file mode 100644 index 000000000..790f68e36 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestLogsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []WorkRequestLogEntry instance + Items []WorkRequestLogEntry `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestLogsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go new file mode 100644 index 000000000..94dad0e19 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go @@ -0,0 +1,198 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +type ListWorkRequestsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"` + + // The OCID of the resource associated with a work request + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // Type of the resource associated with a work request + ResourceType ListWorkRequestsResourceTypeEnum `mandatory:"false" contributesTo:"query" name:"resourceType" omitEmpty:"true"` + + // A work request status to filter on. Can have multiple parameters of this name. + Status []ListWorkRequestsStatusEnum `contributesTo:"query" name:"status" omitEmpty:"true" collectionFormat:"multi"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []WorkRequestSummary instances + Items []WorkRequestSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there might be additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestsResourceTypeEnum Enum with underlying type: string +type ListWorkRequestsResourceTypeEnum string + +// Set of constants representing the allowable values for ListWorkRequestsResourceType +const ( + ListWorkRequestsResourceTypeCluster ListWorkRequestsResourceTypeEnum = "CLUSTER" + ListWorkRequestsResourceTypeNodepool ListWorkRequestsResourceTypeEnum = "NODEPOOL" +) + +var mappingListWorkRequestsResourceType = map[string]ListWorkRequestsResourceTypeEnum{ + "CLUSTER": ListWorkRequestsResourceTypeCluster, + "NODEPOOL": ListWorkRequestsResourceTypeNodepool, +} + +// GetListWorkRequestsResourceTypeEnumValues Enumerates the set of values for ListWorkRequestsResourceType +func GetListWorkRequestsResourceTypeEnumValues() []ListWorkRequestsResourceTypeEnum { + values := make([]ListWorkRequestsResourceTypeEnum, 0) + for _, v := range mappingListWorkRequestsResourceType { + values = append(values, v) + } + return values +} + +// ListWorkRequestsStatusEnum Enum with underlying type: string +type ListWorkRequestsStatusEnum string + +// Set of constants representing the allowable values for ListWorkRequestsStatus +const ( + ListWorkRequestsStatusAccepted ListWorkRequestsStatusEnum = "ACCEPTED" + ListWorkRequestsStatusInProgress ListWorkRequestsStatusEnum = "IN_PROGRESS" + ListWorkRequestsStatusFailed ListWorkRequestsStatusEnum = "FAILED" + ListWorkRequestsStatusSucceeded ListWorkRequestsStatusEnum = "SUCCEEDED" + ListWorkRequestsStatusCanceling ListWorkRequestsStatusEnum = "CANCELING" + ListWorkRequestsStatusCanceled ListWorkRequestsStatusEnum = "CANCELED" +) + +var mappingListWorkRequestsStatus = map[string]ListWorkRequestsStatusEnum{ + "ACCEPTED": ListWorkRequestsStatusAccepted, + "IN_PROGRESS": ListWorkRequestsStatusInProgress, + "FAILED": ListWorkRequestsStatusFailed, + "SUCCEEDED": ListWorkRequestsStatusSucceeded, + "CANCELING": ListWorkRequestsStatusCanceling, + "CANCELED": ListWorkRequestsStatusCanceled, +} + +// GetListWorkRequestsStatusEnumValues Enumerates the set of values for ListWorkRequestsStatus +func GetListWorkRequestsStatusEnumValues() []ListWorkRequestsStatusEnum { + values := make([]ListWorkRequestsStatusEnum, 0) + for _, v := range mappingListWorkRequestsStatus { + values = append(values, v) + } + return values +} + +// ListWorkRequestsSortOrderEnum Enum with underlying type: string +type ListWorkRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortOrder +const ( + ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC" + ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestsSortOrder = map[string]ListWorkRequestsSortOrderEnum{ + "ASC": ListWorkRequestsSortOrderAsc, + "DESC": ListWorkRequestsSortOrderDesc, +} + +// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrder +func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum { + values := make([]ListWorkRequestsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestsSortOrder { + values = append(values, v) + } + return values +} + +// ListWorkRequestsSortByEnum Enum with underlying type: string +type ListWorkRequestsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortBy +const ( + ListWorkRequestsSortById ListWorkRequestsSortByEnum = "ID" + ListWorkRequestsSortByOperationType ListWorkRequestsSortByEnum = "OPERATION_TYPE" + ListWorkRequestsSortByStatus ListWorkRequestsSortByEnum = "STATUS" + ListWorkRequestsSortByTimeAccepted ListWorkRequestsSortByEnum = "TIME_ACCEPTED" + ListWorkRequestsSortByTimeStarted ListWorkRequestsSortByEnum = "TIME_STARTED" + ListWorkRequestsSortByTimeFinished ListWorkRequestsSortByEnum = "TIME_FINISHED" +) + +var mappingListWorkRequestsSortBy = map[string]ListWorkRequestsSortByEnum{ + "ID": ListWorkRequestsSortById, + "OPERATION_TYPE": ListWorkRequestsSortByOperationType, + "STATUS": ListWorkRequestsSortByStatus, + "TIME_ACCEPTED": ListWorkRequestsSortByTimeAccepted, + "TIME_STARTED": ListWorkRequestsSortByTimeStarted, + "TIME_FINISHED": ListWorkRequestsSortByTimeFinished, +} + +// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortBy +func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum { + values := make([]ListWorkRequestsSortByEnum, 0) + for _, v := range mappingListWorkRequestsSortBy { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node.go new file mode 100644 index 000000000..48d475de7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/node.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Node The properties that define a node. +type Node struct { + + // The OCID of the compute instance backing this node. + Id *string `mandatory:"false" json:"id"` + + // The name of the node. + Name *string `mandatory:"false" json:"name"` + + // The name of the availability domain in which this node is placed. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the subnet in which this node is placed. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // The OCID of the node pool to which this node belongs. + NodePoolId *string `mandatory:"false" json:"nodePoolId"` + + // The public IP address of this node. + PublicIp *string `mandatory:"false" json:"publicIp"` + + // An error that may be associated with the node. + NodeError *NodeError `mandatory:"false" json:"nodeError"` + + // The state of the node. + LifecycleState NodeLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the node. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` +} + +func (m Node) String() string { + return common.PointerString(m) +} + +// NodeLifecycleStateEnum Enum with underlying type: string +type NodeLifecycleStateEnum string + +// Set of constants representing the allowable values for NodeLifecycleState +const ( + NodeLifecycleStateCreating NodeLifecycleStateEnum = "CREATING" + NodeLifecycleStateActive NodeLifecycleStateEnum = "ACTIVE" + NodeLifecycleStateUpdating NodeLifecycleStateEnum = "UPDATING" + NodeLifecycleStateDeleting NodeLifecycleStateEnum = "DELETING" + NodeLifecycleStateDeleted NodeLifecycleStateEnum = "DELETED" + NodeLifecycleStateFailing NodeLifecycleStateEnum = "FAILING" + NodeLifecycleStateInactive NodeLifecycleStateEnum = "INACTIVE" +) + +var mappingNodeLifecycleState = map[string]NodeLifecycleStateEnum{ + "CREATING": NodeLifecycleStateCreating, + "ACTIVE": NodeLifecycleStateActive, + "UPDATING": NodeLifecycleStateUpdating, + "DELETING": NodeLifecycleStateDeleting, + "DELETED": NodeLifecycleStateDeleted, + "FAILING": NodeLifecycleStateFailing, + "INACTIVE": NodeLifecycleStateInactive, +} + +// GetNodeLifecycleStateEnumValues Enumerates the set of values for NodeLifecycleState +func GetNodeLifecycleStateEnumValues() []NodeLifecycleStateEnum { + values := make([]NodeLifecycleStateEnum, 0) + for _, v := range mappingNodeLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go new file mode 100644 index 000000000..704d04234 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// NodeError The properties that define an upstream error while managing a node. +type NodeError struct { + + // A short error code that defines the upstream error, meant for programmatic parsing. See API Errors (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm). + Code *string `mandatory:"true" json:"code"` + + // A human-readable error string of the upstream error. + Message *string `mandatory:"true" json:"message"` + + // The status of the HTTP response encountered in the upstream error. + Status *string `mandatory:"false" json:"status"` + + // Unique Oracle-assigned identifier for the upstream request. If you need to contact Oracle about a particular upstream request, please provide the request ID. + OpcRequestId *string `mandatory:"false" json:"opc-request-id"` +} + +func (m NodeError) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go new file mode 100644 index 000000000..68b5c5b71 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// NodePool A pool of compute nodes attached to a cluster. +type NodePool struct { + + // The OCID of the node pool. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the compartment in which the node pool exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the cluster to which this node pool is attached. + ClusterId *string `mandatory:"false" json:"clusterId"` + + // The name of the node pool. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes running on the nodes in the node pool. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // The OCID of the image running on the nodes in the node pool. + NodeImageId *string `mandatory:"false" json:"nodeImageId"` + + // The name of the image running on the nodes in the node pool. + NodeImageName *string `mandatory:"false" json:"nodeImageName"` + + // The name of the node shape of the nodes in the node pool. + NodeShape *string `mandatory:"false" json:"nodeShape"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The SSH public key on each node in the node pool. + SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` + + // The number of nodes in each subnet. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` + + // The OCIDs of the subnets in which to place nodes for this node pool. + SubnetIds []string `mandatory:"false" json:"subnetIds"` + + // The nodes in the node pool. + Nodes []Node `mandatory:"false" json:"nodes"` +} + +func (m NodePool) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go new file mode 100644 index 000000000..4d146fb23 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// NodePoolOptions Options for creating or updating node pools. +type NodePoolOptions struct { + + // Available Kubernetes versions. + KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"` + + // Available Kubernetes versions. + Images []string `mandatory:"false" json:"images"` + + // Available shapes for nodes. + Shapes []string `mandatory:"false" json:"shapes"` +} + +func (m NodePoolOptions) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go new file mode 100644 index 000000000..bee7d798b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// NodePoolSummary The properties that define a node pool summary. +type NodePoolSummary struct { + + // The OCID of the node pool. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the compartment in which the node pool exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the cluster to which this node pool is attached. + ClusterId *string `mandatory:"false" json:"clusterId"` + + // The name of the node pool. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes running on the nodes in the node pool. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // The OCID of the image running on the nodes in the node pool. + NodeImageId *string `mandatory:"false" json:"nodeImageId"` + + // The name of the image running on the nodes in the node pool. + NodeImageName *string `mandatory:"false" json:"nodeImageName"` + + // The name of the node shape of the nodes in the node pool. + NodeShape *string `mandatory:"false" json:"nodeShape"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The SSH public key on each node in the node pool. + SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` + + // The number of nodes in each subnet. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` + + // The OCIDs of the subnets in which to place nodes for this node pool. + SubnetIds []string `mandatory:"false" json:"subnetIds"` +} + +func (m NodePoolSummary) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go new file mode 100644 index 000000000..30cdc63ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go @@ -0,0 +1,21 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SortOrder The sort order for a list operation. +type SortOrder struct { +} + +func (m SortOrder) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go new file mode 100644 index 000000000..5598f45f3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateClusterDetails The properties that define a request to update a cluster. +type UpdateClusterDetails struct { + + // The new name for the cluster. Avoid entering confidential information. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes to which the cluster masters should be upgraded. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` +} + +func (m UpdateClusterDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go new file mode 100644 index 000000000..9931fa03b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateClusterRequest wrapper for the UpdateCluster operation +type UpdateClusterRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details of the cluster to update. + UpdateClusterDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateClusterRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateClusterResponse wrapper for the UpdateCluster operation +type UpdateClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go new file mode 100644 index 000000000..cb0c4a3d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateNodePoolDetails The properties that define a request to update a node pool. +type UpdateNodePoolDetails struct { + + // The new name for the cluster. Avoid entering confidential information. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes to which the nodes in the node pool should be upgraded. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // The number of nodes to ensure in each subnet. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The OCIDs of the subnets in which to place nodes for this node pool. + SubnetIds []string `mandatory:"false" json:"subnetIds"` +} + +func (m UpdateNodePoolDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go new file mode 100644 index 000000000..689f57613 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateNodePoolRequest wrapper for the UpdateNodePool operation +type UpdateNodePoolRequest struct { + + // The OCID of the node pool. + NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` + + // The fields to update in a node pool. + UpdateNodePoolDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateNodePoolResponse wrapper for the UpdateNodePool operation +type UpdateNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go new file mode 100644 index 000000000..646db5339 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequest An asynchronous work request. +type WorkRequest struct { + + // The OCID of the work request. + Id *string `mandatory:"false" json:"id"` + + // The type of work the work request is doing. + OperationType WorkRequestOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` + + // The current status of the work request. + Status WorkRequestStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The OCID of the compartment in which the work request exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The resources this work request affects. + Resources []WorkRequestResource `mandatory:"false" json:"resources"` + + // The time the work request was accepted. + TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` + + // The time the work request was started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the work request was finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequest) String() string { + return common.PointerString(m) +} + +// WorkRequestOperationTypeEnum Enum with underlying type: string +type WorkRequestOperationTypeEnum string + +// Set of constants representing the allowable values for WorkRequestOperationType +const ( + WorkRequestOperationTypeClusterCreate WorkRequestOperationTypeEnum = "CLUSTER_CREATE" + WorkRequestOperationTypeClusterUpdate WorkRequestOperationTypeEnum = "CLUSTER_UPDATE" + WorkRequestOperationTypeClusterDelete WorkRequestOperationTypeEnum = "CLUSTER_DELETE" + WorkRequestOperationTypeNodepoolCreate WorkRequestOperationTypeEnum = "NODEPOOL_CREATE" + WorkRequestOperationTypeNodepoolUpdate WorkRequestOperationTypeEnum = "NODEPOOL_UPDATE" + WorkRequestOperationTypeNodepoolDelete WorkRequestOperationTypeEnum = "NODEPOOL_DELETE" + WorkRequestOperationTypeWorkrequestCancel WorkRequestOperationTypeEnum = "WORKREQUEST_CANCEL" +) + +var mappingWorkRequestOperationType = map[string]WorkRequestOperationTypeEnum{ + "CLUSTER_CREATE": WorkRequestOperationTypeClusterCreate, + "CLUSTER_UPDATE": WorkRequestOperationTypeClusterUpdate, + "CLUSTER_DELETE": WorkRequestOperationTypeClusterDelete, + "NODEPOOL_CREATE": WorkRequestOperationTypeNodepoolCreate, + "NODEPOOL_UPDATE": WorkRequestOperationTypeNodepoolUpdate, + "NODEPOOL_DELETE": WorkRequestOperationTypeNodepoolDelete, + "WORKREQUEST_CANCEL": WorkRequestOperationTypeWorkrequestCancel, +} + +// GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationType +func GetWorkRequestOperationTypeEnumValues() []WorkRequestOperationTypeEnum { + values := make([]WorkRequestOperationTypeEnum, 0) + for _, v := range mappingWorkRequestOperationType { + values = append(values, v) + } + return values +} + +// WorkRequestStatusEnum Enum with underlying type: string +type WorkRequestStatusEnum string + +// Set of constants representing the allowable values for WorkRequestStatus +const ( + WorkRequestStatusAccepted WorkRequestStatusEnum = "ACCEPTED" + WorkRequestStatusInProgress WorkRequestStatusEnum = "IN_PROGRESS" + WorkRequestStatusFailed WorkRequestStatusEnum = "FAILED" + WorkRequestStatusSucceeded WorkRequestStatusEnum = "SUCCEEDED" + WorkRequestStatusCanceling WorkRequestStatusEnum = "CANCELING" + WorkRequestStatusCanceled WorkRequestStatusEnum = "CANCELED" +) + +var mappingWorkRequestStatus = map[string]WorkRequestStatusEnum{ + "ACCEPTED": WorkRequestStatusAccepted, + "IN_PROGRESS": WorkRequestStatusInProgress, + "FAILED": WorkRequestStatusFailed, + "SUCCEEDED": WorkRequestStatusSucceeded, + "CANCELING": WorkRequestStatusCanceling, + "CANCELED": WorkRequestStatusCanceled, +} + +// GetWorkRequestStatusEnumValues Enumerates the set of values for WorkRequestStatus +func GetWorkRequestStatusEnumValues() []WorkRequestStatusEnum { + values := make([]WorkRequestStatusEnum, 0) + for _, v := range mappingWorkRequestStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go new file mode 100644 index 000000000..1fc7932f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequestError Errors related to a specific work request. +type WorkRequestError struct { + + // A short error code that defines the error, meant for programmatic parsing. See API Errors (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm). + Code *string `mandatory:"true" json:"code"` + + // A human-readable error string. + Message *string `mandatory:"true" json:"message"` + + // The date and time the error occurred. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestError) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go new file mode 100644 index 000000000..390e6d572 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequestLogEntry Log entries related to a specific work request. +type WorkRequestLogEntry struct { + + // The description of an action that occurred. + Message *string `mandatory:"false" json:"message"` + + // The date and time the log entry occurred. + Timestamp *string `mandatory:"false" json:"timestamp"` +} + +func (m WorkRequestLogEntry) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go new file mode 100644 index 000000000..e6e4c6911 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go @@ -0,0 +1,21 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequestOperationType The types of work request operations. +type WorkRequestOperationType struct { +} + +func (m WorkRequestOperationType) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go new file mode 100644 index 000000000..2fe128211 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequestResource The properties that define a work request resource. +type WorkRequestResource struct { + + // The way in which this resource was affected by the work tracked by the work request. + ActionType WorkRequestResourceActionTypeEnum `mandatory:"false" json:"actionType,omitempty"` + + // The resource type the work request affects. + EntityType *string `mandatory:"false" json:"entityType"` + + // The OCID of the resource the work request affects. + Identifier *string `mandatory:"false" json:"identifier"` + + // The URI path on which the user can issue a GET request to access the resource metadata. + EntityUri *string `mandatory:"false" json:"entityUri"` +} + +func (m WorkRequestResource) String() string { + return common.PointerString(m) +} + +// WorkRequestResourceActionTypeEnum Enum with underlying type: string +type WorkRequestResourceActionTypeEnum string + +// Set of constants representing the allowable values for WorkRequestResourceActionType +const ( + WorkRequestResourceActionTypeCreated WorkRequestResourceActionTypeEnum = "CREATED" + WorkRequestResourceActionTypeUpdated WorkRequestResourceActionTypeEnum = "UPDATED" + WorkRequestResourceActionTypeDeleted WorkRequestResourceActionTypeEnum = "DELETED" + WorkRequestResourceActionTypeRelated WorkRequestResourceActionTypeEnum = "RELATED" + WorkRequestResourceActionTypeInProgress WorkRequestResourceActionTypeEnum = "IN_PROGRESS" + WorkRequestResourceActionTypeFailed WorkRequestResourceActionTypeEnum = "FAILED" +) + +var mappingWorkRequestResourceActionType = map[string]WorkRequestResourceActionTypeEnum{ + "CREATED": WorkRequestResourceActionTypeCreated, + "UPDATED": WorkRequestResourceActionTypeUpdated, + "DELETED": WorkRequestResourceActionTypeDeleted, + "RELATED": WorkRequestResourceActionTypeRelated, + "IN_PROGRESS": WorkRequestResourceActionTypeInProgress, + "FAILED": WorkRequestResourceActionTypeFailed, +} + +// GetWorkRequestResourceActionTypeEnumValues Enumerates the set of values for WorkRequestResourceActionType +func GetWorkRequestResourceActionTypeEnumValues() []WorkRequestResourceActionTypeEnum { + values := make([]WorkRequestResourceActionTypeEnum, 0) + for _, v := range mappingWorkRequestResourceActionType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go new file mode 100644 index 000000000..0b2ccb2b3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go @@ -0,0 +1,21 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequestStatus The status of a work request. +type WorkRequestStatus struct { +} + +func (m WorkRequestStatus) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go new file mode 100644 index 000000000..35f82768a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// Container Engine for Kubernetes API +// + +package containerengine + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequestSummary The properties that define a work request summary. +type WorkRequestSummary struct { + + // The OCID of the work request. + Id *string `mandatory:"false" json:"id"` + + // The type of work the work request is doing. + OperationType WorkRequestSummaryOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` + + // The current status of the work request. + Status WorkRequestSummaryStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The OCID of the compartment in which the work request exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The resources this work request affects. + Resources []WorkRequestResource `mandatory:"false" json:"resources"` + + // The time the work request was accepted. + TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` + + // The time the work request was started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the work request was finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequestSummary) String() string { + return common.PointerString(m) +} + +// WorkRequestSummaryOperationTypeEnum Enum with underlying type: string +type WorkRequestSummaryOperationTypeEnum string + +// Set of constants representing the allowable values for WorkRequestSummaryOperationType +const ( + WorkRequestSummaryOperationTypeClusterCreate WorkRequestSummaryOperationTypeEnum = "CLUSTER_CREATE" + WorkRequestSummaryOperationTypeClusterUpdate WorkRequestSummaryOperationTypeEnum = "CLUSTER_UPDATE" + WorkRequestSummaryOperationTypeClusterDelete WorkRequestSummaryOperationTypeEnum = "CLUSTER_DELETE" + WorkRequestSummaryOperationTypeNodepoolCreate WorkRequestSummaryOperationTypeEnum = "NODEPOOL_CREATE" + WorkRequestSummaryOperationTypeNodepoolUpdate WorkRequestSummaryOperationTypeEnum = "NODEPOOL_UPDATE" + WorkRequestSummaryOperationTypeNodepoolDelete WorkRequestSummaryOperationTypeEnum = "NODEPOOL_DELETE" + WorkRequestSummaryOperationTypeWorkrequestCancel WorkRequestSummaryOperationTypeEnum = "WORKREQUEST_CANCEL" +) + +var mappingWorkRequestSummaryOperationType = map[string]WorkRequestSummaryOperationTypeEnum{ + "CLUSTER_CREATE": WorkRequestSummaryOperationTypeClusterCreate, + "CLUSTER_UPDATE": WorkRequestSummaryOperationTypeClusterUpdate, + "CLUSTER_DELETE": WorkRequestSummaryOperationTypeClusterDelete, + "NODEPOOL_CREATE": WorkRequestSummaryOperationTypeNodepoolCreate, + "NODEPOOL_UPDATE": WorkRequestSummaryOperationTypeNodepoolUpdate, + "NODEPOOL_DELETE": WorkRequestSummaryOperationTypeNodepoolDelete, + "WORKREQUEST_CANCEL": WorkRequestSummaryOperationTypeWorkrequestCancel, +} + +// GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestSummaryOperationType +func GetWorkRequestSummaryOperationTypeEnumValues() []WorkRequestSummaryOperationTypeEnum { + values := make([]WorkRequestSummaryOperationTypeEnum, 0) + for _, v := range mappingWorkRequestSummaryOperationType { + values = append(values, v) + } + return values +} + +// WorkRequestSummaryStatusEnum Enum with underlying type: string +type WorkRequestSummaryStatusEnum string + +// Set of constants representing the allowable values for WorkRequestSummaryStatus +const ( + WorkRequestSummaryStatusAccepted WorkRequestSummaryStatusEnum = "ACCEPTED" + WorkRequestSummaryStatusInProgress WorkRequestSummaryStatusEnum = "IN_PROGRESS" + WorkRequestSummaryStatusFailed WorkRequestSummaryStatusEnum = "FAILED" + WorkRequestSummaryStatusSucceeded WorkRequestSummaryStatusEnum = "SUCCEEDED" + WorkRequestSummaryStatusCanceling WorkRequestSummaryStatusEnum = "CANCELING" + WorkRequestSummaryStatusCanceled WorkRequestSummaryStatusEnum = "CANCELED" +) + +var mappingWorkRequestSummaryStatus = map[string]WorkRequestSummaryStatusEnum{ + "ACCEPTED": WorkRequestSummaryStatusAccepted, + "IN_PROGRESS": WorkRequestSummaryStatusInProgress, + "FAILED": WorkRequestSummaryStatusFailed, + "SUCCEEDED": WorkRequestSummaryStatusSucceeded, + "CANCELING": WorkRequestSummaryStatusCanceling, + "CANCELED": WorkRequestSummaryStatusCanceled, +} + +// GetWorkRequestSummaryStatusEnumValues Enumerates the set of values for WorkRequestSummaryStatus +func GetWorkRequestSummaryStatusEnumValues() []WorkRequestSummaryStatusEnum { + values := make([]WorkRequestSummaryStatusEnum, 0) + for _, v := range mappingWorkRequestSummaryStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go index f52a01930..2351fbdba 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go @@ -20,12 +20,30 @@ type AttachBootVolumeRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request AttachBootVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request AttachBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // AttachBootVolumeResponse wrapper for the AttachBootVolume operation type AttachBootVolumeResponse struct { @@ -46,3 +64,8 @@ type AttachBootVolumeResponse struct { func (response AttachBootVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response AttachBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_i_scsi_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_i_scsi_volume_details.go index 827108d2f..aef264dab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/attach_i_scsi_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_i_scsi_volume_details.go @@ -25,6 +25,9 @@ type AttachIScsiVolumeDetails struct { // A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + // Whether to use CHAP authentication for the volume attachment. Defaults to false. UseChap *bool `mandatory:"false" json:"useChap"` } @@ -39,6 +42,11 @@ func (m AttachIScsiVolumeDetails) GetInstanceId() *string { return m.InstanceId } +//GetIsReadOnly returns IsReadOnly +func (m AttachIScsiVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + //GetVolumeId returns VolumeId func (m AttachIScsiVolumeDetails) GetVolumeId() *string { return m.VolumeId diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_paravirtualized_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_paravirtualized_volume_details.go new file mode 100644 index 000000000..e5ab65e74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_paravirtualized_volume_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// AttachParavirtualizedVolumeDetails The representation of AttachParavirtualizedVolumeDetails +type AttachParavirtualizedVolumeDetails struct { + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the volume. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` +} + +//GetDisplayName returns DisplayName +func (m AttachParavirtualizedVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetInstanceId returns InstanceId +func (m AttachParavirtualizedVolumeDetails) GetInstanceId() *string { + return m.InstanceId +} + +//GetIsReadOnly returns IsReadOnly +func (m AttachParavirtualizedVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +//GetVolumeId returns VolumeId +func (m AttachParavirtualizedVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +func (m AttachParavirtualizedVolumeDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m AttachParavirtualizedVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAttachParavirtualizedVolumeDetails AttachParavirtualizedVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAttachParavirtualizedVolumeDetails + }{ + "paravirtualized", + (MarshalTypeAttachParavirtualizedVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_service_id_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_service_id_request_response.go new file mode 100644 index 000000000..a84a47e3d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_service_id_request_response.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// AttachServiceIdRequest wrapper for the AttachServiceId operation +type AttachServiceIdRequest struct { + + // The service gateway's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // ServiceId of Service to be attached to a Service Gateway. + AttachServiceDetails ServiceIdRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachServiceIdRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachServiceIdRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachServiceIdRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// AttachServiceIdResponse wrapper for the AttachServiceId operation +type AttachServiceIdResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AttachServiceIdResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachServiceIdResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_request_response.go index 3f04c241a..728c6b039 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_request_response.go @@ -20,12 +20,30 @@ type AttachVnicRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request AttachVnicRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request AttachVnicRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // AttachVnicResponse wrapper for the AttachVnic operation type AttachVnicResponse struct { @@ -46,3 +64,8 @@ type AttachVnicResponse struct { func (response AttachVnicResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response AttachVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_details.go index 414fc9c3a..81a2efe97 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_details.go @@ -24,6 +24,9 @@ type AttachVolumeDetails interface { // A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. GetDisplayName() *string + + // Whether the attachment was created in read-only mode. + GetIsReadOnly() *bool } type attachvolumedetails struct { @@ -31,6 +34,7 @@ type attachvolumedetails struct { InstanceId *string `mandatory:"true" json:"instanceId"` VolumeId *string `mandatory:"true" json:"volumeId"` DisplayName *string `mandatory:"false" json:"displayName"` + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` Type string `json:"type"` } @@ -48,6 +52,7 @@ func (m *attachvolumedetails) UnmarshalJSON(data []byte) error { m.InstanceId = s.Model.InstanceId m.VolumeId = s.Model.VolumeId m.DisplayName = s.Model.DisplayName + m.IsReadOnly = s.Model.IsReadOnly m.Type = s.Model.Type return err @@ -61,6 +66,10 @@ func (m *attachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{} mm := AttachIScsiVolumeDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "paravirtualized": + mm := AttachParavirtualizedVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: return m, nil } @@ -81,6 +90,11 @@ func (m attachvolumedetails) GetDisplayName() *string { return m.DisplayName } +//GetIsReadOnly returns IsReadOnly +func (m attachvolumedetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + func (m attachvolumedetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_request_response.go index d2f7076f8..3c87601ae 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_request_response.go @@ -20,12 +20,30 @@ type AttachVolumeRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request AttachVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request AttachVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // AttachVolumeResponse wrapper for the AttachVolume operation type AttachVolumeResponse struct { @@ -46,3 +64,8 @@ type AttachVolumeResponse struct { func (response AttachVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response AttachVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume.go b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume.go index 1f57aca45..aaba6f66c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume.go @@ -9,10 +9,11 @@ package core import ( + "encoding/json" "github.com/oracle/oci-go-sdk/common" ) -// BootVolume A detachable boot volume device that contains the image used to boot an Compute instance. For more information, see +// BootVolume A detachable boot volume device that contains the image used to boot a Compute instance. For more information, see // Overview of Boot Volumes (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumes.htm). // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, // talk to an administrator. If you're an administrator who needs to write policies to give users access, see @@ -39,21 +40,86 @@ type BootVolume struct { // The date and time the boot volume was created. Format defined by RFC3339. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The image OCID used to create the boot volume. ImageId *string `mandatory:"false" json:"imageId"` + // Specifies whether the boot volume's data has finished copying from the source boot volume or boot volume backup. + IsHydrated *bool `mandatory:"false" json:"isHydrated"` + // The size of the boot volume in GBs. SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` + + // The boot volume source, either an existing boot volume in the same Availability Domain or a boot volume backup. + // If null, this means that the boot volume was created from an image. + SourceDetails BootVolumeSourceDetails `mandatory:"false" json:"sourceDetails"` + + // The OCID of the source volume group. + VolumeGroupId *string `mandatory:"false" json:"volumeGroupId"` } func (m BootVolume) String() string { return common.PointerString(m) } +// UnmarshalJSON unmarshals from json +func (m *BootVolume) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + ImageId *string `json:"imageId"` + IsHydrated *bool `json:"isHydrated"` + SizeInGBs *int `json:"sizeInGBs"` + SourceDetails bootvolumesourcedetails `json:"sourceDetails"` + VolumeGroupId *string `json:"volumeGroupId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState BootVolumeLifecycleStateEnum `json:"lifecycleState"` + SizeInMBs *int `json:"sizeInMBs"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DefinedTags = model.DefinedTags + m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags + m.ImageId = model.ImageId + m.IsHydrated = model.IsHydrated + m.SizeInGBs = model.SizeInGBs + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn.(BootVolumeSourceDetails) + m.VolumeGroupId = model.VolumeGroupId + m.AvailabilityDomain = model.AvailabilityDomain + m.CompartmentId = model.CompartmentId + m.Id = model.Id + m.LifecycleState = model.LifecycleState + m.SizeInMBs = model.SizeInMBs + m.TimeCreated = model.TimeCreated + return +} + // BootVolumeLifecycleStateEnum Enum with underlying type: string type BootVolumeLifecycleStateEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_backup.go b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_backup.go new file mode 100644 index 000000000..19b1e9623 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_backup.go @@ -0,0 +1,161 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BootVolumeBackup A point-in-time copy of a boot volume that can then be used to create +// a new boot volume or recover a boot volume. For more information, see Overview +// of Boot Volume Backups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumebackups.htm) +// To use any of the API operations, you must be authorized in an IAM policy. +// If you're not authorized, talk to an administrator. If you're an administrator +// who needs to write policies to give users access, see Getting Started with +// Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type BootVolumeBackup struct { + + // The OCID of the compartment that contains the boot volume backup. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name for the boot volume backup. Does not have to be unique and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the boot volume backup. + Id *string `mandatory:"true" json:"id"` + + // The current state of a boot volume backup. + LifecycleState BootVolumeBackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the boot volume backup was created. This is the time the actual point-in-time image + // of the volume data was taken. Format defined by RFC3339. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"false" json:"bootVolumeId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The date and time the volume backup will expire and be automatically deleted. + // Format defined by RFC3339. This parameter will always be present for backups that + // were created automatically by a scheduled-backup policy. For manually created backups, + // it will be absent, signifying that there is no expiration time and the backup will + // last forever until manually deleted. + ExpirationTime *common.SDKTime `mandatory:"false" json:"expirationTime"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The image OCID used to create the boot volume the backup is taken from. + ImageId *string `mandatory:"false" json:"imageId"` + + // The size of the boot volume, in GBs. + SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` + + // Specifies whether the backup was created manually, or via scheduled backup policy. + SourceType BootVolumeBackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // The date and time the request to create the boot volume backup was received. Format defined by RFC3339. + TimeRequestReceived *common.SDKTime `mandatory:"false" json:"timeRequestReceived"` + + // The type of a volume backup. + Type BootVolumeBackupTypeEnum `mandatory:"false" json:"type,omitempty"` + + // The size used by the backup, in GBs. It is typically smaller than sizeInGBs, depending on the space + // consumed on the boot volume and whether the backup is full or incremental. + UniqueSizeInGBs *int `mandatory:"false" json:"uniqueSizeInGBs"` +} + +func (m BootVolumeBackup) String() string { + return common.PointerString(m) +} + +// BootVolumeBackupLifecycleStateEnum Enum with underlying type: string +type BootVolumeBackupLifecycleStateEnum string + +// Set of constants representing the allowable values for BootVolumeBackupLifecycleState +const ( + BootVolumeBackupLifecycleStateCreating BootVolumeBackupLifecycleStateEnum = "CREATING" + BootVolumeBackupLifecycleStateAvailable BootVolumeBackupLifecycleStateEnum = "AVAILABLE" + BootVolumeBackupLifecycleStateTerminating BootVolumeBackupLifecycleStateEnum = "TERMINATING" + BootVolumeBackupLifecycleStateTerminated BootVolumeBackupLifecycleStateEnum = "TERMINATED" + BootVolumeBackupLifecycleStateFaulty BootVolumeBackupLifecycleStateEnum = "FAULTY" + BootVolumeBackupLifecycleStateRequestReceived BootVolumeBackupLifecycleStateEnum = "REQUEST_RECEIVED" +) + +var mappingBootVolumeBackupLifecycleState = map[string]BootVolumeBackupLifecycleStateEnum{ + "CREATING": BootVolumeBackupLifecycleStateCreating, + "AVAILABLE": BootVolumeBackupLifecycleStateAvailable, + "TERMINATING": BootVolumeBackupLifecycleStateTerminating, + "TERMINATED": BootVolumeBackupLifecycleStateTerminated, + "FAULTY": BootVolumeBackupLifecycleStateFaulty, + "REQUEST_RECEIVED": BootVolumeBackupLifecycleStateRequestReceived, +} + +// GetBootVolumeBackupLifecycleStateEnumValues Enumerates the set of values for BootVolumeBackupLifecycleState +func GetBootVolumeBackupLifecycleStateEnumValues() []BootVolumeBackupLifecycleStateEnum { + values := make([]BootVolumeBackupLifecycleStateEnum, 0) + for _, v := range mappingBootVolumeBackupLifecycleState { + values = append(values, v) + } + return values +} + +// BootVolumeBackupSourceTypeEnum Enum with underlying type: string +type BootVolumeBackupSourceTypeEnum string + +// Set of constants representing the allowable values for BootVolumeBackupSourceType +const ( + BootVolumeBackupSourceTypeManual BootVolumeBackupSourceTypeEnum = "MANUAL" + BootVolumeBackupSourceTypeScheduled BootVolumeBackupSourceTypeEnum = "SCHEDULED" +) + +var mappingBootVolumeBackupSourceType = map[string]BootVolumeBackupSourceTypeEnum{ + "MANUAL": BootVolumeBackupSourceTypeManual, + "SCHEDULED": BootVolumeBackupSourceTypeScheduled, +} + +// GetBootVolumeBackupSourceTypeEnumValues Enumerates the set of values for BootVolumeBackupSourceType +func GetBootVolumeBackupSourceTypeEnumValues() []BootVolumeBackupSourceTypeEnum { + values := make([]BootVolumeBackupSourceTypeEnum, 0) + for _, v := range mappingBootVolumeBackupSourceType { + values = append(values, v) + } + return values +} + +// BootVolumeBackupTypeEnum Enum with underlying type: string +type BootVolumeBackupTypeEnum string + +// Set of constants representing the allowable values for BootVolumeBackupType +const ( + BootVolumeBackupTypeFull BootVolumeBackupTypeEnum = "FULL" + BootVolumeBackupTypeIncremental BootVolumeBackupTypeEnum = "INCREMENTAL" +) + +var mappingBootVolumeBackupType = map[string]BootVolumeBackupTypeEnum{ + "FULL": BootVolumeBackupTypeFull, + "INCREMENTAL": BootVolumeBackupTypeIncremental, +} + +// GetBootVolumeBackupTypeEnumValues Enumerates the set of values for BootVolumeBackupType +func GetBootVolumeBackupTypeEnumValues() []BootVolumeBackupTypeEnum { + values := make([]BootVolumeBackupTypeEnum, 0) + for _, v := range mappingBootVolumeBackupType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_details.go b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_details.go new file mode 100644 index 000000000..34fee3502 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// BootVolumeSourceDetails The representation of BootVolumeSourceDetails +type BootVolumeSourceDetails interface { +} + +type bootvolumesourcedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *bootvolumesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerbootvolumesourcedetails bootvolumesourcedetails + s := struct { + Model Unmarshalerbootvolumesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *bootvolumesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Type { + case "bootVolumeBackup": + mm := BootVolumeSourceFromBootVolumeBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "bootVolume": + mm := BootVolumeSourceFromBootVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +func (m bootvolumesourcedetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_backup_details.go new file mode 100644 index 000000000..850f8b084 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_backup_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// BootVolumeSourceFromBootVolumeBackupDetails Specifies the boot volume backup. +type BootVolumeSourceFromBootVolumeBackupDetails struct { + + // The OCID of the boot volume backup. + Id *string `mandatory:"true" json:"id"` +} + +func (m BootVolumeSourceFromBootVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m BootVolumeSourceFromBootVolumeBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails BootVolumeSourceFromBootVolumeBackupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails + }{ + "bootVolumeBackup", + (MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_details.go new file mode 100644 index 000000000..145d5e521 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// BootVolumeSourceFromBootVolumeDetails Specifies the source boot volume. +type BootVolumeSourceFromBootVolumeDetails struct { + + // The OCID of the boot volume. + Id *string `mandatory:"true" json:"id"` +} + +func (m BootVolumeSourceFromBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m BootVolumeSourceFromBootVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBootVolumeSourceFromBootVolumeDetails BootVolumeSourceFromBootVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeBootVolumeSourceFromBootVolumeDetails + }{ + "bootVolume", + (MarshalTypeBootVolumeSourceFromBootVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_request_response.go index 749adc891..48d203781 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_request_response.go @@ -16,12 +16,30 @@ type BulkAddVirtualCircuitPublicPrefixesRequest struct { // Request with publix prefixes to be added to the virtual circuit BulkAddVirtualCircuitPublicPrefixesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request BulkAddVirtualCircuitPublicPrefixesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request BulkAddVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkAddVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // BulkAddVirtualCircuitPublicPrefixesResponse wrapper for the BulkAddVirtualCircuitPublicPrefixes operation type BulkAddVirtualCircuitPublicPrefixesResponse struct { @@ -32,3 +50,8 @@ type BulkAddVirtualCircuitPublicPrefixesResponse struct { func (response BulkAddVirtualCircuitPublicPrefixesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response BulkAddVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go index a57afa64e..7909fa047 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go @@ -16,12 +16,30 @@ type BulkDeleteVirtualCircuitPublicPrefixesRequest struct { // Request with publix prefixes to be deleted from the virtual circuit BulkDeleteVirtualCircuitPublicPrefixesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // BulkDeleteVirtualCircuitPublicPrefixesResponse wrapper for the BulkDeleteVirtualCircuitPublicPrefixes operation type BulkDeleteVirtualCircuitPublicPrefixesResponse struct { @@ -32,3 +50,8 @@ type BulkDeleteVirtualCircuitPublicPrefixesResponse struct { func (response BulkDeleteVirtualCircuitPublicPrefixesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response BulkDeleteVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_details.go b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_details.go index 9fb153ec6..e2c0fd248 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_details.go @@ -18,8 +18,19 @@ type CaptureConsoleHistoryDetails struct { // The OCID of the instance to get the console history from. InstanceId *string `mandatory:"true" json:"instanceId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CaptureConsoleHistoryDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go index 8e2919b70..071717103 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go @@ -20,12 +20,30 @@ type CaptureConsoleHistoryRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CaptureConsoleHistoryRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CaptureConsoleHistoryRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CaptureConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CaptureConsoleHistoryResponse wrapper for the CaptureConsoleHistory operation type CaptureConsoleHistoryResponse struct { @@ -46,3 +64,8 @@ type CaptureConsoleHistoryResponse struct { func (response CaptureConsoleHistoryResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CaptureConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_request_response.go index 084abbe5d..03852d15b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_request_response.go @@ -16,12 +16,30 @@ type ConnectLocalPeeringGatewaysRequest struct { // Details regarding the local peering gateway to connect. ConnectLocalPeeringGatewaysDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ConnectLocalPeeringGatewaysRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ConnectLocalPeeringGatewaysRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConnectLocalPeeringGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ConnectLocalPeeringGatewaysResponse wrapper for the ConnectLocalPeeringGateways operation type ConnectLocalPeeringGatewaysResponse struct { @@ -36,3 +54,8 @@ type ConnectLocalPeeringGatewaysResponse struct { func (response ConnectLocalPeeringGatewaysResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ConnectLocalPeeringGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_details.go b/vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_details.go new file mode 100644 index 000000000..b0e853964 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ConnectRemotePeeringConnectionsDetails Information about the other remote peering connection (RPC). +type ConnectRemotePeeringConnectionsDetails struct { + + // The OCID of the RPC you want to peer with. + PeerId *string `mandatory:"true" json:"peerId"` + + // The name of the region that contains the RPC you want to peer with. + // Example: `us-ashburn-1` + PeerRegionName *string `mandatory:"true" json:"peerRegionName"` +} + +func (m ConnectRemotePeeringConnectionsDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_request_response.go new file mode 100644 index 000000000..52c0d1509 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_request_response.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ConnectRemotePeeringConnectionsRequest wrapper for the ConnectRemotePeeringConnections operation +type ConnectRemotePeeringConnectionsRequest struct { + + // The OCID of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // Details to connect peering connection with peering connection from remote region + ConnectRemotePeeringConnectionsDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ConnectRemotePeeringConnectionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConnectRemotePeeringConnectionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConnectRemotePeeringConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ConnectRemotePeeringConnectionsResponse wrapper for the ConnectRemotePeeringConnections operation +type ConnectRemotePeeringConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ConnectRemotePeeringConnectionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConnectRemotePeeringConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/console_history.go b/vendor/github.com/oracle/oci-go-sdk/core/console_history.go index 27b9d760a..15b94724e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/console_history.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/console_history.go @@ -37,10 +37,21 @@ type ConsoleHistory struct { // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. // Example: `My console history metadata` DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m ConsoleHistory) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/core_blockstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/core/core_blockstorage_client.go index 4b49fcaff..d4c98c10f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/core_blockstorage_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/core_blockstorage_client.go @@ -48,8 +48,8 @@ func (client *BlockstorageClient) setConfigurationProvider(configProvider common // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -58,8 +58,93 @@ func (client *BlockstorageClient) ConfigurationProvider() *common.ConfigurationP return client.config } +// CreateBootVolume Creates a new boot volume in the specified compartment from an existing boot volume or a boot volume backup. +// For general information about boot volumes, see Boot Volumes (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumes.htm). +// You may optionally specify a *display name* for the volume, which is simply a friendly name or +// description. It does not have to be unique, and you can change it. Avoid entering confidential information. +func (client BlockstorageClient) CreateBootVolume(ctx context.Context, request CreateBootVolumeRequest) (response CreateBootVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createBootVolume, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBootVolumeResponse") + } + return +} + +// createBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createBootVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumes") + if err != nil { + return nil, err + } + + var response CreateBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateBootVolumeBackup Creates a new boot volume backup of the specified boot volume. For general information about boot volume backups, +// see Overview of Boot Volume Backups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumebackups.htm) +// When the request is received, the backup object is in a REQUEST_RECEIVED state. +// When the data is imaged, it goes into a CREATING state. +// After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state. +func (client BlockstorageClient) CreateBootVolumeBackup(ctx context.Context, request CreateBootVolumeBackupRequest) (response CreateBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createBootVolumeBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBootVolumeBackupResponse") + } + return +} + +// createBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createBootVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumeBackups") + if err != nil { + return nil, err + } + + var response CreateBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateVolume Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from -// 50 GB (51200 MB) to 16 TB (16777216 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB). +// 50 GB (51200 MB) to 32 TB (33554432 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB). // For general information about block volumes, see // Overview of Block Volume Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm). // A volume and instance can be in separate compartments but must be in the same Availability Domain. @@ -71,20 +156,41 @@ func (client *BlockstorageClient) ConfigurationProvider() *common.ConfigurationP // You may optionally specify a *display name* for the volume, which is simply a friendly name or // description. It does not have to be unique, and you can change it. Avoid entering confidential information. func (client BlockstorageClient) CreateVolume(ctx context.Context, request CreateVolumeRequest) (response CreateVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/volumes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumes") + if err != nil { + return nil, err + } + + var response CreateVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateVolumeBackup Creates a new backup of the specified volume. For general information about volume backups, @@ -93,242 +199,1313 @@ func (client BlockstorageClient) CreateVolume(ctx context.Context, request Creat // When the data is imaged, it goes into a CREATING state. // After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state. func (client BlockstorageClient) CreateVolumeBackup(ctx context.Context, request CreateVolumeBackupRequest) (response CreateVolumeBackupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/volumeBackups", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVolumeBackup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeBackupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeBackups") + if err != nil { + return nil, err + } + + var response CreateVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeBackupPolicyAssignment Assigns a policy to the specified asset, such as a volume. Note that a given asset can +// only have one policy assigned to it; if this method is called for an asset that previously +// has a different policy assigned, the prior assignment will be silently deleted. +func (client BlockstorageClient) CreateVolumeBackupPolicyAssignment(ctx context.Context, request CreateVolumeBackupPolicyAssignmentRequest) (response CreateVolumeBackupPolicyAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVolumeBackupPolicyAssignment, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeBackupPolicyAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeBackupPolicyAssignmentResponse") + } return } +// createVolumeBackupPolicyAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeBackupPolicyAssignment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeBackupPolicyAssignments") + if err != nil { + return nil, err + } + + var response CreateVolumeBackupPolicyAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeGroup Creates a new volume group in the specified compartment. +// A volume group is a collection of volumes and may be created from a list of volumes, cloning an existing +// volume group, or by restoring a volume group backup. A volume group can contain up to 64 volumes. +// You may optionally specify a *display name* for the volume group, which is simply a friendly name or +// description. It does not have to be unique, and you can change it. Avoid entering confidential information. +// For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) CreateVolumeGroup(ctx context.Context, request CreateVolumeGroupRequest) (response CreateVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVolumeGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeGroupResponse") + } + return +} + +// createVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeGroups") + if err != nil { + return nil, err + } + + var response CreateVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeGroupBackup Creates a new backup volume group of the specified volume group. +// For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) CreateVolumeGroupBackup(ctx context.Context, request CreateVolumeGroupBackupRequest) (response CreateVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVolumeGroupBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeGroupBackupResponse") + } + return +} + +// createVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeGroupBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeGroupBackups") + if err != nil { + return nil, err + } + + var response CreateVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteBootVolume Deletes the specified boot volume. The volume cannot have an active connection to an instance. // To disconnect the boot volume from a connected instance, see // Disconnecting From a Boot Volume (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/deletingbootvolume.htm). // **Warning:** All data on the boot volume will be permanently lost when the boot volume is deleted. func (client BlockstorageClient) DeleteBootVolume(ctx context.Context, request DeleteBootVolumeRequest) (response DeleteBootVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/bootVolumes/{bootVolumeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBootVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBootVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteBootVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bootVolumes/{bootVolumeId}") + if err != nil { + return nil, err + } + + var response DeleteBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteBootVolumeBackup Deletes a boot volume backup. +func (client BlockstorageClient) DeleteBootVolumeBackup(ctx context.Context, request DeleteBootVolumeBackupRequest) (response DeleteBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBootVolumeBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBootVolumeBackupResponse") + } return } +// deleteBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteBootVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bootVolumeBackups/{bootVolumeBackupId}") + if err != nil { + return nil, err + } + + var response DeleteBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteVolume Deletes the specified volume. The volume cannot have an active connection to an instance. // To disconnect the volume from a connected instance, see // Disconnecting From a Volume (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/disconnectingfromavolume.htm). // **Warning:** All data on the volume will be permanently lost when the volume is deleted. func (client BlockstorageClient) DeleteVolume(ctx context.Context, request DeleteVolumeRequest) (response DeleteVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/volumes/{volumeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumes/{volumeId}") + if err != nil { + return nil, err + } + + var response DeleteVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteVolumeBackup Deletes a volume backup. func (client BlockstorageClient) DeleteVolumeBackup(ctx context.Context, request DeleteVolumeBackupRequest) (response DeleteVolumeBackupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/volumeBackups/{volumeBackupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeBackup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeBackupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeBackups/{volumeBackupId}") + if err != nil { + return nil, err + } + + var response DeleteVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeBackupPolicyAssignment Deletes a volume backup policy assignment (i.e. unassigns the policy from an asset). +func (client BlockstorageClient) DeleteVolumeBackupPolicyAssignment(ctx context.Context, request DeleteVolumeBackupPolicyAssignmentRequest) (response DeleteVolumeBackupPolicyAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeBackupPolicyAssignment, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeBackupPolicyAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeBackupPolicyAssignmentResponse") + } return } +// deleteVolumeBackupPolicyAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeBackupPolicyAssignment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeBackupPolicyAssignments/{policyAssignmentId}") + if err != nil { + return nil, err + } + + var response DeleteVolumeBackupPolicyAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeGroup Deletes the specified volume group. Individual volumes are not deleted, only the volume group is deleted. +// For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) DeleteVolumeGroup(ctx context.Context, request DeleteVolumeGroupRequest) (response DeleteVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeGroupResponse") + } + return +} + +// deleteVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeGroups/{volumeGroupId}") + if err != nil { + return nil, err + } + + var response DeleteVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeGroupBackup Deletes a volume group backup. This operation deletes all the backups in the volume group. For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) DeleteVolumeGroupBackup(ctx context.Context, request DeleteVolumeGroupBackupRequest) (response DeleteVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeGroupBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeGroupBackupResponse") + } + return +} + +// deleteVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeGroupBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeGroupBackups/{volumeGroupBackupId}") + if err != nil { + return nil, err + } + + var response DeleteVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetBootVolume Gets information for the specified boot volume. func (client BlockstorageClient) GetBootVolume(ctx context.Context, request GetBootVolumeRequest) (response GetBootVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumes/{bootVolumeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getBootVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumes/{bootVolumeId}") + if err != nil { + return nil, err + } + + var response GetBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBootVolumeBackup Gets information for the specified boot volume backup. +func (client BlockstorageClient) GetBootVolumeBackup(ctx context.Context, request GetBootVolumeBackupRequest) (response GetBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolumeBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeBackupResponse") + } return } +// getBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getBootVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeBackups/{bootVolumeBackupId}") + if err != nil { + return nil, err + } + + var response GetBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetVolume Gets information for the specified volume. func (client BlockstorageClient) GetVolume(ctx context.Context, request GetVolumeRequest) (response GetVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumes/{volumeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumes/{volumeId}") + if err != nil { + return nil, err + } + + var response GetVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetVolumeBackup Gets information for the specified volume backup. func (client BlockstorageClient) GetVolumeBackup(ctx context.Context, request GetVolumeBackupRequest) (response GetVolumeBackupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeBackups/{volumeBackupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackups/{volumeBackupId}") + if err != nil { + return nil, err + } + + var response GetVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeBackupPolicy Gets information for the specified volume backup policy. +func (client BlockstorageClient) GetVolumeBackupPolicy(ctx context.Context, request GetVolumeBackupPolicyRequest) (response GetVolumeBackupPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackupPolicy, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetVolumeBackupPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupPolicyResponse") + } return } +// getVolumeBackupPolicy implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackupPolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicies/{policyId}") + if err != nil { + return nil, err + } + + var response GetVolumeBackupPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeBackupPolicyAssetAssignment Gets the volume backup policy assignment for the specified asset. Note that the +// assetId query parameter is required, and that the returned list will contain at most +// one item (since any given asset can only have one policy assigned to it). +func (client BlockstorageClient) GetVolumeBackupPolicyAssetAssignment(ctx context.Context, request GetVolumeBackupPolicyAssetAssignmentRequest) (response GetVolumeBackupPolicyAssetAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackupPolicyAssetAssignment, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetVolumeBackupPolicyAssetAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupPolicyAssetAssignmentResponse") + } + return +} + +// getVolumeBackupPolicyAssetAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackupPolicyAssetAssignment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicyAssignments") + if err != nil { + return nil, err + } + + var response GetVolumeBackupPolicyAssetAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeBackupPolicyAssignment Gets information for the specified volume backup policy assignment. +func (client BlockstorageClient) GetVolumeBackupPolicyAssignment(ctx context.Context, request GetVolumeBackupPolicyAssignmentRequest) (response GetVolumeBackupPolicyAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackupPolicyAssignment, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetVolumeBackupPolicyAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupPolicyAssignmentResponse") + } + return +} + +// getVolumeBackupPolicyAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackupPolicyAssignment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicyAssignments/{policyAssignmentId}") + if err != nil { + return nil, err + } + + var response GetVolumeBackupPolicyAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeGroup Gets information for the specified volume group. For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) GetVolumeGroup(ctx context.Context, request GetVolumeGroupRequest) (response GetVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeGroupResponse") + } + return +} + +// getVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroups/{volumeGroupId}") + if err != nil { + return nil, err + } + + var response GetVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeGroupBackup Gets information for the specified volume group backup. For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) GetVolumeGroupBackup(ctx context.Context, request GetVolumeGroupBackupRequest) (response GetVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeGroupBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeGroupBackupResponse") + } + return +} + +// getVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeGroupBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroupBackups/{volumeGroupBackupId}") + if err != nil { + return nil, err + } + + var response GetVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBootVolumeBackups Lists the boot volume backups in the specified compartment. You can filter the results by boot volume. +func (client BlockstorageClient) ListBootVolumeBackups(ctx context.Context, request ListBootVolumeBackupsRequest) (response ListBootVolumeBackupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBootVolumeBackups, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListBootVolumeBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBootVolumeBackupsResponse") + } + return +} + +// listBootVolumeBackups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listBootVolumeBackups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeBackups") + if err != nil { + return nil, err + } + + var response ListBootVolumeBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListBootVolumes Lists the boot volumes in the specified compartment and Availability Domain. func (client BlockstorageClient) ListBootVolumes(ctx context.Context, request ListBootVolumesRequest) (response ListBootVolumesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBootVolumes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListBootVolumesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBootVolumesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listBootVolumes implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listBootVolumes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumes") + if err != nil { + return nil, err + } + + var response ListBootVolumesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeBackupPolicies Lists all volume backup policies available to the caller. +func (client BlockstorageClient) ListVolumeBackupPolicies(ctx context.Context, request ListVolumeBackupPoliciesRequest) (response ListVolumeBackupPoliciesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeBackupPolicies, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListVolumeBackupPoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeBackupPoliciesResponse") + } return } +// listVolumeBackupPolicies implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeBackupPolicies(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicies") + if err != nil { + return nil, err + } + + var response ListVolumeBackupPoliciesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListVolumeBackups Lists the volume backups in the specified compartment. You can filter the results by volume. func (client BlockstorageClient) ListVolumeBackups(ctx context.Context, request ListVolumeBackupsRequest) (response ListVolumeBackupsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeBackups", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeBackups, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListVolumeBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeBackupsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listVolumeBackups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeBackups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackups") + if err != nil { + return nil, err + } + + var response ListVolumeBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeGroupBackups Lists the volume group backups in the specified compartment. You can filter the results by volume group. +// For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) ListVolumeGroupBackups(ctx context.Context, request ListVolumeGroupBackupsRequest) (response ListVolumeGroupBackupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeGroupBackups, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListVolumeGroupBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeGroupBackupsResponse") + } return } +// listVolumeGroupBackups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeGroupBackups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroupBackups") + if err != nil { + return nil, err + } + + var response ListVolumeGroupBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeGroups Lists the volume groups in the specified compartment and availability domain. +// For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) ListVolumeGroups(ctx context.Context, request ListVolumeGroupsRequest) (response ListVolumeGroupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeGroups, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListVolumeGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeGroupsResponse") + } + return +} + +// listVolumeGroups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeGroups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroups") + if err != nil { + return nil, err + } + + var response ListVolumeGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListVolumes Lists the volumes in the specified compartment and Availability Domain. func (client BlockstorageClient) ListVolumes(ctx context.Context, request ListVolumesRequest) (response ListVolumesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListVolumesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listVolumes implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumes") + if err != nil { + return nil, err + } + + var response ListVolumesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateBootVolume Updates the specified boot volume's display name. func (client BlockstorageClient) UpdateBootVolume(ctx context.Context, request UpdateBootVolumeRequest) (response UpdateBootVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/bootVolumes/{bootVolumeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBootVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBootVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateBootVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bootVolumes/{bootVolumeId}") + if err != nil { + return nil, err + } + + var response UpdateBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateBootVolumeBackup Updates the display name for the specified boot volume backup. +// Avoid entering confidential information. +func (client BlockstorageClient) UpdateBootVolumeBackup(ctx context.Context, request UpdateBootVolumeBackupRequest) (response UpdateBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBootVolumeBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBootVolumeBackupResponse") + } return } +// updateBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateBootVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bootVolumeBackups/{bootVolumeBackupId}") + if err != nil { + return nil, err + } + + var response UpdateBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateVolume Updates the specified volume's display name. // Avoid entering confidential information. func (client BlockstorageClient) UpdateVolume(ctx context.Context, request UpdateVolumeRequest) (response UpdateVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/volumes/{volumeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumes/{volumeId}") + if err != nil { + return nil, err + } + + var response UpdateVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateVolumeBackup Updates the display name for the specified volume backup. // Avoid entering confidential information. func (client BlockstorageClient) UpdateVolumeBackup(ctx context.Context, request UpdateVolumeBackupRequest) (response UpdateVolumeBackupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/volumeBackups/{volumeBackupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeBackup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeBackupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeBackups/{volumeBackupId}") + if err != nil { + return nil, err + } + + var response UpdateVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeGroup Updates the set of volumes in a volume group along with the display name. Use this operation +// to add or remove volumes in a volume group. Specify the full list of volume IDs to include in the +// volume group. If the volume ID is not specified in the call, it will be removed from the volume group. +// Avoid entering confidential information. +// For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) UpdateVolumeGroup(ctx context.Context, request UpdateVolumeGroupRequest) (response UpdateVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeGroupResponse") + } return } + +// updateVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeGroups/{volumeGroupId}") + if err != nil { + return nil, err + } + + var response UpdateVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeGroupBackup Updates the display name for the specified volume group backup. For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +func (client BlockstorageClient) UpdateVolumeGroupBackup(ctx context.Context, request UpdateVolumeGroupBackupRequest) (response UpdateVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeGroupBackup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeGroupBackupResponse") + } + return +} + +// updateVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeGroupBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeGroupBackups/{volumeGroupBackupId}") + if err != nil { + return nil, err + } + + var response UpdateVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/core_compute_client.go b/vendor/github.com/oracle/oci-go-sdk/core/core_compute_client.go index 34b17d7b9..46181e12c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/core_compute_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/core_compute_client.go @@ -48,8 +48,8 @@ func (client *ComputeClient) setConfigurationProvider(configProvider common.Conf // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -60,58 +60,121 @@ func (client *ComputeClient) ConfigurationProvider() *common.ConfigurationProvid // AttachBootVolume Attaches the specified boot volume to the specified instance. func (client ComputeClient) AttachBootVolume(ctx context.Context, request AttachBootVolumeRequest) (response AttachBootVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/bootVolumeAttachments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.attachBootVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(AttachBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachBootVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// attachBootVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) attachBootVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumeAttachments/") + if err != nil { + return nil, err + } + + var response AttachBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // AttachVnic Creates a secondary VNIC and attaches it to the specified instance. // For more information about secondary VNICs, see // Virtual Network Interface Cards (VNICs) (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). func (client ComputeClient) AttachVnic(ctx context.Context, request AttachVnicRequest) (response AttachVnicResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/vnicAttachments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.attachVnic, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(AttachVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachVnicResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// attachVnic implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) attachVnic(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vnicAttachments/") + if err != nil { + return nil, err + } + + var response AttachVnicResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // AttachVolume Attaches the specified storage volume to the specified instance. func (client ComputeClient) AttachVolume(ctx context.Context, request AttachVolumeRequest) (response AttachVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/volumeAttachments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.attachVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(AttachVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// attachVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) attachVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeAttachments/") + if err != nil { + return nil, err + } + + var response AttachVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &volumeattachment{}) - return + return response, err } // CaptureConsoleHistory Captures the most recent serial console data (up to a megabyte) for the @@ -130,20 +193,41 @@ func (client ComputeClient) AttachVolume(ctx context.Context, request AttachVolu // 4. Optionally, use `DeleteConsoleHistory` to delete the console history metadata // and the console history data. func (client ComputeClient) CaptureConsoleHistory(ctx context.Context, request CaptureConsoleHistoryRequest) (response CaptureConsoleHistoryResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instanceConsoleHistories/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.captureConsoleHistory, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CaptureConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CaptureConsoleHistoryResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// captureConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) captureConsoleHistory(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instanceConsoleHistories/") + if err != nil { + return nil, err + } + + var response CaptureConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateImage Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. @@ -164,20 +248,41 @@ func (client ComputeClient) CaptureConsoleHistory(ctx context.Context, request C // It does not have to be unique, and you can change it. See UpdateImage. // Avoid entering confidential information. func (client ComputeClient) CreateImage(ctx context.Context, request CreateImageRequest) (response CreateImageResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/images/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createImage, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateImageResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createImage(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/images") + if err != nil { + return nil, err + } + + var response CreateImageResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateInstanceConsoleConnection Creates a new console connection to the specified instance. @@ -185,94 +290,199 @@ func (client ComputeClient) CreateImage(ctx context.Context, request CreateImage // you connect to the console using SSH. // For more information about console access, see Accessing the Console (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm). func (client ComputeClient) CreateInstanceConsoleConnection(ctx context.Context, request CreateInstanceConsoleConnectionRequest) (response CreateInstanceConsoleConnectionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instanceConsoleConnections", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createInstanceConsoleConnection, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateInstanceConsoleConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateInstanceConsoleConnectionResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createInstanceConsoleConnection implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createInstanceConsoleConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instanceConsoleConnections") + if err != nil { + return nil, err + } + + var response CreateInstanceConsoleConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteConsoleHistory Deletes the specified console history metadata and the console history data. func (client ComputeClient) DeleteConsoleHistory(ctx context.Context, request DeleteConsoleHistoryRequest) (response DeleteConsoleHistoryResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/instanceConsoleHistories/{instanceConsoleHistoryId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteConsoleHistory, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteConsoleHistoryResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteConsoleHistory(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instanceConsoleHistories/{instanceConsoleHistoryId}") + if err != nil { + return nil, err + } + + var response DeleteConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteImage Deletes an image. func (client ComputeClient) DeleteImage(ctx context.Context, request DeleteImageRequest) (response DeleteImageResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/images/{imageId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteImage, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteImageResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteImage(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/images/{imageId}") + if err != nil { + return nil, err + } + + var response DeleteImageResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteInstanceConsoleConnection Deletes the specified instance console connection. func (client ComputeClient) DeleteInstanceConsoleConnection(ctx context.Context, request DeleteInstanceConsoleConnectionRequest) (response DeleteInstanceConsoleConnectionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/instanceConsoleConnections/{instanceConsoleConnectionId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteInstanceConsoleConnection, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteInstanceConsoleConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteInstanceConsoleConnectionResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteInstanceConsoleConnection implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteInstanceConsoleConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instanceConsoleConnections/{instanceConsoleConnectionId}") + if err != nil { + return nil, err + } + + var response DeleteInstanceConsoleConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DetachBootVolume Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment. // This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily // until the attachment is completely removed. func (client ComputeClient) DetachBootVolume(ctx context.Context, request DetachBootVolumeRequest) (response DetachBootVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/bootVolumeAttachments/{bootVolumeAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachBootVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DetachBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachBootVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// detachBootVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) detachBootVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bootVolumeAttachments/{bootVolumeAttachmentId}") + if err != nil { + return nil, err + } + + var response DetachBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DetachVnic Detaches and deletes the specified secondary VNIC. @@ -285,40 +495,82 @@ func (client ComputeClient) DetachBootVolume(ctx context.Context, request Detach // deleting the VNIC causes that route rule to blackhole and the traffic // will be dropped. func (client ComputeClient) DetachVnic(ctx context.Context, request DetachVnicRequest) (response DetachVnicResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/vnicAttachments/{vnicAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachVnic, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DetachVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachVnicResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// detachVnic implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) detachVnic(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/vnicAttachments/{vnicAttachmentId}") + if err != nil { + return nil, err + } + + var response DetachVnicResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DetachVolume Detaches a storage volume from an instance. You must specify the OCID of the volume attachment. // This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily // until the attachment is completely removed. func (client ComputeClient) DetachVolume(ctx context.Context, request DetachVolumeRequest) (response DetachVolumeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/volumeAttachments/{volumeAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachVolume, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DetachVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachVolumeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// detachVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) detachVolume(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeAttachments/{volumeAttachmentId}") + if err != nil { + return nil, err + } + + var response DetachVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ExportImage Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL, @@ -329,217 +581,444 @@ func (client ComputeClient) DetachVolume(ctx context.Context, request DetachVolu // See Object Storage URLs (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and pre-authenticated requests (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) // for constructing URLs for image import/export. func (client ComputeClient) ExportImage(ctx context.Context, request ExportImageRequest) (response ExportImageResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/images/{imageId}/actions/export", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.exportImage, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ExportImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ExportImageResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// exportImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) exportImage(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/images/{imageId}/actions/export") + if err != nil { + return nil, err + } + + var response ExportImageResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetBootVolumeAttachment Gets information about the specified boot volume attachment. func (client ComputeClient) GetBootVolumeAttachment(ctx context.Context, request GetBootVolumeAttachmentRequest) (response GetBootVolumeAttachmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumeAttachments/{bootVolumeAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolumeAttachment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetBootVolumeAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeAttachmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getBootVolumeAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getBootVolumeAttachment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeAttachments/{bootVolumeAttachmentId}") + if err != nil { + return nil, err + } + + var response GetBootVolumeAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetConsoleHistory Shows the metadata for the specified console history. // See CaptureConsoleHistory // for details about using the console history operations. func (client ComputeClient) GetConsoleHistory(ctx context.Context, request GetConsoleHistoryRequest) (response GetConsoleHistoryResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getConsoleHistory, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConsoleHistoryResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getConsoleHistory(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}") + if err != nil { + return nil, err + } + + var response GetConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetConsoleHistoryContent Gets the actual console history data (not the metadata). // See CaptureConsoleHistory // for details about using the console history operations. func (client ComputeClient) GetConsoleHistoryContent(ctx context.Context, request GetConsoleHistoryContentRequest) (response GetConsoleHistoryContentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}/data", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getConsoleHistoryContent, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetConsoleHistoryContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConsoleHistoryContentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getConsoleHistoryContent implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getConsoleHistoryContent(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}/data") + if err != nil { + return nil, err + } + + var response GetConsoleHistoryContentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetImage Gets the specified image. func (client ComputeClient) GetImage(ctx context.Context, request GetImageRequest) (response GetImageResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/images/{imageId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getImage, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetImageResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getImage(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/images/{imageId}") + if err != nil { + return nil, err + } + + var response GetImageResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetInstance Gets information about the specified instance. func (client ComputeClient) GetInstance(ctx context.Context, request GetInstanceRequest) (response GetInstanceResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instances/{instanceId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstance, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstanceResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getInstance(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/{instanceId}") + if err != nil { + return nil, err + } + + var response GetInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetInstanceConsoleConnection Gets the specified instance console connection's information. func (client ComputeClient) GetInstanceConsoleConnection(ctx context.Context, request GetInstanceConsoleConnectionRequest) (response GetInstanceConsoleConnectionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleConnections/{instanceConsoleConnectionId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstanceConsoleConnection, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetInstanceConsoleConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstanceConsoleConnectionResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getInstanceConsoleConnection implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getInstanceConsoleConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleConnections/{instanceConsoleConnectionId}") + if err != nil { + return nil, err + } + + var response GetInstanceConsoleConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetVnicAttachment Gets the information for the specified VNIC attachment. func (client ComputeClient) GetVnicAttachment(ctx context.Context, request GetVnicAttachmentRequest) (response GetVnicAttachmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vnicAttachments/{vnicAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVnicAttachment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetVnicAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVnicAttachmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getVnicAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getVnicAttachment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vnicAttachments/{vnicAttachmentId}") + if err != nil { + return nil, err + } + + var response GetVnicAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetVolumeAttachment Gets information about the specified volume attachment. func (client ComputeClient) GetVolumeAttachment(ctx context.Context, request GetVolumeAttachmentRequest) (response GetVolumeAttachmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeAttachments/{volumeAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeAttachment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetVolumeAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeAttachmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getVolumeAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getVolumeAttachment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeAttachments/{volumeAttachmentId}") + if err != nil { + return nil, err + } + + var response GetVolumeAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &volumeattachment{}) - return + return response, err } -// GetWindowsInstanceInitialCredentials Gets the generated credentials for the instance. Only works for Windows instances. The returned credentials -// are only valid for the initial login. +// GetWindowsInstanceInitialCredentials Gets the generated credentials for the instance. Only works for instances that require password to log in (E.g. Windows). +// For certain OS'es, users will be forced to change the initial credentials. func (client ComputeClient) GetWindowsInstanceInitialCredentials(ctx context.Context, request GetWindowsInstanceInitialCredentialsRequest) (response GetWindowsInstanceInitialCredentialsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instances/{instanceId}/initialCredentials", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWindowsInstanceInitialCredentials, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(GetWindowsInstanceInitialCredentialsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWindowsInstanceInitialCredentialsResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// InstanceAction Performs one of the power actions (start, stop, softreset, or reset) -// on the specified instance. -// **start** - power on -// **stop** - power off -// **softreset** - ACPI shutdown and power on -// **reset** - power off and power on -// Note that the **stop** state has no effect on the resources you consume. -// Billing continues for instances that you stop, and related resources continue -// to apply against any relevant quotas. You must terminate an instance -// (TerminateInstance) -// to remove its resources from billing and quotas. -func (client ComputeClient) InstanceAction(ctx context.Context, request InstanceActionRequest) (response InstanceActionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instances/{instanceId}", request) +// getWindowsInstanceInitialCredentials implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getWindowsInstanceInitialCredentials(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/{instanceId}/initialCredentials") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response GetWindowsInstanceInitialCredentialsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// InstanceAction Performs one of the following power actions on the specified instance: +// - **START** - Powers on the instance. +// - **STOP** - Powers off the instance. +// - **SOFTRESET** - Gracefully reboots instance by sending a shutdown command to the operating system and then powers the instance back on. +// - **SOFTSTOP** - Gracefully shuts down instance by sending a shutdown command to the operating system. +// - **RESET** - Powers off the instance and then powers it back on. +// For more information see Stopping and Starting an Instance (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/restartinginstance.htm). +func (client ComputeClient) InstanceAction(ctx context.Context, request InstanceActionRequest) (response InstanceActionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.instanceAction, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(InstanceActionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into InstanceActionResponse") + } return } +// instanceAction implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) instanceAction(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instances/{instanceId}") + if err != nil { + return nil, err + } + + var response InstanceActionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // LaunchInstance Creates a new instance in the specified compartment and the specified Availability Domain. // For general information about instances, see // Overview of the Compute Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Concepts/computeoverview.htm). @@ -554,6 +1033,7 @@ func (client ComputeClient) InstanceAction(ctx context.Context, request Instance // When you create a resource, you can find its OCID in the response. You can // also retrieve a resource's OCID by using a List API operation // on that resource type, or by viewing the resource in the Console. +// To launch an instance using an image or a boot volume use the `sourceDetails` parameter in LaunchInstanceDetails. // When you launch an instance, it is automatically attached to a virtual // network interface card (VNIC), called the *primary VNIC*. The VNIC // has a private IP address from the subnet's CIDR. You can either assign a @@ -565,57 +1045,120 @@ func (client ComputeClient) InstanceAction(ctx context.Context, request Instance // You can later add secondary VNICs to an instance. For more information, see // Virtual Network Interface Cards (VNICs) (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). func (client ComputeClient) LaunchInstance(ctx context.Context, request LaunchInstanceRequest) (response LaunchInstanceResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instances/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.launchInstance, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(LaunchInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into LaunchInstanceResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// launchInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) launchInstance(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instances/") + if err != nil { + return nil, err + } + + var response LaunchInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListBootVolumeAttachments Lists the boot volume attachments in the specified compartment. You can filter the // list by specifying an instance OCID, boot volume OCID, or both. func (client ComputeClient) ListBootVolumeAttachments(ctx context.Context, request ListBootVolumeAttachmentsRequest) (response ListBootVolumeAttachmentsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumeAttachments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBootVolumeAttachments, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListBootVolumeAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBootVolumeAttachmentsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listBootVolumeAttachments implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listBootVolumeAttachments(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeAttachments/") + if err != nil { + return nil, err + } + + var response ListBootVolumeAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListConsoleHistories Lists the console history metadata for the specified compartment or instance. func (client ComputeClient) ListConsoleHistories(ctx context.Context, request ListConsoleHistoriesRequest) (response ListConsoleHistoriesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleHistories/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listConsoleHistories, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListConsoleHistoriesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListConsoleHistoriesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listConsoleHistories implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listConsoleHistories(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleHistories/") + if err != nil { + return nil, err + } + + var response ListConsoleHistoriesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListImages Lists the available images in the specified compartment. @@ -624,98 +1167,203 @@ func (client ComputeClient) ListConsoleHistories(ctx context.Context, request Li // information about images, see // Managing Custom Images (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm). func (client ComputeClient) ListImages(ctx context.Context, request ListImagesRequest) (response ListImagesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/images/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listImages, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(ListImagesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListImagesResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// ListInstanceConsoleConnections Lists the console connections for the specified compartment or instance. -// For more information about console access, see Accessing the Instance Console (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm). -func (client ComputeClient) ListInstanceConsoleConnections(ctx context.Context, request ListInstanceConsoleConnectionsRequest) (response ListInstanceConsoleConnectionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleConnections", request) +// listImages implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listImages(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/images") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response ListImagesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstanceConsoleConnections Lists the console connections for the specified compartment or instance. +// For more information about console access, see Accessing the Console (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm). +func (client ComputeClient) ListInstanceConsoleConnections(ctx context.Context, request ListInstanceConsoleConnectionsRequest) (response ListInstanceConsoleConnectionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstanceConsoleConnections, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListInstanceConsoleConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstanceConsoleConnectionsResponse") + } return } +// listInstanceConsoleConnections implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listInstanceConsoleConnections(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleConnections") + if err != nil { + return nil, err + } + + var response ListInstanceConsoleConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListInstances Lists the instances in the specified compartment and the specified Availability Domain. // You can filter the results by specifying an instance name (the list will include all the identically-named // instances in the compartment). func (client ComputeClient) ListInstances(ctx context.Context, request ListInstancesRequest) (response ListInstancesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instances/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstances, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListInstancesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstancesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listInstances implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listInstances(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/") + if err != nil { + return nil, err + } + + var response ListInstancesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListShapes Lists the shapes that can be used to launch an instance within the specified compartment. You can // filter the list by compatibility with a specific image. func (client ComputeClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/shapes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listShapes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListShapesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listShapes implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/shapes") + if err != nil { + return nil, err + } + + var response ListShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListVnicAttachments Lists the VNIC attachments in the specified compartment. A VNIC attachment // resides in the same compartment as the attached instance. The list can be // filtered by instance, VNIC, or Availability Domain. func (client ComputeClient) ListVnicAttachments(ctx context.Context, request ListVnicAttachmentsRequest) (response ListVnicAttachmentsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vnicAttachments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVnicAttachments, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListVnicAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVnicAttachmentsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listVnicAttachments implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listVnicAttachments(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vnicAttachments/") + if err != nil { + return nil, err + } + + var response ListVnicAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } //listvolumeattachment allows to unmarshal list of polymorphic VolumeAttachment @@ -736,22 +1384,44 @@ func (m *listvolumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{ // ListVolumeAttachments Lists the volume attachments in the specified compartment. You can filter the // list by specifying an instance OCID, volume OCID, or both. -// Currently, the only supported volume attachment type is IScsiVolumeAttachment. +// Currently, the only supported volume attachment type are IScsiVolumeAttachment and +// ParavirtualizedVolumeAttachment. func (client ComputeClient) ListVolumeAttachments(ctx context.Context, request ListVolumeAttachmentsRequest) (response ListVolumeAttachmentsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeAttachments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeAttachments, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListVolumeAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeAttachmentsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listVolumeAttachments implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listVolumeAttachments(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeAttachments/") + if err != nil { + return nil, err + } + + var response ListVolumeAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listvolumeattachment{}) - return + return response, err } // TerminateInstance Terminates the specified instance. Any attached VNICs and volumes are automatically detached @@ -761,73 +1431,157 @@ func (client ComputeClient) ListVolumeAttachments(ctx context.Context, request L // This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily // until the instance is completely removed. func (client ComputeClient) TerminateInstance(ctx context.Context, request TerminateInstanceRequest) (response TerminateInstanceResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/instances/{instanceId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.terminateInstance, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(TerminateInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TerminateInstanceResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// terminateInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) terminateInstance(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instances/{instanceId}") + if err != nil { + return nil, err + } + + var response TerminateInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateConsoleHistory Updates the specified console history metadata. func (client ComputeClient) UpdateConsoleHistory(ctx context.Context, request UpdateConsoleHistoryRequest) (response UpdateConsoleHistoryResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/instanceConsoleHistories/{instanceConsoleHistoryId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateConsoleHistory, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateConsoleHistoryResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateConsoleHistory(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instanceConsoleHistories/{instanceConsoleHistoryId}") + if err != nil { + return nil, err + } + + var response UpdateConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateImage Updates the display name of the image. Avoid entering confidential information. func (client ComputeClient) UpdateImage(ctx context.Context, request UpdateImageRequest) (response UpdateImageResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/images/{imageId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateImage, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateImageResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateImage(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/images/{imageId}") + if err != nil { + return nil, err + } + + var response UpdateImageResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateInstance Updates the display name of the specified instance. Avoid entering confidential information. // The OCID of the instance remains the same. func (client ComputeClient) UpdateInstance(ctx context.Context, request UpdateInstanceRequest) (response UpdateInstanceResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/instances/{instanceId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateInstance, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInstanceResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateInstance(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instances/{instanceId}") + if err != nil { + return nil, err + } + + var response UpdateInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/core_virtualnetwork_client.go b/vendor/github.com/oracle/oci-go-sdk/core/core_virtualnetwork_client.go index 2888effff..545d51483 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/core_virtualnetwork_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/core_virtualnetwork_client.go @@ -48,8 +48,8 @@ func (client *VirtualNetworkClient) setConfigurationProvider(configProvider comm // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -58,18 +58,84 @@ func (client *VirtualNetworkClient) ConfigurationProvider() *common.Configuratio return client.config } +// AttachServiceId Enables the specified service on the specified gateway. In other words, enables the service +// gateway to send traffic to the specified service. You must also set up a route rule with the +// service's `cidrBlock` as the rule's destination CIDR and the gateway as the rule's target. +// See RouteTable. +// **Note:** The `AttachServiceId` operation is an easy way to enable an individual service on +// the service gateway. Compare it with +// UpdateServiceGateway, which also +// lets you enable an individual service. However, with `UpdateServiceGateway`, you must specify +// the *entire* list of services you want enabled on the service gateway. +func (client VirtualNetworkClient) AttachServiceId(ctx context.Context, request AttachServiceIdRequest) (response AttachServiceIdResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.attachServiceId, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(AttachServiceIdResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachServiceIdResponse") + } + return +} + +// attachServiceId implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) attachServiceId(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/serviceGateways/{serviceGatewayId}/actions/attachService") + if err != nil { + return nil, err + } + + var response AttachServiceIdResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // BulkAddVirtualCircuitPublicPrefixes Adds one or more customer public IP prefixes to the specified public virtual circuit. // Use this operation (and not UpdateVirtualCircuit) // to add prefixes to the virtual circuit. Oracle must verify the customer's ownership // of each prefix before traffic for that prefix will flow across the virtual circuit. func (client VirtualNetworkClient) BulkAddVirtualCircuitPublicPrefixes(ctx context.Context, request BulkAddVirtualCircuitPublicPrefixesRequest) (err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkAddPublicPrefixes", request) + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + _, err = common.Retry(ctx, request, client.bulkAddVirtualCircuitPublicPrefixes, policy) + return +} + +// bulkAddVirtualCircuitPublicPrefixes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkAddVirtualCircuitPublicPrefixes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkAddPublicPrefixes") if err != nil { - return + return nil, err } - _, err = client.Call(ctx, &httpRequest) - return + var response BulkAddVirtualCircuitPublicPrefixesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err } // BulkDeleteVirtualCircuitPublicPrefixes Removes one or more customer public IP prefixes from the specified public virtual circuit. @@ -77,13 +143,32 @@ func (client VirtualNetworkClient) BulkAddVirtualCircuitPublicPrefixes(ctx conte // to remove prefixes from the virtual circuit. When the virtual circuit's state switches // back to PROVISIONED, Oracle stops advertising the specified prefixes across the connection. func (client VirtualNetworkClient) BulkDeleteVirtualCircuitPublicPrefixes(ctx context.Context, request BulkDeleteVirtualCircuitPublicPrefixesRequest) (err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkDeletePublicPrefixes", request) + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + _, err = common.Retry(ctx, request, client.bulkDeleteVirtualCircuitPublicPrefixes, policy) + return +} + +// bulkDeleteVirtualCircuitPublicPrefixes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkDeleteVirtualCircuitPublicPrefixes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkDeletePublicPrefixes") if err != nil { - return + return nil, err } - _, err = client.Call(ctx, &httpRequest) - return + var response BulkDeleteVirtualCircuitPublicPrefixesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err } // ConnectLocalPeeringGateways Connects this local peering gateway (LPG) to another one in the same region. @@ -94,22 +179,88 @@ func (client VirtualNetworkClient) BulkDeleteVirtualCircuitPublicPrefixes(ctx co // operation will fail. For more information, see // VCN Peering (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.htm). func (client VirtualNetworkClient) ConnectLocalPeeringGateways(ctx context.Context, request ConnectLocalPeeringGatewaysRequest) (response ConnectLocalPeeringGatewaysResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/localPeeringGateways/{localPeeringGatewayId}/actions/connect", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.connectLocalPeeringGateways, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ConnectLocalPeeringGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConnectLocalPeeringGatewaysResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// connectLocalPeeringGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) connectLocalPeeringGateways(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/localPeeringGateways/{localPeeringGatewayId}/actions/connect") + if err != nil { + return nil, err + } + + var response ConnectLocalPeeringGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ConnectRemotePeeringConnections Connects this RPC to another one in a different region. +// This operation must be called by the VCN administrator who is designated as +// the *requestor* in the peering relationship. The *acceptor* must implement +// an Identity and Access Management (IAM) policy that gives the requestor permission +// to connect to RPCs in the acceptor's compartment. Without that permission, this +// operation will fail. For more information, see +// VCN Peering (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.htm). +func (client VirtualNetworkClient) ConnectRemotePeeringConnections(ctx context.Context, request ConnectRemotePeeringConnectionsRequest) (response ConnectRemotePeeringConnectionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.connectRemotePeeringConnections, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ConnectRemotePeeringConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConnectRemotePeeringConnectionsResponse") + } return } +// connectRemotePeeringConnections implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) connectRemotePeeringConnections(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/remotePeeringConnections/{remotePeeringConnectionId}/actions/connect") + if err != nil { + return nil, err + } + + var response ConnectRemotePeeringConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateCpe Creates a new virtual Customer-Premises Equipment (CPE) object in the specified compartment. For // more information, see IPSec VPNs (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). // For the purposes of access control, you must provide the OCID of the compartment where you want @@ -123,20 +274,41 @@ func (client VirtualNetworkClient) ConnectLocalPeeringGateways(ctx context.Conte // You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to // be unique, and you can change it. Avoid entering confidential information. func (client VirtualNetworkClient) CreateCpe(ctx context.Context, request CreateCpeRequest) (response CreateCpeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/cpes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createCpe, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCpeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createCpe(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/cpes") + if err != nil { + return nil, err + } + + var response CreateCpeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateCrossConnect Creates a new cross-connect. Oracle recommends you create each cross-connect in a @@ -156,20 +328,41 @@ func (client VirtualNetworkClient) CreateCpe(ctx context.Context, request Create // You may optionally specify a *display name* for the cross-connect. // It does not have to be unique, and you can change it. Avoid entering confidential information. func (client VirtualNetworkClient) CreateCrossConnect(ctx context.Context, request CreateCrossConnectRequest) (response CreateCrossConnectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/crossConnects", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createCrossConnect, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCrossConnectResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createCrossConnect(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/crossConnects") + if err != nil { + return nil, err + } + + var response CreateCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateCrossConnectGroup Creates a new cross-connect group to use with Oracle Cloud Infrastructure @@ -186,20 +379,41 @@ func (client VirtualNetworkClient) CreateCrossConnect(ctx context.Context, reque // You may optionally specify a *display name* for the cross-connect group. // It does not have to be unique, and you can change it. Avoid entering confidential information. func (client VirtualNetworkClient) CreateCrossConnectGroup(ctx context.Context, request CreateCrossConnectGroupRequest) (response CreateCrossConnectGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/crossConnectGroups", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createCrossConnectGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCrossConnectGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createCrossConnectGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/crossConnectGroups") + if err != nil { + return nil, err + } + + var response CreateCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateDhcpOptions Creates a new set of DHCP options for the specified VCN. For more information, see @@ -213,20 +427,41 @@ func (client VirtualNetworkClient) CreateCrossConnectGroup(ctx context.Context, // You may optionally specify a *display name* for the set of DHCP options, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. func (client VirtualNetworkClient) CreateDhcpOptions(ctx context.Context, request CreateDhcpOptionsRequest) (response CreateDhcpOptionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dhcps", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createDhcpOptions, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDhcpOptionsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDhcpOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dhcps") + if err != nil { + return nil, err + } + + var response CreateDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateDrg Creates a new Dynamic Routing Gateway (DRG) in the specified compartment. For more information, @@ -240,20 +475,41 @@ func (client VirtualNetworkClient) CreateDhcpOptions(ctx context.Context, reques // You may optionally specify a *display name* for the DRG, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. func (client VirtualNetworkClient) CreateDrg(ctx context.Context, request CreateDrgRequest) (response CreateDrgResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/drgs", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createDrg, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDrgResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDrg(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgs") + if err != nil { + return nil, err + } + + var response CreateDrgResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateDrgAttachment Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time, @@ -266,20 +522,41 @@ func (client VirtualNetworkClient) CreateDrg(ctx context.Context, request Create // as the VCN. For more information about compartments and access control, see // Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). func (client VirtualNetworkClient) CreateDrgAttachment(ctx context.Context, request CreateDrgAttachmentRequest) (response CreateDrgAttachmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/drgAttachments", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createDrgAttachment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDrgAttachmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDrgAttachment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgAttachments") + if err != nil { + return nil, err + } + + var response CreateDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateIPSecConnection Creates a new IPSec connection between the specified DRG and CPE. For more information, see @@ -304,24 +581,45 @@ func (client VirtualNetworkClient) CreateDrgAttachment(ctx context.Context, requ // To get the status of the tunnels (whether they're up or down), use // GetIPSecConnectionDeviceStatus. func (client VirtualNetworkClient) CreateIPSecConnection(ctx context.Context, request CreateIPSecConnectionRequest) (response CreateIPSecConnectionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/ipsecConnections", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createIPSecConnection, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(CreateIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIPSecConnectionResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } +// createIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createIPSecConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipsecConnections") + if err != nil { + return nil, err + } + + var response CreateIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateInternetGateway Creates a new Internet Gateway for the specified VCN. For more information, see -// Connectivity to the Internet (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm). +// Access to the Internet (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm). // For the purposes of access control, you must provide the OCID of the compartment where you want the Internet // Gateway to reside. Notice that the Internet Gateway doesn't have to be in the same compartment as the VCN or // other Networking Service components. If you're not sure which compartment to use, put the Internet @@ -338,60 +636,216 @@ func (client VirtualNetworkClient) CreateIPSecConnection(ctx context.Context, re // use UpdateInternetGateway to easily disable/enable // the gateway without changing the route rule. func (client VirtualNetworkClient) CreateInternetGateway(ctx context.Context, request CreateInternetGatewayRequest) (response CreateInternetGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/internetGateways", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createInternetGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateInternetGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createInternetGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/internetGateways") + if err != nil { + return nil, err + } + + var response CreateInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateLocalPeeringGateway Creates a new local peering gateway (LPG) for the specified VCN. func (client VirtualNetworkClient) CreateLocalPeeringGateway(ctx context.Context, request CreateLocalPeeringGatewayRequest) (response CreateLocalPeeringGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/localPeeringGateways", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createLocalPeeringGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateLocalPeeringGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createLocalPeeringGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/localPeeringGateways") + if err != nil { + return nil, err + } + + var response CreateLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreatePrivateIp Creates a secondary private IP for the specified VNIC. // For more information about secondary private IPs, see // IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). func (client VirtualNetworkClient) CreatePrivateIp(ctx context.Context, request CreatePrivateIpRequest) (response CreatePrivateIpResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/privateIps", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createPrivateIp, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreatePrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePrivateIpResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createPrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createPrivateIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateIps") + if err != nil { + return nil, err + } + + var response CreatePrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePublicIp Creates a public IP. Use the `lifetime` property to specify whether it's an ephemeral or +// reserved public IP. For information about limits on how many you can create, see +// Public IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). +// * **For an ephemeral public IP:** You must also specify a `privateIpId` with the OCID of +// the primary private IP you want to assign the public IP to. The public IP is created in +// the same Availability Domain as the private IP. An ephemeral public IP must always be +// assigned to a private IP, and only to the *primary* private IP on a VNIC, not a secondary +// private IP. +// * **For a reserved public IP:** You may also optionally assign the public IP to a private +// IP by specifying `privateIpId`. Or you can later assign the public IP with +// UpdatePublicIp. +// **Note:** When assigning a public IP to a private IP, the private IP must not already have +// a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it does, an error is returned. +// Also, for reserved public IPs, the optional assignment part of this operation is +// asynchronous. Poll the public IP's `lifecycleState` to determine if the assignment +// succeeded. +func (client VirtualNetworkClient) CreatePublicIp(ctx context.Context, request CreatePublicIpRequest) (response CreatePublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createPublicIp, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreatePublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePublicIpResponse") + } return } +// createPublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createPublicIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIps") + if err != nil { + return nil, err + } + + var response CreatePublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateRemotePeeringConnection Creates a new remote peering connection (RPC) for the specified DRG. +func (client VirtualNetworkClient) CreateRemotePeeringConnection(ctx context.Context, request CreateRemotePeeringConnectionRequest) (response CreateRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createRemotePeeringConnection, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRemotePeeringConnectionResponse") + } + return +} + +// createRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createRemotePeeringConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/remotePeeringConnections") + if err != nil { + return nil, err + } + + var response CreateRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateRouteTable Creates a new route table for the specified VCN. In the request you must also include at least one route // rule for the new route table. For information on the number of rules you can have in a route table, see // Service Limits (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). For general information about route @@ -406,20 +860,41 @@ func (client VirtualNetworkClient) CreatePrivateIp(ctx context.Context, request // You may optionally specify a *display name* for the route table, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. func (client VirtualNetworkClient) CreateRouteTable(ctx context.Context, request CreateRouteTableRequest) (response CreateRouteTableResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/routeTables", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createRouteTable, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRouteTableResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createRouteTable(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/routeTables") + if err != nil { + return nil, err + } + + var response CreateRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateSecurityList Creates a new security list for the specified VCN. For more information @@ -435,22 +910,88 @@ func (client VirtualNetworkClient) CreateRouteTable(ctx context.Context, request // You may optionally specify a *display name* for the security list, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. func (client VirtualNetworkClient) CreateSecurityList(ctx context.Context, request CreateSecurityListRequest) (response CreateSecurityListResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/securityLists", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createSecurityList, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSecurityListResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createSecurityList(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/securityLists") + if err != nil { + return nil, err + } + + var response CreateSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateServiceGateway Creates a new service gateway in the specified compartment. +// For the purposes of access control, you must provide the OCID of the compartment where you want +// the service gateway to reside. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the service gateway, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +func (client VirtualNetworkClient) CreateServiceGateway(ctx context.Context, request CreateServiceGatewayRequest) (response CreateServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createServiceGateway, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateServiceGatewayResponse") + } return } +// createServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createServiceGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/serviceGateways") + if err != nil { + return nil, err + } + + var response CreateServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateSubnet Creates a new subnet in the specified VCN. You can't change the size of the subnet after creation, // so it's important to think about the size of subnets you need before creating them. // For more information, see VCNs and Subnets (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). @@ -477,20 +1018,41 @@ func (client VirtualNetworkClient) CreateSecurityList(ctx context.Context, reque // VCN Resolver to resolve hostnames for instances in the subnet. For more information, see // DNS in Your Virtual Cloud Network (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). func (client VirtualNetworkClient) CreateSubnet(ctx context.Context, request CreateSubnetRequest) (response CreateSubnetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/subnets", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createSubnet, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSubnetResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createSubnet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets") + if err != nil { + return nil, err + } + + var response CreateSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateVcn Creates a new Virtual Cloud Network (VCN). For more information, see @@ -517,20 +1079,41 @@ func (client VirtualNetworkClient) CreateSubnet(ctx context.Context, request Cre // or FastConnect. For more information, see // Overview of the Networking Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm). func (client VirtualNetworkClient) CreateVcn(ctx context.Context, request CreateVcnRequest) (response CreateVcnResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/vcns", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVcn, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVcnResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createVcn(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns") + if err != nil { + return nil, err + } + + var response CreateVcnResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateVirtualCircuit Creates a new virtual circuit to use with Oracle Cloud @@ -552,79 +1135,163 @@ func (client VirtualNetworkClient) CreateVcn(ctx context.Context, request Create // traffic will not flow. For more information, see // Route Tables (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). func (client VirtualNetworkClient) CreateVirtualCircuit(ctx context.Context, request CreateVirtualCircuitRequest) (response CreateVirtualCircuitResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/virtualCircuits", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVirtualCircuit, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVirtualCircuitResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createVirtualCircuit(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualCircuits") + if err != nil { + return nil, err + } + + var response CreateVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteCpe Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous // operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely // removed. func (client VirtualNetworkClient) DeleteCpe(ctx context.Context, request DeleteCpeRequest) (response DeleteCpeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/cpes/{cpeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCpe, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCpeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteCpe(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/cpes/{cpeId}") + if err != nil { + return nil, err + } + + var response DeleteCpeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteCrossConnect Deletes the specified cross-connect. It must not be mapped to a // VirtualCircuit. func (client VirtualNetworkClient) DeleteCrossConnect(ctx context.Context, request DeleteCrossConnectRequest) (response DeleteCrossConnectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/crossConnects/{crossConnectId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCrossConnect, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCrossConnectResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteCrossConnect(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/crossConnects/{crossConnectId}") + if err != nil { + return nil, err + } + + var response DeleteCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteCrossConnectGroup Deletes the specified cross-connect group. It must not contain any // cross-connects, and it cannot be mapped to a // VirtualCircuit. func (client VirtualNetworkClient) DeleteCrossConnectGroup(ctx context.Context, request DeleteCrossConnectGroupRequest) (response DeleteCrossConnectGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/crossConnectGroups/{crossConnectGroupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCrossConnectGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCrossConnectGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteCrossConnectGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/crossConnectGroups/{crossConnectGroupId}") + if err != nil { + return nil, err + } + + var response DeleteCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteDhcpOptions Deletes the specified set of DHCP options, but only if it's not associated with a subnet. You can't delete a @@ -632,20 +1299,41 @@ func (client VirtualNetworkClient) DeleteCrossConnectGroup(ctx context.Context, // This is an asynchronous operation. The state of the set of options will switch to TERMINATING temporarily // until the set is completely removed. func (client VirtualNetworkClient) DeleteDhcpOptions(ctx context.Context, request DeleteDhcpOptionsRequest) (response DeleteDhcpOptionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/dhcps/{dhcpId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDhcpOptions, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDhcpOptionsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDhcpOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dhcps/{dhcpId}") + if err != nil { + return nil, err + } + + var response DeleteDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteDrg Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise @@ -653,40 +1341,82 @@ func (client VirtualNetworkClient) DeleteDhcpOptions(ctx context.Context, reques // operation. The DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely // removed. func (client VirtualNetworkClient) DeleteDrg(ctx context.Context, request DeleteDrgRequest) (response DeleteDrgResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/drgs/{drgId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDrg, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDrgResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDrg(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/drgs/{drgId}") + if err != nil { + return nil, err + } + + var response DeleteDrgResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteDrgAttachment Detaches a DRG from a VCN by deleting the corresponding `DrgAttachment`. This is an asynchronous // operation. The attachment's `lifecycleState` will change to DETACHING temporarily until the attachment // is completely removed. func (client VirtualNetworkClient) DeleteDrgAttachment(ctx context.Context, request DeleteDrgAttachmentRequest) (response DeleteDrgAttachmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/drgAttachments/{drgAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDrgAttachment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDrgAttachmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDrgAttachment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/drgAttachments/{drgAttachmentId}") + if err != nil { + return nil, err + } + + var response DeleteDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteIPSecConnection Deletes the specified IPSec connection. If your goal is to disable the IPSec VPN between your VCN and @@ -697,20 +1427,41 @@ func (client VirtualNetworkClient) DeleteDrgAttachment(ctx context.Context, requ // This is an asynchronous operation. The connection's `lifecycleState` will change to TERMINATING temporarily // until the connection is completely removed. func (client VirtualNetworkClient) DeleteIPSecConnection(ctx context.Context, request DeleteIPSecConnectionRequest) (response DeleteIPSecConnectionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/ipsecConnections/{ipscId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteIPSecConnection, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIPSecConnectionResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteIPSecConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/ipsecConnections/{ipscId}") + if err != nil { + return nil, err + } + + var response DeleteIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteInternetGateway Deletes the specified Internet Gateway. The Internet Gateway does not have to be disabled, but @@ -718,40 +1469,82 @@ func (client VirtualNetworkClient) DeleteIPSecConnection(ctx context.Context, re // This is an asynchronous operation. The gateway's `lifecycleState` will change to TERMINATING temporarily // until the gateway is completely removed. func (client VirtualNetworkClient) DeleteInternetGateway(ctx context.Context, request DeleteInternetGatewayRequest) (response DeleteInternetGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/internetGateways/{igId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteInternetGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteInternetGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteInternetGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/internetGateways/{igId}") + if err != nil { + return nil, err + } + + var response DeleteInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteLocalPeeringGateway Deletes the specified local peering gateway (LPG). // This is an asynchronous operation; the local peering gateway's `lifecycleState` changes to TERMINATING temporarily // until the local peering gateway is completely removed. func (client VirtualNetworkClient) DeleteLocalPeeringGateway(ctx context.Context, request DeleteLocalPeeringGatewayRequest) (response DeleteLocalPeeringGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/localPeeringGateways/{localPeeringGatewayId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteLocalPeeringGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteLocalPeeringGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteLocalPeeringGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/localPeeringGateways/{localPeeringGatewayId}") + if err != nil { + return nil, err + } + + var response DeleteLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeletePrivateIp Unassigns and deletes the specified private IP. You must @@ -764,41 +1557,171 @@ func (client VirtualNetworkClient) DeleteLocalPeeringGateway(ctx context.Context // unassigning it from the VNIC causes that route rule to blackhole and the traffic // will be dropped. func (client VirtualNetworkClient) DeletePrivateIp(ctx context.Context, request DeletePrivateIpRequest) (response DeletePrivateIpResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/privateIps/{privateIpId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePrivateIp, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeletePrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePrivateIpResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deletePrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deletePrivateIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/privateIps/{privateIpId}") + if err != nil { + return nil, err + } + + var response DeletePrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePublicIp Unassigns and deletes the specified public IP (either ephemeral or reserved). +// You must specify the object's OCID. The public IP address is returned to the +// Oracle Cloud Infrastructure public IP pool. +// For an assigned reserved public IP, the initial unassignment portion of this operation +// is asynchronous. Poll the public IP's `lifecycleState` to determine +// if the operation succeeded. +// If you want to simply unassign a reserved public IP and return it to your pool +// of reserved public IPs, instead use +// UpdatePublicIp. +func (client VirtualNetworkClient) DeletePublicIp(ctx context.Context, request DeletePublicIpRequest) (response DeletePublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePublicIp, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeletePublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePublicIpResponse") + } return } +// deletePublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deletePublicIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/publicIps/{publicIpId}") + if err != nil { + return nil, err + } + + var response DeletePublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRemotePeeringConnection Deletes the remote peering connection (RPC). +// This is an asynchronous operation; the RPC's `lifecycleState` changes to TERMINATING temporarily +// until the RPC is completely removed. +func (client VirtualNetworkClient) DeleteRemotePeeringConnection(ctx context.Context, request DeleteRemotePeeringConnectionRequest) (response DeleteRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRemotePeeringConnection, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRemotePeeringConnectionResponse") + } + return +} + +// deleteRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteRemotePeeringConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/remotePeeringConnections/{remotePeeringConnectionId}") + if err != nil { + return nil, err + } + + var response DeleteRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteRouteTable Deletes the specified route table, but only if it's not associated with a subnet. You can't delete a // VCN's default route table. // This is an asynchronous operation. The route table's `lifecycleState` will change to TERMINATING temporarily // until the route table is completely removed. func (client VirtualNetworkClient) DeleteRouteTable(ctx context.Context, request DeleteRouteTableRequest) (response DeleteRouteTableResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/routeTables/{rtId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRouteTable, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRouteTableResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteRouteTable(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/routeTables/{rtId}") + if err != nil { + return nil, err + } + + var response DeleteRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteSecurityList Deletes the specified security list, but only if it's not associated with a subnet. You can't delete @@ -806,60 +1729,163 @@ func (client VirtualNetworkClient) DeleteRouteTable(ctx context.Context, request // This is an asynchronous operation. The security list's `lifecycleState` will change to TERMINATING temporarily // until the security list is completely removed. func (client VirtualNetworkClient) DeleteSecurityList(ctx context.Context, request DeleteSecurityListRequest) (response DeleteSecurityListResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/securityLists/{securityListId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSecurityList, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSecurityListResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteSecurityList(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/securityLists/{securityListId}") + if err != nil { + return nil, err + } + + var response DeleteSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteServiceGateway Deletes the specified service gateway. There must not be a route table that lists the service +// gateway as a target. +func (client VirtualNetworkClient) DeleteServiceGateway(ctx context.Context, request DeleteServiceGatewayRequest) (response DeleteServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteServiceGateway, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteServiceGatewayResponse") + } return } +// deleteServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteServiceGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/serviceGateways/{serviceGatewayId}") + if err != nil { + return nil, err + } + + var response DeleteServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteSubnet Deletes the specified subnet, but only if there are no instances in the subnet. This is an asynchronous // operation. The subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any // instances in the subnet, the state will instead change back to AVAILABLE. func (client VirtualNetworkClient) DeleteSubnet(ctx context.Context, request DeleteSubnetRequest) (response DeleteSubnetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/subnets/{subnetId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSubnet, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSubnetResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteSubnet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/subnets/{subnetId}") + if err != nil { + return nil, err + } + + var response DeleteSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteVcn Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous // operation. The VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely // removed. func (client VirtualNetworkClient) DeleteVcn(ctx context.Context, request DeleteVcnRequest) (response DeleteVcnResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/vcns/{vcnId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVcn, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVcnResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteVcn(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/vcns/{vcnId}") + if err != nil { + return nil, err + } + + var response DeleteVcnResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteVirtualCircuit Deletes the specified virtual circuit. @@ -867,276 +1893,641 @@ func (client VirtualNetworkClient) DeleteVcn(ctx context.Context, request Delete // make sure to also terminate the connection with // the provider, or else the provider may continue to bill you. func (client VirtualNetworkClient) DeleteVirtualCircuit(ctx context.Context, request DeleteVirtualCircuitRequest) (response DeleteVirtualCircuitResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/virtualCircuits/{virtualCircuitId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVirtualCircuit, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVirtualCircuitResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteVirtualCircuit(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/virtualCircuits/{virtualCircuitId}") + if err != nil { + return nil, err + } + + var response DeleteVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachServiceId Disables the specified service on the specified gateway. In other words, stops the service +// gateway from sending traffic to the specified service. You do not need to remove any route +// rules that specify this service's `cidrBlock` as the destination CIDR. However, consider +// removing the rules if your intent is to permanently disable use of the service through this +// service gateway. +// **Note:** The `DetachServiceId` operation is an easy way to disable an individual service on +// the service gateway. Compare it with +// UpdateServiceGateway, which also +// lets you disable an individual service. However, with `UpdateServiceGateway`, you must specify +// the *entire* list of services you want enabled on the service gateway. `UpdateServiceGateway` +// also lets you block all traffic through the service gateway without having to disable each of +// the individual services. +func (client VirtualNetworkClient) DetachServiceId(ctx context.Context, request DetachServiceIdRequest) (response DetachServiceIdResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachServiceId, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DetachServiceIdResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachServiceIdResponse") + } return } +// detachServiceId implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) detachServiceId(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/serviceGateways/{serviceGatewayId}/actions/detachService") + if err != nil { + return nil, err + } + + var response DetachServiceIdResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetCpe Gets the specified CPE's information. func (client VirtualNetworkClient) GetCpe(ctx context.Context, request GetCpeRequest) (response GetCpeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/cpes/{cpeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCpe, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCpeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCpe(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cpes/{cpeId}") + if err != nil { + return nil, err + } + + var response GetCpeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetCrossConnect Gets the specified cross-connect's information. func (client VirtualNetworkClient) GetCrossConnect(ctx context.Context, request GetCrossConnectRequest) (response GetCrossConnectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects/{crossConnectId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnect, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnect(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects/{crossConnectId}") + if err != nil { + return nil, err + } + + var response GetCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetCrossConnectGroup Gets the specified cross-connect group's information. func (client VirtualNetworkClient) GetCrossConnectGroup(ctx context.Context, request GetCrossConnectGroupRequest) (response GetCrossConnectGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectGroups/{crossConnectGroupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnectGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnectGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectGroups/{crossConnectGroupId}") + if err != nil { + return nil, err + } + + var response GetCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetCrossConnectLetterOfAuthority Gets the Letter of Authority for the specified cross-connect. func (client VirtualNetworkClient) GetCrossConnectLetterOfAuthority(ctx context.Context, request GetCrossConnectLetterOfAuthorityRequest) (response GetCrossConnectLetterOfAuthorityResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects/{crossConnectId}/letterOfAuthority", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnectLetterOfAuthority, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetCrossConnectLetterOfAuthorityResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectLetterOfAuthorityResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getCrossConnectLetterOfAuthority implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnectLetterOfAuthority(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects/{crossConnectId}/letterOfAuthority") + if err != nil { + return nil, err + } + + var response GetCrossConnectLetterOfAuthorityResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetCrossConnectStatus Gets the status of the specified cross-connect. func (client VirtualNetworkClient) GetCrossConnectStatus(ctx context.Context, request GetCrossConnectStatusRequest) (response GetCrossConnectStatusResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects/{crossConnectId}/status", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnectStatus, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetCrossConnectStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectStatusResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getCrossConnectStatus implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnectStatus(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects/{crossConnectId}/status") + if err != nil { + return nil, err + } + + var response GetCrossConnectStatusResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDhcpOptions Gets the specified set of DHCP options. func (client VirtualNetworkClient) GetDhcpOptions(ctx context.Context, request GetDhcpOptionsRequest) (response GetDhcpOptionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dhcps/{dhcpId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDhcpOptions, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDhcpOptionsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDhcpOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dhcps/{dhcpId}") + if err != nil { + return nil, err + } + + var response GetDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDrg Gets the specified DRG's information. func (client VirtualNetworkClient) GetDrg(ctx context.Context, request GetDrgRequest) (response GetDrgResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgs/{drgId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDrg, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrgResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDrg(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgs/{drgId}") + if err != nil { + return nil, err + } + + var response GetDrgResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDrgAttachment Gets the information for the specified `DrgAttachment`. func (client VirtualNetworkClient) GetDrgAttachment(ctx context.Context, request GetDrgAttachmentRequest) (response GetDrgAttachmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgAttachments/{drgAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDrgAttachment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrgAttachmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDrgAttachment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgAttachments/{drgAttachmentId}") + if err != nil { + return nil, err + } + + var response GetDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetFastConnectProviderService Gets the specified provider service. // For more information, see FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). func (client VirtualNetworkClient) GetFastConnectProviderService(ctx context.Context, request GetFastConnectProviderServiceRequest) (response GetFastConnectProviderServiceResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getFastConnectProviderService, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetFastConnectProviderServiceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFastConnectProviderServiceResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getFastConnectProviderService implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getFastConnectProviderService(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}") + if err != nil { + return nil, err + } + + var response GetFastConnectProviderServiceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetIPSecConnection Gets the specified IPSec connection's basic information, including the static routes for the // on-premises router. If you want the status of the connection (whether it's up or down), use // GetIPSecConnectionDeviceStatus. func (client VirtualNetworkClient) GetIPSecConnection(ctx context.Context, request GetIPSecConnectionRequest) (response GetIPSecConnectionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections/{ipscId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnection, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}") + if err != nil { + return nil, err + } + + var response GetIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetIPSecConnectionDeviceConfig Gets the configuration information for the specified IPSec connection. For each tunnel, the // response includes the IP address of Oracle's VPN headend and the shared secret. func (client VirtualNetworkClient) GetIPSecConnectionDeviceConfig(ctx context.Context, request GetIPSecConnectionDeviceConfigRequest) (response GetIPSecConnectionDeviceConfigResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections/{ipscId}/deviceConfig", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnectionDeviceConfig, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionDeviceConfigResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionDeviceConfigResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getIPSecConnectionDeviceConfig implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnectionDeviceConfig(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/deviceConfig") + if err != nil { + return nil, err + } + + var response GetIPSecConnectionDeviceConfigResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetIPSecConnectionDeviceStatus Gets the status of the specified IPSec connection (whether it's up or down). func (client VirtualNetworkClient) GetIPSecConnectionDeviceStatus(ctx context.Context, request GetIPSecConnectionDeviceStatusRequest) (response GetIPSecConnectionDeviceStatusResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections/{ipscId}/deviceStatus", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnectionDeviceStatus, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionDeviceStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionDeviceStatusResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getIPSecConnectionDeviceStatus implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnectionDeviceStatus(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/deviceStatus") + if err != nil { + return nil, err + } + + var response GetIPSecConnectionDeviceStatusResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetInternetGateway Gets the specified Internet Gateway's information. func (client VirtualNetworkClient) GetInternetGateway(ctx context.Context, request GetInternetGatewayRequest) (response GetInternetGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/internetGateways/{igId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInternetGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInternetGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getInternetGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/internetGateways/{igId}") + if err != nil { + return nil, err + } + + var response GetInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetLocalPeeringGateway Gets the specified local peering gateway's information. func (client VirtualNetworkClient) GetLocalPeeringGateway(ctx context.Context, request GetLocalPeeringGatewayRequest) (response GetLocalPeeringGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/localPeeringGateways/{localPeeringGatewayId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getLocalPeeringGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetLocalPeeringGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getLocalPeeringGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/localPeeringGateways/{localPeeringGatewayId}") + if err != nil { + return nil, err + } + + var response GetLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetPrivateIp Gets the specified private IP. You must specify the object's OCID. @@ -1144,110 +2535,489 @@ func (client VirtualNetworkClient) GetLocalPeeringGateway(ctx context.Context, r // ListPrivateIps // with the private IP address (for example, 10.0.3.3) and subnet OCID. func (client VirtualNetworkClient) GetPrivateIp(ctx context.Context, request GetPrivateIpRequest) (response GetPrivateIpResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/privateIps/{privateIpId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPrivateIp, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetPrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPrivateIpResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getPrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPrivateIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/privateIps/{privateIpId}") + if err != nil { + return nil, err + } + + var response GetPrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPublicIp Gets the specified public IP. You must specify the object's OCID. +// Alternatively, you can get the object by using GetPublicIpByIpAddress +// with the public IP address (for example, 129.146.2.1). +// Or you can use GetPublicIpByPrivateIpId +// with the OCID of the private IP that the public IP is assigned to. +// **Note:** If you're fetching a reserved public IP that is in the process of being +// moved to a different private IP, the service returns the public IP object with +// `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP. +func (client VirtualNetworkClient) GetPublicIp(ctx context.Context, request GetPublicIpRequest) (response GetPublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPublicIp, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetPublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPublicIpResponse") + } return } +// getPublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPublicIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/publicIps/{publicIpId}") + if err != nil { + return nil, err + } + + var response GetPublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPublicIpByIpAddress Gets the public IP based on the public IP address (for example, 129.146.2.1). +// **Note:** If you're fetching a reserved public IP that is in the process of being +// moved to a different private IP, the service returns the public IP object with +// `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP. +func (client VirtualNetworkClient) GetPublicIpByIpAddress(ctx context.Context, request GetPublicIpByIpAddressRequest) (response GetPublicIpByIpAddressResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPublicIpByIpAddress, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetPublicIpByIpAddressResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPublicIpByIpAddressResponse") + } + return +} + +// getPublicIpByIpAddress implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPublicIpByIpAddress(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIps/actions/getByIpAddress") + if err != nil { + return nil, err + } + + var response GetPublicIpByIpAddressResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPublicIpByPrivateIpId Gets the public IP assigned to the specified private IP. You must specify the OCID +// of the private IP. If no public IP is assigned, a 404 is returned. +// **Note:** If you're fetching a reserved public IP that is in the process of being +// moved to a different private IP, and you provide the OCID of the original private +// IP, this operation returns a 404. If you instead provide the OCID of the target +// private IP, or if you instead call +// GetPublicIp or +// GetPublicIpByIpAddress, the +// service returns the public IP object with `lifecycleState` = ASSIGNING and `privateIpId` = OCID +// of the target private IP. +func (client VirtualNetworkClient) GetPublicIpByPrivateIpId(ctx context.Context, request GetPublicIpByPrivateIpIdRequest) (response GetPublicIpByPrivateIpIdResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPublicIpByPrivateIpId, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetPublicIpByPrivateIpIdResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPublicIpByPrivateIpIdResponse") + } + return +} + +// getPublicIpByPrivateIpId implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPublicIpByPrivateIpId(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIps/actions/getByPrivateIpId") + if err != nil { + return nil, err + } + + var response GetPublicIpByPrivateIpIdResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRemotePeeringConnection Get the specified remote peering connection's information. +func (client VirtualNetworkClient) GetRemotePeeringConnection(ctx context.Context, request GetRemotePeeringConnectionRequest) (response GetRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getRemotePeeringConnection, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRemotePeeringConnectionResponse") + } + return +} + +// getRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getRemotePeeringConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/remotePeeringConnections/{remotePeeringConnectionId}") + if err != nil { + return nil, err + } + + var response GetRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetRouteTable Gets the specified route table's information. func (client VirtualNetworkClient) GetRouteTable(ctx context.Context, request GetRouteTableRequest) (response GetRouteTableResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/routeTables/{rtId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getRouteTable, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRouteTableResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getRouteTable(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/routeTables/{rtId}") + if err != nil { + return nil, err + } + + var response GetRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetSecurityList Gets the specified security list's information. func (client VirtualNetworkClient) GetSecurityList(ctx context.Context, request GetSecurityListRequest) (response GetSecurityListResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/securityLists/{securityListId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSecurityList, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSecurityListResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getSecurityList(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/securityLists/{securityListId}") + if err != nil { + return nil, err + } + + var response GetSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetService Gets the specified service's information. +func (client VirtualNetworkClient) GetService(ctx context.Context, request GetServiceRequest) (response GetServiceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getService, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetServiceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetServiceResponse") + } return } +// getService implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getService(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/services/{serviceId}") + if err != nil { + return nil, err + } + + var response GetServiceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetServiceGateway Gets the specified service gateway's information. +func (client VirtualNetworkClient) GetServiceGateway(ctx context.Context, request GetServiceGatewayRequest) (response GetServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getServiceGateway, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetServiceGatewayResponse") + } + return +} + +// getServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getServiceGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/serviceGateways/{serviceGatewayId}") + if err != nil { + return nil, err + } + + var response GetServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetSubnet Gets the specified subnet's information. func (client VirtualNetworkClient) GetSubnet(ctx context.Context, request GetSubnetRequest) (response GetSubnetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/subnets/{subnetId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSubnet, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSubnetResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getSubnet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/subnets/{subnetId}") + if err != nil { + return nil, err + } + + var response GetSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetVcn Gets the specified VCN's information. func (client VirtualNetworkClient) GetVcn(ctx context.Context, request GetVcnRequest) (response GetVcnResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vcns/{vcnId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVcn, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVcnResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVcn(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vcns/{vcnId}") + if err != nil { + return nil, err + } + + var response GetVcnResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetVirtualCircuit Gets the specified virtual circuit's information. func (client VirtualNetworkClient) GetVirtualCircuit(ctx context.Context, request GetVirtualCircuitRequest) (response GetVirtualCircuitResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuits/{virtualCircuitId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVirtualCircuit, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVirtualCircuitResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVirtualCircuit(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}") + if err != nil { + return nil, err + } + + var response GetVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetVnic Gets the information for the specified virtual network interface card (VNIC). @@ -1255,171 +3025,400 @@ func (client VirtualNetworkClient) GetVirtualCircuit(ctx context.Context, reques // ListVnicAttachments // operation. func (client VirtualNetworkClient) GetVnic(ctx context.Context, request GetVnicRequest) (response GetVnicResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vnics/{vnicId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVnic, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVnicResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getVnic implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVnic(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vnics/{vnicId}") + if err != nil { + return nil, err + } + + var response GetVnicResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAllowedPeerRegionsForRemotePeering Lists the regions that support remote VCN peering (which is peering across regions). +// For more information, see VCN Peering (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.htm). +func (client VirtualNetworkClient) ListAllowedPeerRegionsForRemotePeering(ctx context.Context, request ListAllowedPeerRegionsForRemotePeeringRequest) (response ListAllowedPeerRegionsForRemotePeeringResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAllowedPeerRegionsForRemotePeering, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListAllowedPeerRegionsForRemotePeeringResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAllowedPeerRegionsForRemotePeeringResponse") + } return } +// listAllowedPeerRegionsForRemotePeering implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listAllowedPeerRegionsForRemotePeering(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/allowedPeerRegionsForRemotePeering") + if err != nil { + return nil, err + } + + var response ListAllowedPeerRegionsForRemotePeeringResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListCpes Lists the Customer-Premises Equipment objects (CPEs) in the specified compartment. func (client VirtualNetworkClient) ListCpes(ctx context.Context, request ListCpesRequest) (response ListCpesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/cpes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCpes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListCpesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCpesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listCpes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCpes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cpes") + if err != nil { + return nil, err + } + + var response ListCpesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListCrossConnectGroups Lists the cross-connect groups in the specified compartment. func (client VirtualNetworkClient) ListCrossConnectGroups(ctx context.Context, request ListCrossConnectGroupsRequest) (response ListCrossConnectGroupsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectGroups", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossConnectGroups, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListCrossConnectGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossConnectGroupsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listCrossConnectGroups implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossConnectGroups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectGroups") + if err != nil { + return nil, err + } + + var response ListCrossConnectGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListCrossConnectLocations Lists the available FastConnect locations for cross-connect installation. You need // this information so you can specify your desired location when you create a cross-connect. func (client VirtualNetworkClient) ListCrossConnectLocations(ctx context.Context, request ListCrossConnectLocationsRequest) (response ListCrossConnectLocationsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectLocations", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossConnectLocations, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListCrossConnectLocationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossConnectLocationsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listCrossConnectLocations implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossConnectLocations(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectLocations") + if err != nil { + return nil, err + } + + var response ListCrossConnectLocationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListCrossConnects Lists the cross-connects in the specified compartment. You can filter the list // by specifying the OCID of a cross-connect group. func (client VirtualNetworkClient) ListCrossConnects(ctx context.Context, request ListCrossConnectsRequest) (response ListCrossConnectsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossConnects, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListCrossConnectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossConnectsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listCrossConnects implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossConnects(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects") + if err != nil { + return nil, err + } + + var response ListCrossConnectsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListCrossconnectPortSpeedShapes Lists the available port speeds for cross-connects. You need this information // so you can specify your desired port speed (that is, shape) when you create a // cross-connect. func (client VirtualNetworkClient) ListCrossconnectPortSpeedShapes(ctx context.Context, request ListCrossconnectPortSpeedShapesRequest) (response ListCrossconnectPortSpeedShapesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectPortSpeedShapes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossconnectPortSpeedShapes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListCrossconnectPortSpeedShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossconnectPortSpeedShapesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listCrossconnectPortSpeedShapes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossconnectPortSpeedShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectPortSpeedShapes") + if err != nil { + return nil, err + } + + var response ListCrossconnectPortSpeedShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDhcpOptions Lists the sets of DHCP options in the specified VCN and specified compartment. // The response includes the default set of options that automatically comes with each VCN, // plus any other sets you've created. func (client VirtualNetworkClient) ListDhcpOptions(ctx context.Context, request ListDhcpOptionsRequest) (response ListDhcpOptionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dhcps", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDhcpOptions, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDhcpOptionsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDhcpOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dhcps") + if err != nil { + return nil, err + } + + var response ListDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDrgAttachments Lists the `DrgAttachment` objects for the specified compartment. You can filter the // results by VCN or DRG. func (client VirtualNetworkClient) ListDrgAttachments(ctx context.Context, request ListDrgAttachmentsRequest) (response ListDrgAttachmentsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgAttachments", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgAttachments, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDrgAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgAttachmentsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDrgAttachments implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgAttachments(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgAttachments") + if err != nil { + return nil, err + } + + var response ListDrgAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDrgs Lists the DRGs in the specified compartment. func (client VirtualNetworkClient) ListDrgs(ctx context.Context, request ListDrgsRequest) (response ListDrgsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgs", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgs, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDrgsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDrgs implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgs(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgs") + if err != nil { + return nil, err + } + + var response ListDrgsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListFastConnectProviderServices Lists the service offerings from supported providers. You need this @@ -1428,96 +3427,201 @@ func (client VirtualNetworkClient) ListDrgs(ctx context.Context, request ListDrg // For the compartment ID, provide the OCID of your tenancy (the root compartment). // For more information, see FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). func (client VirtualNetworkClient) ListFastConnectProviderServices(ctx context.Context, request ListFastConnectProviderServicesRequest) (response ListFastConnectProviderServicesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/fastConnectProviderServices", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listFastConnectProviderServices, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListFastConnectProviderServicesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFastConnectProviderServicesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listFastConnectProviderServices implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listFastConnectProviderServices(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fastConnectProviderServices") + if err != nil { + return nil, err + } + + var response ListFastConnectProviderServicesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListFastConnectProviderVirtualCircuitBandwidthShapes Gets the list of available virtual circuit bandwidth levels for a provider. // You need this information so you can specify your desired bandwidth level (shape) when you create a virtual circuit. // For more information about virtual circuits, see FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). func (client VirtualNetworkClient) ListFastConnectProviderVirtualCircuitBandwidthShapes(ctx context.Context, request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) (response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}/virtualCircuitBandwidthShapes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listFastConnectProviderVirtualCircuitBandwidthShapes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListFastConnectProviderVirtualCircuitBandwidthShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFastConnectProviderVirtualCircuitBandwidthShapesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listFastConnectProviderVirtualCircuitBandwidthShapes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listFastConnectProviderVirtualCircuitBandwidthShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}/virtualCircuitBandwidthShapes") + if err != nil { + return nil, err + } + + var response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListIPSecConnections Lists the IPSec connections for the specified compartment. You can filter the // results by DRG or CPE. func (client VirtualNetworkClient) ListIPSecConnections(ctx context.Context, request ListIPSecConnectionsRequest) (response ListIPSecConnectionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIPSecConnections, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListIPSecConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIPSecConnectionsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listIPSecConnections implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listIPSecConnections(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections") + if err != nil { + return nil, err + } + + var response ListIPSecConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListInternetGateways Lists the Internet Gateways in the specified VCN and the specified compartment. func (client VirtualNetworkClient) ListInternetGateways(ctx context.Context, request ListInternetGatewaysRequest) (response ListInternetGatewaysResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/internetGateways", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInternetGateways, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListInternetGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInternetGatewaysResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listInternetGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listInternetGateways(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/internetGateways") + if err != nil { + return nil, err + } + + var response ListInternetGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListLocalPeeringGateways Lists the local peering gateways (LPGs) for the specified VCN and compartment // (the LPG's compartment). func (client VirtualNetworkClient) ListLocalPeeringGateways(ctx context.Context, request ListLocalPeeringGatewaysRequest) (response ListLocalPeeringGatewaysResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/localPeeringGateways", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listLocalPeeringGateways, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListLocalPeeringGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListLocalPeeringGatewaysResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listLocalPeeringGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listLocalPeeringGateways(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/localPeeringGateways") + if err != nil { + return nil, err + } + + var response ListLocalPeeringGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListPrivateIps Lists the PrivateIp objects based @@ -1532,320 +3636,841 @@ func (client VirtualNetworkClient) ListLocalPeeringGateways(ctx context.Context, // If you're listing all the private IPs associated with a given subnet // or VNIC, the response includes both primary and secondary private IPs. func (client VirtualNetworkClient) ListPrivateIps(ctx context.Context, request ListPrivateIpsRequest) (response ListPrivateIpsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/privateIps", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPrivateIps, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListPrivateIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPrivateIpsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listPrivateIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listPrivateIps(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/privateIps") + if err != nil { + return nil, err + } + + var response ListPrivateIpsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPublicIps Lists either the ephemeral or reserved PublicIp objects +// in the specified compartment. +// To list your reserved public IPs, set `scope` = `REGION`, and leave the +// `availabilityDomain` parameter empty. +// To list your ephemeral public IPs, set `scope` = `AVAILABILITY_DOMAIN`, and set the +// `availabilityDomain` parameter to the desired Availability Domain. An ephemeral public IP +// is always in the same Availability Domain and compartment as the private IP it's assigned to. +func (client VirtualNetworkClient) ListPublicIps(ctx context.Context, request ListPublicIpsRequest) (response ListPublicIpsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPublicIps, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListPublicIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPublicIpsResponse") + } return } +// listPublicIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listPublicIps(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/publicIps") + if err != nil { + return nil, err + } + + var response ListPublicIpsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRemotePeeringConnections Lists the remote peering connections (RPCs) for the specified DRG and compartment +// (the RPC's compartment). +func (client VirtualNetworkClient) ListRemotePeeringConnections(ctx context.Context, request ListRemotePeeringConnectionsRequest) (response ListRemotePeeringConnectionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listRemotePeeringConnections, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListRemotePeeringConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRemotePeeringConnectionsResponse") + } + return +} + +// listRemotePeeringConnections implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listRemotePeeringConnections(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/remotePeeringConnections") + if err != nil { + return nil, err + } + + var response ListRemotePeeringConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListRouteTables Lists the route tables in the specified VCN and specified compartment. The response // includes the default route table that automatically comes with each VCN, plus any route tables // you've created. func (client VirtualNetworkClient) ListRouteTables(ctx context.Context, request ListRouteTablesRequest) (response ListRouteTablesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/routeTables", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listRouteTables, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListRouteTablesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRouteTablesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listRouteTables implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listRouteTables(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/routeTables") + if err != nil { + return nil, err + } + + var response ListRouteTablesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListSecurityLists Lists the security lists in the specified VCN and compartment. func (client VirtualNetworkClient) ListSecurityLists(ctx context.Context, request ListSecurityListsRequest) (response ListSecurityListsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/securityLists", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSecurityLists, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListSecurityListsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSecurityListsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listSecurityLists implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listSecurityLists(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/securityLists") + if err != nil { + return nil, err + } + + var response ListSecurityListsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListServiceGateways Lists the service gateways in the specified compartment. You may optionally specify a VCN OCID +// to filter the results by VCN. +func (client VirtualNetworkClient) ListServiceGateways(ctx context.Context, request ListServiceGatewaysRequest) (response ListServiceGatewaysResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listServiceGateways, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListServiceGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListServiceGatewaysResponse") + } return } +// listServiceGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listServiceGateways(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/serviceGateways") + if err != nil { + return nil, err + } + + var response ListServiceGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListServices Lists the available services that you can access through a service gateway in this region. +func (client VirtualNetworkClient) ListServices(ctx context.Context, request ListServicesRequest) (response ListServicesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listServices, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListServicesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListServicesResponse") + } + return +} + +// listServices implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listServices(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/services") + if err != nil { + return nil, err + } + + var response ListServicesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListSubnets Lists the subnets in the specified VCN and the specified compartment. func (client VirtualNetworkClient) ListSubnets(ctx context.Context, request ListSubnetsRequest) (response ListSubnetsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/subnets", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSubnets, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListSubnetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSubnetsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listSubnets implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listSubnets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/subnets") + if err != nil { + return nil, err + } + + var response ListSubnetsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListVcns Lists the Virtual Cloud Networks (VCNs) in the specified compartment. func (client VirtualNetworkClient) ListVcns(ctx context.Context, request ListVcnsRequest) (response ListVcnsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vcns", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVcns, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListVcnsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVcnsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listVcns implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVcns(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vcns") + if err != nil { + return nil, err + } + + var response ListVcnsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListVirtualCircuitBandwidthShapes The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the OCID of your tenancy (the root compartment). func (client VirtualNetworkClient) ListVirtualCircuitBandwidthShapes(ctx context.Context, request ListVirtualCircuitBandwidthShapesRequest) (response ListVirtualCircuitBandwidthShapesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuitBandwidthShapes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuitBandwidthShapes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitBandwidthShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitBandwidthShapesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listVirtualCircuitBandwidthShapes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuitBandwidthShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuitBandwidthShapes") + if err != nil { + return nil, err + } + + var response ListVirtualCircuitBandwidthShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListVirtualCircuitPublicPrefixes Lists the public IP prefixes and their details for the specified // public virtual circuit. func (client VirtualNetworkClient) ListVirtualCircuitPublicPrefixes(ctx context.Context, request ListVirtualCircuitPublicPrefixesRequest) (response ListVirtualCircuitPublicPrefixesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/publicPrefixes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuitPublicPrefixes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitPublicPrefixesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitPublicPrefixesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listVirtualCircuitPublicPrefixes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuitPublicPrefixes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/publicPrefixes") + if err != nil { + return nil, err + } + + var response ListVirtualCircuitPublicPrefixesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListVirtualCircuits Lists the virtual circuits in the specified compartment. func (client VirtualNetworkClient) ListVirtualCircuits(ctx context.Context, request ListVirtualCircuitsRequest) (response ListVirtualCircuitsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuits", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuits, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(ListVirtualCircuitsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitsResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// UpdateCpe Updates the specified CPE's display name. -// Avoid entering confidential information. -func (client VirtualNetworkClient) UpdateCpe(ctx context.Context, request UpdateCpeRequest) (response UpdateCpeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/cpes/{cpeId}", request) +// listVirtualCircuits implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuits(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response ListVirtualCircuitsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCpe Updates the specified CPE's display name or tags. +// Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateCpe(ctx context.Context, request UpdateCpeRequest) (response UpdateCpeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCpe, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCpeResponse") + } return } +// updateCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateCpe(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/cpes/{cpeId}") + if err != nil { + return nil, err + } + + var response UpdateCpeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateCrossConnect Updates the specified cross-connect. func (client VirtualNetworkClient) UpdateCrossConnect(ctx context.Context, request UpdateCrossConnectRequest) (response UpdateCrossConnectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/crossConnects/{crossConnectId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCrossConnect, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCrossConnectResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateCrossConnect(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/crossConnects/{crossConnectId}") + if err != nil { + return nil, err + } + + var response UpdateCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateCrossConnectGroup Updates the specified cross-connect group's display name. // Avoid entering confidential information. func (client VirtualNetworkClient) UpdateCrossConnectGroup(ctx context.Context, request UpdateCrossConnectGroupRequest) (response UpdateCrossConnectGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/crossConnectGroups/{crossConnectGroupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCrossConnectGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCrossConnectGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateCrossConnectGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/crossConnectGroups/{crossConnectGroupId}") + if err != nil { + return nil, err + } + + var response UpdateCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateDhcpOptions Updates the specified set of DHCP options. You can update the display name or the options // themselves. Avoid entering confidential information. // Note that the `options` object you provide replaces the entire existing set of options. func (client VirtualNetworkClient) UpdateDhcpOptions(ctx context.Context, request UpdateDhcpOptionsRequest) (response UpdateDhcpOptionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/dhcps/{dhcpId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDhcpOptions, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(UpdateDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDhcpOptionsResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// UpdateDrg Updates the specified DRG's display name. Avoid entering confidential information. -func (client VirtualNetworkClient) UpdateDrg(ctx context.Context, request UpdateDrgRequest) (response UpdateDrgResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/drgs/{drgId}", request) +// updateDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDhcpOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dhcps/{dhcpId}") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response UpdateDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDrg Updates the specified DRG's display name or tags. Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateDrg(ctx context.Context, request UpdateDrgRequest) (response UpdateDrgResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrg, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgResponse") + } return } +// updateDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrg(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/drgs/{drgId}") + if err != nil { + return nil, err + } + + var response UpdateDrgResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateDrgAttachment Updates the display name for the specified `DrgAttachment`. // Avoid entering confidential information. func (client VirtualNetworkClient) UpdateDrgAttachment(ctx context.Context, request UpdateDrgAttachmentRequest) (response UpdateDrgAttachmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/drgAttachments/{drgAttachmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrgAttachment, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(UpdateDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgAttachmentResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// UpdateIPSecConnection Updates the display name for the specified IPSec connection. +// updateDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrgAttachment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/drgAttachments/{drgAttachmentId}") + if err != nil { + return nil, err + } + + var response UpdateDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateIPSecConnection Updates the display name or tags for the specified IPSec connection. // Avoid entering confidential information. func (client VirtualNetworkClient) UpdateIPSecConnection(ctx context.Context, request UpdateIPSecConnectionRequest) (response UpdateIPSecConnectionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/ipsecConnections/{ipscId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateIPSecConnection, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(UpdateIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIPSecConnectionResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// UpdateInternetGateway Updates the specified Internet Gateway. You can disable/enable it, or change its display name. -// Avoid entering confidential information. +// updateIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateIPSecConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/ipsecConnections/{ipscId}") + if err != nil { + return nil, err + } + + var response UpdateIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateInternetGateway Updates the specified Internet Gateway. You can disable/enable it, or change its display name +// or tags. Avoid entering confidential information. // If the gateway is disabled, that means no traffic will flow to/from the internet even if there's // a route rule that enables that traffic. func (client VirtualNetworkClient) UpdateInternetGateway(ctx context.Context, request UpdateInternetGatewayRequest) (response UpdateInternetGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/internetGateways/{igId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateInternetGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInternetGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateInternetGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/internetGateways/{igId}") + if err != nil { + return nil, err + } + + var response UpdateInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateLocalPeeringGateway Updates the specified local peering gateway (LPG). func (client VirtualNetworkClient) UpdateLocalPeeringGateway(ctx context.Context, request UpdateLocalPeeringGatewayRequest) (response UpdateLocalPeeringGatewayResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/localPeeringGateways/{localPeeringGatewayId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateLocalPeeringGateway, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateLocalPeeringGatewayResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateLocalPeeringGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/localPeeringGateways/{localPeeringGatewayId}") + if err != nil { + return nil, err + } + + var response UpdateLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdatePrivateIp Updates the specified private IP. You must specify the object's OCID. @@ -1857,40 +4482,191 @@ func (client VirtualNetworkClient) UpdateLocalPeeringGateway(ctx context.Context // To update the hostname for the primary IP on a VNIC, use // UpdateVnic. func (client VirtualNetworkClient) UpdatePrivateIp(ctx context.Context, request UpdatePrivateIpRequest) (response UpdatePrivateIpResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/privateIps/{privateIpId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePrivateIp, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdatePrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePrivateIpResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updatePrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updatePrivateIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/privateIps/{privateIpId}") + if err != nil { + return nil, err + } + + var response UpdatePrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePublicIp Updates the specified public IP. You must specify the object's OCID. Use this operation if you want to: +// * Assign a reserved public IP in your pool to a private IP. +// * Move a reserved public IP to a different private IP. +// * Unassign a reserved public IP from a private IP (which returns it to your pool +// of reserved public IPs). +// * Change the display name or tags for a public IP. +// Assigning, moving, and unassigning a reserved public IP are asynchronous +// operations. Poll the public IP's `lifecycleState` to determine if the operation +// succeeded. +// **Note:** When moving a reserved public IP, the target private IP +// must not already have a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it +// does, an error is returned. Also, the initial unassignment from the original +// private IP always succeeds, but the assignment to the target private IP is asynchronous and +// could fail silently (for example, if the target private IP is deleted or has a different public IP +// assigned to it in the interim). If that occurs, the public IP remains unassigned and its +// `lifecycleState` switches to AVAILABLE (it is not reassigned to its original private IP). +// You must poll the public IP's `lifecycleState` to determine if the move succeeded. +// Regarding ephemeral public IPs: +// * If you want to assign an ephemeral public IP to a primary private IP, use +// CreatePublicIp. +// * You can't move an ephemeral public IP to a different private IP. +// * If you want to unassign an ephemeral public IP from its private IP, use +// DeletePublicIp, which +// unassigns and deletes the ephemeral public IP. +// **Note:** If a public IP (either ephemeral or reserved) is assigned to a secondary private +// IP (see PrivateIp), and you move that secondary +// private IP to another VNIC, the public IP moves with it. +// **Note:** There's a limit to the number of PublicIp +// a VNIC or instance can have. If you try to move a reserved public IP +// to a VNIC or instance that has already reached its public IP limit, an error is +// returned. For information about the public IP limits, see +// Public IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). +func (client VirtualNetworkClient) UpdatePublicIp(ctx context.Context, request UpdatePublicIpRequest) (response UpdatePublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePublicIp, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdatePublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePublicIpResponse") + } return } +// updatePublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updatePublicIp(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/publicIps/{publicIpId}") + if err != nil { + return nil, err + } + + var response UpdatePublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateRemotePeeringConnection Updates the specified remote peering connection (RPC). +func (client VirtualNetworkClient) UpdateRemotePeeringConnection(ctx context.Context, request UpdateRemotePeeringConnectionRequest) (response UpdateRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRemotePeeringConnection, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRemotePeeringConnectionResponse") + } + return +} + +// updateRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateRemotePeeringConnection(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/remotePeeringConnections/{remotePeeringConnectionId}") + if err != nil { + return nil, err + } + + var response UpdateRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateRouteTable Updates the specified route table's display name or route rules. // Avoid entering confidential information. // Note that the `routeRules` object you provide replaces the entire existing set of rules. func (client VirtualNetworkClient) UpdateRouteTable(ctx context.Context, request UpdateRouteTableRequest) (response UpdateRouteTableResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/routeTables/{rtId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRouteTable, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRouteTableResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateRouteTable(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/routeTables/{rtId}") + if err != nil { + return nil, err + } + + var response UpdateRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateSecurityList Updates the specified security list's display name or rules. @@ -1898,57 +4674,160 @@ func (client VirtualNetworkClient) UpdateRouteTable(ctx context.Context, request // Note that the `egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire // existing objects. func (client VirtualNetworkClient) UpdateSecurityList(ctx context.Context, request UpdateSecurityListRequest) (response UpdateSecurityListResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/securityLists/{securityListId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateSecurityList, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSecurityListResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateSecurityList(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/securityLists/{securityListId}") + if err != nil { + return nil, err + } + + var response UpdateSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateServiceGateway Updates the specified service gateway. The information you provide overwrites the existing +// attributes of the gateway. +func (client VirtualNetworkClient) UpdateServiceGateway(ctx context.Context, request UpdateServiceGatewayRequest) (response UpdateServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateServiceGateway, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateServiceGatewayResponse") + } return } +// updateServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateServiceGateway(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/serviceGateways/{serviceGatewayId}") + if err != nil { + return nil, err + } + + var response UpdateServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateSubnet Updates the specified subnet's display name. Avoid entering confidential information. func (client VirtualNetworkClient) UpdateSubnet(ctx context.Context, request UpdateSubnetRequest) (response UpdateSubnetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/subnets/{subnetId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateSubnet, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSubnetResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateSubnet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/subnets/{subnetId}") + if err != nil { + return nil, err + } + + var response UpdateSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateVcn Updates the specified VCN's display name. // Avoid entering confidential information. func (client VirtualNetworkClient) UpdateVcn(ctx context.Context, request UpdateVcnRequest) (response UpdateVcnResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/vcns/{vcnId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVcn, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVcnResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVcn(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/vcns/{vcnId}") + if err != nil { + return nil, err + } + + var response UpdateVcnResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateVirtualCircuit Updates the specified virtual circuit. This can be called by @@ -1974,36 +4853,78 @@ func (client VirtualNetworkClient) UpdateVcn(ctx context.Context, request Update // Oracle must verify the customer's ownership of each added prefix before // traffic for that prefix will flow across the virtual circuit. func (client VirtualNetworkClient) UpdateVirtualCircuit(ctx context.Context, request UpdateVirtualCircuitRequest) (response UpdateVirtualCircuitResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/virtualCircuits/{virtualCircuitId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVirtualCircuit, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVirtualCircuitResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVirtualCircuit(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/virtualCircuits/{virtualCircuitId}") + if err != nil { + return nil, err + } + + var response UpdateVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateVnic Updates the specified VNIC. func (client VirtualNetworkClient) UpdateVnic(ctx context.Context, request UpdateVnicRequest) (response UpdateVnicResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/vnics/{vnicId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVnic, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVnicResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateVnic implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVnic(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/vnics/{vnicId}") + if err != nil { + return nil, err + } + + var response UpdateVnicResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cpe.go b/vendor/github.com/oracle/oci-go-sdk/core/cpe.go index 9759c8cbf..71e74a484 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/cpe.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/cpe.go @@ -31,10 +31,21 @@ type Cpe struct { // The public IP address of the on-premises router. IpAddress *string `mandatory:"true" json:"ipAddress"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the CPE was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_details.go new file mode 100644 index 000000000..9fa3edc8f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateBootVolumeBackupDetails The representation of CreateBootVolumeBackupDetails +type CreateBootVolumeBackupDetails struct { + + // The OCID of the boot volume that needs to be backed up. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name for the boot volume backup. Does not have to be unique and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The type of backup to create. If omitted, defaults to incremental. + Type CreateBootVolumeBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m CreateBootVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// CreateBootVolumeBackupDetailsTypeEnum Enum with underlying type: string +type CreateBootVolumeBackupDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateBootVolumeBackupDetailsType +const ( + CreateBootVolumeBackupDetailsTypeFull CreateBootVolumeBackupDetailsTypeEnum = "FULL" + CreateBootVolumeBackupDetailsTypeIncremental CreateBootVolumeBackupDetailsTypeEnum = "INCREMENTAL" +) + +var mappingCreateBootVolumeBackupDetailsType = map[string]CreateBootVolumeBackupDetailsTypeEnum{ + "FULL": CreateBootVolumeBackupDetailsTypeFull, + "INCREMENTAL": CreateBootVolumeBackupDetailsTypeIncremental, +} + +// GetCreateBootVolumeBackupDetailsTypeEnumValues Enumerates the set of values for CreateBootVolumeBackupDetailsType +func GetCreateBootVolumeBackupDetailsTypeEnumValues() []CreateBootVolumeBackupDetailsTypeEnum { + values := make([]CreateBootVolumeBackupDetailsTypeEnum, 0) + for _, v := range mappingCreateBootVolumeBackupDetailsType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_request_response.go new file mode 100644 index 000000000..f15682fbd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateBootVolumeBackupRequest wrapper for the CreateBootVolumeBackup operation +type CreateBootVolumeBackupRequest struct { + + // Request to create a new backup of given boot volume. + CreateBootVolumeBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateBootVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateBootVolumeBackupResponse wrapper for the CreateBootVolumeBackup operation +type CreateBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeBackup instance + BootVolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_details.go new file mode 100644 index 000000000..624e86c4f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_details.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateBootVolumeDetails The representation of CreateBootVolumeDetails +type CreateBootVolumeDetails struct { + + // The Availability Domain of the boot volume. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the boot volume. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Specifies the boot volume source details for a new boot volume. The volume source is either another boot volume in the same Availability Domain or a boot volume backup. + // This is a mandatory field for a boot volume. + SourceDetails BootVolumeSourceDetails `mandatory:"true" json:"sourceDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The size of the volume in GBs. + SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` +} + +func (m CreateBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *CreateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + SizeInGBs *int `json:"sizeInGBs"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + SourceDetails bootvolumesourcedetails `json:"sourceDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DefinedTags = model.DefinedTags + m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags + m.SizeInGBs = model.SizeInGBs + m.AvailabilityDomain = model.AvailabilityDomain + m.CompartmentId = model.CompartmentId + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn.(BootVolumeSourceDetails) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_request_response.go new file mode 100644 index 000000000..2a51049af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateBootVolumeRequest wrapper for the CreateBootVolume operation +type CreateBootVolumeRequest struct { + + // Request to create a new boot volume. + CreateBootVolumeDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateBootVolumeResponse wrapper for the CreateBootVolume operation +type CreateBootVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolume instance + BootVolume `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateBootVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_details.go index 0dff34734..fba20b88d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_details.go @@ -22,8 +22,19 @@ type CreateCpeDetails struct { // Example: `143.19.23.16` IpAddress *string `mandatory:"true" json:"ipAddress"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateCpeDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_request_response.go index c4a5314a8..53d414aba 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_request_response.go @@ -20,12 +20,30 @@ type CreateCpeRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateCpeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateCpeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateCpeResponse wrapper for the CreateCpe operation type CreateCpeResponse struct { @@ -46,3 +64,8 @@ type CreateCpeResponse struct { func (response CreateCpeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go index 33cdec7e9..39f2c1e11 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go @@ -20,12 +20,30 @@ type CreateCrossConnectGroupRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateCrossConnectGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateCrossConnectGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateCrossConnectGroupResponse wrapper for the CreateCrossConnectGroup operation type CreateCrossConnectGroupResponse struct { @@ -46,3 +64,8 @@ type CreateCrossConnectGroupResponse struct { func (response CreateCrossConnectGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_request_response.go index b9bf4a46e..a2e9f7026 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_request_response.go @@ -20,12 +20,30 @@ type CreateCrossConnectRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateCrossConnectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateCrossConnectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateCrossConnectResponse wrapper for the CreateCrossConnect operation type CreateCrossConnectResponse struct { @@ -46,3 +64,8 @@ type CreateCrossConnectResponse struct { func (response CreateCrossConnectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_details.go index a29660b37..9e2d0cca3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_details.go @@ -25,8 +25,19 @@ type CreateDhcpDetails struct { // The OCID of the VCN the set of DHCP options belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateDhcpDetails) String() string { @@ -36,17 +47,21 @@ func (m CreateDhcpDetails) String() string { // UnmarshalJSON unmarshals from json func (m *CreateDhcpDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - CompartmentId *string `json:"compartmentId"` - Options []dhcpoption `json:"options"` - VcnId *string `json:"vcnId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + CompartmentId *string `json:"compartmentId"` + Options []dhcpoption `json:"options"` + VcnId *string `json:"vcnId"` }{} e = json.Unmarshal(data, &model) if e != nil { return } + m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags m.CompartmentId = model.CompartmentId m.Options = make([]DhcpOption, len(model.Options)) for i, n := range model.Options { @@ -54,7 +69,7 @@ func (m *CreateDhcpDetails) UnmarshalJSON(data []byte) (e error) { if err != nil { return err } - m.Options[i] = nn + m.Options[i] = nn.(DhcpOption) } m.VcnId = model.VcnId return diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_options_request_response.go index 6fed1770d..48b3af02b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_options_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_options_request_response.go @@ -20,12 +20,30 @@ type CreateDhcpOptionsRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateDhcpOptionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateDhcpOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateDhcpOptionsResponse wrapper for the CreateDhcpOptions operation type CreateDhcpOptionsResponse struct { @@ -46,3 +64,8 @@ type CreateDhcpOptionsResponse struct { func (response CreateDhcpOptionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_request_response.go index 4e50c9bd6..cfc549eb7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_request_response.go @@ -20,12 +20,30 @@ type CreateDrgAttachmentRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateDrgAttachmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateDrgAttachmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateDrgAttachmentResponse wrapper for the CreateDrgAttachment operation type CreateDrgAttachmentResponse struct { @@ -46,3 +64,8 @@ type CreateDrgAttachmentResponse struct { func (response CreateDrgAttachmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_details.go index a4a7d6f65..2ed622d88 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_details.go @@ -18,8 +18,19 @@ type CreateDrgDetails struct { // The OCID of the compartment to contain the DRG. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateDrgDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_request_response.go index a1fa6bae0..6a23bff11 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_request_response.go @@ -20,12 +20,30 @@ type CreateDrgRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateDrgRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateDrgRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateDrgResponse wrapper for the CreateDrg operation type CreateDrgResponse struct { @@ -46,3 +64,8 @@ type CreateDrgResponse struct { func (response CreateDrgResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_i_p_sec_connection_request_response.go index 877bcc9c8..69830ee68 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_i_p_sec_connection_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_i_p_sec_connection_request_response.go @@ -20,12 +20,30 @@ type CreateIPSecConnectionRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateIPSecConnectionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateIPSecConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateIPSecConnectionResponse wrapper for the CreateIPSecConnection operation type CreateIPSecConnectionResponse struct { @@ -46,3 +64,8 @@ type CreateIPSecConnectionResponse struct { func (response CreateIPSecConnectionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_image_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_image_details.go index 6a482ea01..05f50ca54 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_image_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_image_details.go @@ -19,17 +19,34 @@ type CreateImageDetails struct { // The OCID of the compartment containing the instance you want to use as the basis for the image. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name for the image. It does not have to be unique, and it's changeable. // Avoid entering confidential information. // You cannot use an Oracle-provided image name as a custom image name. // Example: `My Oracle Linux image` DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Details for creating an image through import ImageSourceDetails ImageSourceDetails `mandatory:"false" json:"imageSourceDetails"` // The OCID of the instance you want to use as the basis for the image. InstanceId *string `mandatory:"false" json:"instanceId"` + + // Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: + // * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for Oracle-provided images. + // * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. + // * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. + LaunchMode CreateImageDetailsLaunchModeEnum `mandatory:"false" json:"launchMode,omitempty"` } func (m CreateImageDetails) String() string { @@ -39,23 +56,54 @@ func (m CreateImageDetails) String() string { // UnmarshalJSON unmarshals from json func (m *CreateImageDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - ImageSourceDetails imagesourcedetails `json:"imageSourceDetails"` - InstanceId *string `json:"instanceId"` - CompartmentId *string `json:"compartmentId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + ImageSourceDetails imagesourcedetails `json:"imageSourceDetails"` + InstanceId *string `json:"instanceId"` + LaunchMode CreateImageDetailsLaunchModeEnum `json:"launchMode"` + CompartmentId *string `json:"compartmentId"` }{} e = json.Unmarshal(data, &model) if e != nil { return } + m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags nn, e := model.ImageSourceDetails.UnmarshalPolymorphicJSON(model.ImageSourceDetails.JsonData) if e != nil { return } - m.ImageSourceDetails = nn + m.ImageSourceDetails = nn.(ImageSourceDetails) m.InstanceId = model.InstanceId + m.LaunchMode = model.LaunchMode m.CompartmentId = model.CompartmentId return } + +// CreateImageDetailsLaunchModeEnum Enum with underlying type: string +type CreateImageDetailsLaunchModeEnum string + +// Set of constants representing the allowable values for CreateImageDetailsLaunchMode +const ( + CreateImageDetailsLaunchModeNative CreateImageDetailsLaunchModeEnum = "NATIVE" + CreateImageDetailsLaunchModeEmulated CreateImageDetailsLaunchModeEnum = "EMULATED" + CreateImageDetailsLaunchModeCustom CreateImageDetailsLaunchModeEnum = "CUSTOM" +) + +var mappingCreateImageDetailsLaunchMode = map[string]CreateImageDetailsLaunchModeEnum{ + "NATIVE": CreateImageDetailsLaunchModeNative, + "EMULATED": CreateImageDetailsLaunchModeEmulated, + "CUSTOM": CreateImageDetailsLaunchModeCustom, +} + +// GetCreateImageDetailsLaunchModeEnumValues Enumerates the set of values for CreateImageDetailsLaunchMode +func GetCreateImageDetailsLaunchModeEnumValues() []CreateImageDetailsLaunchModeEnum { + values := make([]CreateImageDetailsLaunchModeEnum, 0) + for _, v := range mappingCreateImageDetailsLaunchMode { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_image_request_response.go index 0481d6924..0aa75596a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_image_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_image_request_response.go @@ -20,12 +20,30 @@ type CreateImageRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateImageRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateImageRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateImageResponse wrapper for the CreateImage operation type CreateImageResponse struct { @@ -46,3 +64,8 @@ type CreateImageResponse struct { func (response CreateImageResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_details.go index 3d3225bf7..d96f91be2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_details.go @@ -21,6 +21,17 @@ type CreateInstanceConsoleConnectionDetails struct { // The SSH public key used to authenticate the console connection. PublicKey *string `mandatory:"true" json:"publicKey"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateInstanceConsoleConnectionDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_request_response.go index 456bd9b78..23c25c905 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_request_response.go @@ -20,12 +20,30 @@ type CreateInstanceConsoleConnectionRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateInstanceConsoleConnectionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateInstanceConsoleConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateInstanceConsoleConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateInstanceConsoleConnectionResponse wrapper for the CreateInstanceConsoleConnection operation type CreateInstanceConsoleConnectionResponse struct { @@ -46,3 +64,8 @@ type CreateInstanceConsoleConnectionResponse struct { func (response CreateInstanceConsoleConnectionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateInstanceConsoleConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_details.go index df49670c6..f936a1351 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_details.go @@ -24,8 +24,19 @@ type CreateInternetGatewayDetails struct { // The OCID of the VCN the Internet Gateway is attached to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateInternetGatewayDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_request_response.go index 767747486..1f4b59406 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_request_response.go @@ -20,12 +20,30 @@ type CreateInternetGatewayRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateInternetGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateInternetGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateInternetGatewayResponse wrapper for the CreateInternetGateway operation type CreateInternetGatewayResponse struct { @@ -46,3 +64,8 @@ type CreateInternetGatewayResponse struct { func (response CreateInternetGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_ip_sec_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_ip_sec_connection_details.go index 31cf23fa8..969352b0a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_ip_sec_connection_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_ip_sec_connection_details.go @@ -29,8 +29,19 @@ type CreateIpSecConnectionDetails struct { // Example: `10.0.1.0/24` StaticRoutes []string `mandatory:"true" json:"staticRoutes"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateIpSecConnectionDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_details.go index 6e0b45439..aa5d056e9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_details.go @@ -21,9 +21,20 @@ type CreateLocalPeeringGatewayDetails struct { // The OCID of the VCN the LPG belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateLocalPeeringGatewayDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_request_response.go index 4f72bdb5c..311ba6718 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_request_response.go @@ -20,12 +20,30 @@ type CreateLocalPeeringGatewayRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateLocalPeeringGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateLocalPeeringGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateLocalPeeringGatewayResponse wrapper for the CreateLocalPeeringGateway operation type CreateLocalPeeringGatewayResponse struct { @@ -46,3 +64,8 @@ type CreateLocalPeeringGatewayResponse struct { func (response CreateLocalPeeringGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_details.go index b9da8cc51..8b117499d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_details.go @@ -19,10 +19,21 @@ type CreatePrivateIpDetails struct { // must be in the same subnet. VnicId *string `mandatory:"true" json:"vnicId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the private IP. Used for DNS. The value // is the hostname portion of the private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_request_response.go index 941d3a3ed..299396627 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_request_response.go @@ -20,12 +20,30 @@ type CreatePrivateIpRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreatePrivateIpRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreatePrivateIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreatePrivateIpResponse wrapper for the CreatePrivateIp operation type CreatePrivateIpResponse struct { @@ -46,3 +64,8 @@ type CreatePrivateIpResponse struct { func (response CreatePrivateIpResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreatePrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_details.go new file mode 100644 index 000000000..c86ec67e9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_details.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreatePublicIpDetails The representation of CreatePublicIpDetails +type CreatePublicIpDetails struct { + + // The OCID of the compartment to contain the public IP. For ephemeral public IPs, + // you must set this to the private IP's compartment OCID. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defines when the public IP is deleted and released back to the Oracle Cloud + // Infrastructure public IP pool. For more information, see + // Public IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). + Lifetime CreatePublicIpDetailsLifetimeEnum `mandatory:"true" json:"lifetime"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid + // entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the private IP to assign the public IP to. + // Required for an ephemeral public IP because it must always be assigned to a private IP + // (specifically a *primary* private IP). + // Optional for a reserved public IP. If you don't provide it, the public IP is created but not + // assigned to a private IP. You can later assign the public IP with + // UpdatePublicIp. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` +} + +func (m CreatePublicIpDetails) String() string { + return common.PointerString(m) +} + +// CreatePublicIpDetailsLifetimeEnum Enum with underlying type: string +type CreatePublicIpDetailsLifetimeEnum string + +// Set of constants representing the allowable values for CreatePublicIpDetailsLifetime +const ( + CreatePublicIpDetailsLifetimeEphemeral CreatePublicIpDetailsLifetimeEnum = "EPHEMERAL" + CreatePublicIpDetailsLifetimeReserved CreatePublicIpDetailsLifetimeEnum = "RESERVED" +) + +var mappingCreatePublicIpDetailsLifetime = map[string]CreatePublicIpDetailsLifetimeEnum{ + "EPHEMERAL": CreatePublicIpDetailsLifetimeEphemeral, + "RESERVED": CreatePublicIpDetailsLifetimeReserved, +} + +// GetCreatePublicIpDetailsLifetimeEnumValues Enumerates the set of values for CreatePublicIpDetailsLifetime +func GetCreatePublicIpDetailsLifetimeEnumValues() []CreatePublicIpDetailsLifetimeEnum { + values := make([]CreatePublicIpDetailsLifetimeEnum, 0) + for _, v := range mappingCreatePublicIpDetailsLifetime { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_request_response.go new file mode 100644 index 000000000..0dd16efa7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_public_ip_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreatePublicIpRequest wrapper for the CreatePublicIp operation +type CreatePublicIpRequest struct { + + // Create public IP details. + CreatePublicIpDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePublicIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreatePublicIpResponse wrapper for the CreatePublicIp operation +type CreatePublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_details.go new file mode 100644 index 000000000..e8f7c1d38 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateRemotePeeringConnectionDetails The representation of CreateRemotePeeringConnectionDetails +type CreateRemotePeeringConnectionDetails struct { + + // The OCID of the compartment to contain the RPC. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the DRG the RPC belongs to. + DrgId *string `mandatory:"true" json:"drgId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CreateRemotePeeringConnectionDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_request_response.go new file mode 100644 index 000000000..a117a04d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_remote_peering_connection_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateRemotePeeringConnectionRequest wrapper for the CreateRemotePeeringConnection operation +type CreateRemotePeeringConnectionRequest struct { + + // Request to create peering connection to remote region + CreateRemotePeeringConnectionDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateRemotePeeringConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateRemotePeeringConnectionResponse wrapper for the CreateRemotePeeringConnection operation +type CreateRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RemotePeeringConnection instance + RemotePeeringConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_details.go index 8f3005acd..7d793362b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_details.go @@ -24,8 +24,19 @@ type CreateRouteTableDetails struct { // The OCID of the VCN the route table belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateRouteTableDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_request_response.go index 7e70b4de8..daf1f5bb5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_request_response.go @@ -20,12 +20,30 @@ type CreateRouteTableRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateRouteTableRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateRouteTableRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateRouteTableResponse wrapper for the CreateRouteTable operation type CreateRouteTableResponse struct { @@ -46,3 +64,8 @@ type CreateRouteTableResponse struct { func (response CreateRouteTableResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_details.go index 06d4c4ec9..05329e995 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_details.go @@ -27,8 +27,19 @@ type CreateSecurityListDetails struct { // The OCID of the VCN the security list belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateSecurityListDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_request_response.go index e652c644b..9a8a76a14 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_request_response.go @@ -20,12 +20,30 @@ type CreateSecurityListRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateSecurityListRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateSecurityListRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateSecurityListResponse wrapper for the CreateSecurityList operation type CreateSecurityListResponse struct { @@ -46,3 +64,8 @@ type CreateSecurityListResponse struct { func (response CreateSecurityListResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_details.go new file mode 100644 index 000000000..d41a8d2c3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateServiceGatewayDetails The representation of CreateServiceGatewayDetails +type CreateServiceGatewayDetails struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the Service Gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // List of the Service OCIDs. These are the Services which will be enabled on the Service Gateway. This list can be empty. + Services []ServiceIdRequestDetails `mandatory:"true" json:"services"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateServiceGatewayDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_request_response.go new file mode 100644 index 000000000..0d7d08380 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_service_gateway_request_response.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateServiceGatewayRequest wrapper for the CreateServiceGateway operation +type CreateServiceGatewayRequest struct { + + // Details for creating a service gateway. + CreateServiceGatewayDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateServiceGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateServiceGatewayResponse wrapper for the CreateServiceGateway operation +type CreateServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_details.go index bc50b2add..4fd691c14 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_details.go @@ -29,6 +29,11 @@ type CreateSubnetDetails struct { // The OCID of the VCN to contain the subnet. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The OCID of the set of DHCP options the subnet will use. If you don't // provide a value, the subnet will use the VCN's default set of DHCP options. DhcpOptionsId *string `mandatory:"false" json:"dhcpOptionsId"` @@ -49,6 +54,12 @@ type CreateSubnetDetails struct { // Example: `subnet123` DnsLabel *string `mandatory:"false" json:"dnsLabel"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Whether VNICs within this subnet can have public IP addresses. // Defaults to false, which means VNICs created in this subnet will // automatically be assigned public IP addresses unless specified diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_request_response.go index 8d5818ec7..5b123d5a8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_request_response.go @@ -20,12 +20,30 @@ type CreateSubnetRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateSubnetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateSubnetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateSubnetResponse wrapper for the CreateSubnet operation type CreateSubnetResponse struct { @@ -46,3 +64,8 @@ type CreateSubnetResponse struct { func (response CreateSubnetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_details.go index 70eb2c240..24d63771d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_details.go @@ -22,6 +22,11 @@ type CreateVcnDetails struct { // The OCID of the compartment to contain the VCN. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` @@ -38,6 +43,12 @@ type CreateVcnDetails struct { // DNS in Your Virtual Cloud Network (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). // Example: `vcn1` DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateVcnDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_request_response.go index 99cd907af..11e0dfdd5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_request_response.go @@ -20,12 +20,30 @@ type CreateVcnRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateVcnRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateVcnRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateVcnResponse wrapper for the CreateVcn operation type CreateVcnResponse struct { @@ -46,3 +64,8 @@ type CreateVcnResponse struct { func (response CreateVcnResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_request_response.go index 629fc3e8a..8fc746b02 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_request_response.go @@ -20,12 +20,30 @@ type CreateVirtualCircuitRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateVirtualCircuitRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateVirtualCircuitRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateVirtualCircuitResponse wrapper for the CreateVirtualCircuit operation type CreateVirtualCircuitResponse struct { @@ -46,3 +64,8 @@ type CreateVirtualCircuitResponse struct { func (response CreateVirtualCircuitResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_vnic_details.go index c92cd1a5c..a3b7d5b47 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_vnic_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_vnic_details.go @@ -32,16 +32,32 @@ type CreateVnicDetails struct { // a public IP address is assigned. If set to true and // `prohibitPublicIpOnVnic` = true, an error is returned. // **Note:** This public IP address is associated with the primary private IP - // on the VNIC. Secondary private IPs cannot have public IP - // addresses associated with them. For more information, see + // on the VNIC. For more information, see // IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). + // **Note:** There's a limit to the number of PublicIp + // a VNIC or instance can have. If you try to create a secondary VNIC + // with an assigned public IP for an instance that has already + // reached its public IP limit, an error is returned. For information + // about the public IP limits, see + // Public IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). // Example: `false` AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name for the VNIC. Does not have to be unique. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname // portion of the primary private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_details.go index 8a1907cb0..8b7783809 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_details.go @@ -18,11 +18,48 @@ type CreateVolumeBackupDetails struct { // The OCID of the volume that needs to be backed up. VolumeId *string `mandatory:"true" json:"volumeId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name for the volume backup. Does not have to be unique and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The type of backup to create. If omitted, defaults to INCREMENTAL. + Type CreateVolumeBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` } func (m CreateVolumeBackupDetails) String() string { return common.PointerString(m) } + +// CreateVolumeBackupDetailsTypeEnum Enum with underlying type: string +type CreateVolumeBackupDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateVolumeBackupDetailsType +const ( + CreateVolumeBackupDetailsTypeFull CreateVolumeBackupDetailsTypeEnum = "FULL" + CreateVolumeBackupDetailsTypeIncremental CreateVolumeBackupDetailsTypeEnum = "INCREMENTAL" +) + +var mappingCreateVolumeBackupDetailsType = map[string]CreateVolumeBackupDetailsTypeEnum{ + "FULL": CreateVolumeBackupDetailsTypeFull, + "INCREMENTAL": CreateVolumeBackupDetailsTypeIncremental, +} + +// GetCreateVolumeBackupDetailsTypeEnumValues Enumerates the set of values for CreateVolumeBackupDetailsType +func GetCreateVolumeBackupDetailsTypeEnumValues() []CreateVolumeBackupDetailsTypeEnum { + values := make([]CreateVolumeBackupDetailsTypeEnum, 0) + for _, v := range mappingCreateVolumeBackupDetailsType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_details.go new file mode 100644 index 000000000..7c97c03b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateVolumeBackupPolicyAssignmentDetails The representation of CreateVolumeBackupPolicyAssignmentDetails +type CreateVolumeBackupPolicyAssignmentDetails struct { + + // The OCID of the asset (e.g. a volume) to which to assign the policy. + AssetId *string `mandatory:"true" json:"assetId"` + + // The OCID of the volume backup policy to assign to an asset. + PolicyId *string `mandatory:"true" json:"policyId"` +} + +func (m CreateVolumeBackupPolicyAssignmentDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_request_response.go new file mode 100644 index 000000000..9065fa8e7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_policy_assignment_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateVolumeBackupPolicyAssignmentRequest wrapper for the CreateVolumeBackupPolicyAssignment operation +type CreateVolumeBackupPolicyAssignmentRequest struct { + + // Request to assign a specified policy to a particular asset. + CreateVolumeBackupPolicyAssignmentDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeBackupPolicyAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeBackupPolicyAssignmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeBackupPolicyAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateVolumeBackupPolicyAssignmentResponse wrapper for the CreateVolumeBackupPolicyAssignment operation +type CreateVolumeBackupPolicyAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicyAssignment instance + VolumeBackupPolicyAssignment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeBackupPolicyAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeBackupPolicyAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_request_response.go index 44e47b735..fa9f4459f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_request_response.go @@ -20,12 +20,30 @@ type CreateVolumeBackupRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateVolumeBackupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateVolumeBackupResponse wrapper for the CreateVolumeBackup operation type CreateVolumeBackupResponse struct { @@ -46,3 +64,8 @@ type CreateVolumeBackupResponse struct { func (response CreateVolumeBackupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_details.go index 492c815fb..222d43c47 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_details.go @@ -23,10 +23,25 @@ type CreateVolumeDetails struct { // The OCID of the compartment that contains the volume. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // If provided, specifies the ID of the volume backup policy to assign to the newly + // created volume. If omitted, no policy will be assigned. + BackupPolicyId *string `mandatory:"false" json:"backupPolicyId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The size of the volume in GBs. SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` @@ -52,27 +67,33 @@ func (m CreateVolumeDetails) String() string { // UnmarshalJSON unmarshals from json func (m *CreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - SizeInGBs *int `json:"sizeInGBs"` - SizeInMBs *int `json:"sizeInMBs"` - SourceDetails volumesourcedetails `json:"sourceDetails"` - VolumeBackupId *string `json:"volumeBackupId"` - AvailabilityDomain *string `json:"availabilityDomain"` - CompartmentId *string `json:"compartmentId"` + BackupPolicyId *string `json:"backupPolicyId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + SizeInGBs *int `json:"sizeInGBs"` + SizeInMBs *int `json:"sizeInMBs"` + SourceDetails volumesourcedetails `json:"sourceDetails"` + VolumeBackupId *string `json:"volumeBackupId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` }{} e = json.Unmarshal(data, &model) if e != nil { return } + m.BackupPolicyId = model.BackupPolicyId + m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags m.SizeInGBs = model.SizeInGBs m.SizeInMBs = model.SizeInMBs nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) if e != nil { return } - m.SourceDetails = nn + m.SourceDetails = nn.(VolumeSourceDetails) m.VolumeBackupId = model.VolumeBackupId m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_details.go new file mode 100644 index 000000000..2bdf7f0ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateVolumeGroupBackupDetails The representation of CreateVolumeGroupBackupDetails +type CreateVolumeGroupBackupDetails struct { + + // The OCID of the volume group that needs to be backed up. + VolumeGroupId *string `mandatory:"true" json:"volumeGroupId"` + + // The OCID of the compartment that will contain the volume group backup. This parameter is optional, by default backup will be created in the same compartment and source volume group. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name for the volume group backup. Does not have to be unique and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The type of backup to create. If omitted, defaults to incremental. + Type CreateVolumeGroupBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m CreateVolumeGroupBackupDetails) String() string { + return common.PointerString(m) +} + +// CreateVolumeGroupBackupDetailsTypeEnum Enum with underlying type: string +type CreateVolumeGroupBackupDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateVolumeGroupBackupDetailsType +const ( + CreateVolumeGroupBackupDetailsTypeFull CreateVolumeGroupBackupDetailsTypeEnum = "FULL" + CreateVolumeGroupBackupDetailsTypeIncremental CreateVolumeGroupBackupDetailsTypeEnum = "INCREMENTAL" +) + +var mappingCreateVolumeGroupBackupDetailsType = map[string]CreateVolumeGroupBackupDetailsTypeEnum{ + "FULL": CreateVolumeGroupBackupDetailsTypeFull, + "INCREMENTAL": CreateVolumeGroupBackupDetailsTypeIncremental, +} + +// GetCreateVolumeGroupBackupDetailsTypeEnumValues Enumerates the set of values for CreateVolumeGroupBackupDetailsType +func GetCreateVolumeGroupBackupDetailsTypeEnumValues() []CreateVolumeGroupBackupDetailsTypeEnum { + values := make([]CreateVolumeGroupBackupDetailsTypeEnum, 0) + for _, v := range mappingCreateVolumeGroupBackupDetailsType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_request_response.go new file mode 100644 index 000000000..f26a81b99 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_backup_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateVolumeGroupBackupRequest wrapper for the CreateVolumeGroupBackup operation +type CreateVolumeGroupBackupRequest struct { + + // Request to create a new backup group of given volume group. + CreateVolumeGroupBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeGroupBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateVolumeGroupBackupResponse wrapper for the CreateVolumeGroupBackup operation +type CreateVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupBackup instance + VolumeGroupBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_details.go new file mode 100644 index 000000000..cf750b425 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_details.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateVolumeGroupDetails The representation of CreateVolumeGroupDetails +type CreateVolumeGroupDetails struct { + + // The Availability Domain of the volume group. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the volume group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Specifies the volume group source details for a new volume group. The volume source is either another a list of + // volume ids in the same Availability Domain, another volume group or a volume group backup. + SourceDetails VolumeGroupSourceDetails `mandatory:"true" json:"sourceDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name for the volume group. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateVolumeGroupDetails) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *CreateVolumeGroupDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + SourceDetails volumegroupsourcedetails `json:"sourceDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DefinedTags = model.DefinedTags + m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags + m.AvailabilityDomain = model.AvailabilityDomain + m.CompartmentId = model.CompartmentId + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn.(VolumeGroupSourceDetails) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_request_response.go new file mode 100644 index 000000000..f446ca8b1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_group_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateVolumeGroupRequest wrapper for the CreateVolumeGroup operation +type CreateVolumeGroupRequest struct { + + // Request to create a new volume group. + CreateVolumeGroupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateVolumeGroupResponse wrapper for the CreateVolumeGroup operation +type CreateVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroup instance + VolumeGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_request_response.go index d505805f4..e0526bf9a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_request_response.go @@ -20,12 +20,30 @@ type CreateVolumeRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateVolumeResponse wrapper for the CreateVolume operation type CreateVolumeResponse struct { @@ -46,3 +64,8 @@ type CreateVolumeResponse struct { func (response CreateVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_backup_request_response.go new file mode 100644 index 000000000..a128f7d54 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_backup_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteBootVolumeBackupRequest wrapper for the DeleteBootVolumeBackup operation +type DeleteBootVolumeBackupRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteBootVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteBootVolumeBackupResponse wrapper for the DeleteBootVolumeBackup operation +type DeleteBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_request_response.go index 1f5d59d9a..9d1649e2d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_request_response.go @@ -18,12 +18,30 @@ type DeleteBootVolumeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteBootVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteBootVolumeResponse wrapper for the DeleteBootVolume operation type DeleteBootVolumeResponse struct { @@ -38,3 +56,8 @@ type DeleteBootVolumeResponse struct { func (response DeleteBootVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_console_history_request_response.go index e964e9bf4..5aa7e2310 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_console_history_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_console_history_request_response.go @@ -18,12 +18,30 @@ type DeleteConsoleHistoryRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteConsoleHistoryRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteConsoleHistoryRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteConsoleHistoryResponse wrapper for the DeleteConsoleHistory operation type DeleteConsoleHistoryResponse struct { @@ -38,3 +56,8 @@ type DeleteConsoleHistoryResponse struct { func (response DeleteConsoleHistoryResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_cpe_request_response.go index 6a398d922..f4b7dabb6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_cpe_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_cpe_request_response.go @@ -18,12 +18,30 @@ type DeleteCpeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteCpeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteCpeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteCpeResponse wrapper for the DeleteCpe operation type DeleteCpeResponse struct { @@ -38,3 +56,8 @@ type DeleteCpeResponse struct { func (response DeleteCpeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_group_request_response.go index fbfaf81e1..416d986c3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_group_request_response.go @@ -18,12 +18,30 @@ type DeleteCrossConnectGroupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteCrossConnectGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteCrossConnectGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteCrossConnectGroupResponse wrapper for the DeleteCrossConnectGroup operation type DeleteCrossConnectGroupResponse struct { @@ -38,3 +56,8 @@ type DeleteCrossConnectGroupResponse struct { func (response DeleteCrossConnectGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_request_response.go index f3641dfd2..534076491 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_request_response.go @@ -18,12 +18,30 @@ type DeleteCrossConnectRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteCrossConnectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteCrossConnectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteCrossConnectResponse wrapper for the DeleteCrossConnect operation type DeleteCrossConnectResponse struct { @@ -38,3 +56,8 @@ type DeleteCrossConnectResponse struct { func (response DeleteCrossConnectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_dhcp_options_request_response.go index e89249eec..60ccd07e8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_dhcp_options_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_dhcp_options_request_response.go @@ -18,12 +18,30 @@ type DeleteDhcpOptionsRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteDhcpOptionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteDhcpOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteDhcpOptionsResponse wrapper for the DeleteDhcpOptions operation type DeleteDhcpOptionsResponse struct { @@ -38,3 +56,8 @@ type DeleteDhcpOptionsResponse struct { func (response DeleteDhcpOptionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_attachment_request_response.go index a921056e5..c8c8a92df 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_attachment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_attachment_request_response.go @@ -18,12 +18,30 @@ type DeleteDrgAttachmentRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteDrgAttachmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteDrgAttachmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteDrgAttachmentResponse wrapper for the DeleteDrgAttachment operation type DeleteDrgAttachmentResponse struct { @@ -38,3 +56,8 @@ type DeleteDrgAttachmentResponse struct { func (response DeleteDrgAttachmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_request_response.go index 225db2c44..cbd182ee9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_request_response.go @@ -18,12 +18,30 @@ type DeleteDrgRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteDrgRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteDrgRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteDrgResponse wrapper for the DeleteDrg operation type DeleteDrgResponse struct { @@ -38,3 +56,8 @@ type DeleteDrgResponse struct { func (response DeleteDrgResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_i_p_sec_connection_request_response.go index 47a19acff..2dc747a4a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_i_p_sec_connection_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_i_p_sec_connection_request_response.go @@ -18,12 +18,30 @@ type DeleteIPSecConnectionRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteIPSecConnectionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteIPSecConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteIPSecConnectionResponse wrapper for the DeleteIPSecConnection operation type DeleteIPSecConnectionResponse struct { @@ -38,3 +56,8 @@ type DeleteIPSecConnectionResponse struct { func (response DeleteIPSecConnectionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_image_request_response.go index f7c0a2b7f..622bfebf6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_image_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_image_request_response.go @@ -18,12 +18,30 @@ type DeleteImageRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteImageRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteImageRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteImageResponse wrapper for the DeleteImage operation type DeleteImageResponse struct { @@ -38,3 +56,8 @@ type DeleteImageResponse struct { func (response DeleteImageResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_instance_console_connection_request_response.go index 126d52c84..663329231 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_instance_console_connection_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_instance_console_connection_request_response.go @@ -18,12 +18,30 @@ type DeleteInstanceConsoleConnectionRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteInstanceConsoleConnectionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteInstanceConsoleConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteInstanceConsoleConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteInstanceConsoleConnectionResponse wrapper for the DeleteInstanceConsoleConnection operation type DeleteInstanceConsoleConnectionResponse struct { @@ -38,3 +56,8 @@ type DeleteInstanceConsoleConnectionResponse struct { func (response DeleteInstanceConsoleConnectionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteInstanceConsoleConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_internet_gateway_request_response.go index e1c2fcf27..a07f5d85c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_internet_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_internet_gateway_request_response.go @@ -18,12 +18,30 @@ type DeleteInternetGatewayRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteInternetGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteInternetGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteInternetGatewayResponse wrapper for the DeleteInternetGateway operation type DeleteInternetGatewayResponse struct { @@ -38,3 +56,8 @@ type DeleteInternetGatewayResponse struct { func (response DeleteInternetGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_local_peering_gateway_request_response.go index 312cd7485..948216ac9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_local_peering_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_local_peering_gateway_request_response.go @@ -18,12 +18,30 @@ type DeleteLocalPeeringGatewayRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteLocalPeeringGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteLocalPeeringGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteLocalPeeringGatewayResponse wrapper for the DeleteLocalPeeringGateway operation type DeleteLocalPeeringGatewayResponse struct { @@ -38,3 +56,8 @@ type DeleteLocalPeeringGatewayResponse struct { func (response DeleteLocalPeeringGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_private_ip_request_response.go index 6994c1320..a35c1e46d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_private_ip_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_private_ip_request_response.go @@ -11,19 +11,37 @@ import ( // DeletePrivateIpRequest wrapper for the DeletePrivateIp operation type DeletePrivateIpRequest struct { - // The private IP's OCID. + // The OCID of the private IP. PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeletePrivateIpRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeletePrivateIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeletePrivateIpResponse wrapper for the DeletePrivateIp operation type DeletePrivateIpResponse struct { @@ -38,3 +56,8 @@ type DeletePrivateIpResponse struct { func (response DeletePrivateIpResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeletePrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_public_ip_request_response.go new file mode 100644 index 000000000..6aeb24858 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_public_ip_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeletePublicIpRequest wrapper for the DeletePublicIp operation +type DeletePublicIpRequest struct { + + // The OCID of the public IP. + PublicIpId *string `mandatory:"true" contributesTo:"path" name:"publicIpId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePublicIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeletePublicIpResponse wrapper for the DeletePublicIp operation +type DeletePublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_remote_peering_connection_request_response.go new file mode 100644 index 000000000..f18fdd140 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_remote_peering_connection_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteRemotePeeringConnectionRequest wrapper for the DeleteRemotePeeringConnection operation +type DeleteRemotePeeringConnectionRequest struct { + + // The OCID of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRemotePeeringConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteRemotePeeringConnectionResponse wrapper for the DeleteRemotePeeringConnection operation +type DeleteRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_route_table_request_response.go index 79cf5fee0..af2472754 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_route_table_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_route_table_request_response.go @@ -18,12 +18,30 @@ type DeleteRouteTableRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteRouteTableRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteRouteTableRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteRouteTableResponse wrapper for the DeleteRouteTable operation type DeleteRouteTableResponse struct { @@ -38,3 +56,8 @@ type DeleteRouteTableResponse struct { func (response DeleteRouteTableResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_security_list_request_response.go index 6fccea27e..d7d10fbf5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_security_list_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_security_list_request_response.go @@ -18,12 +18,30 @@ type DeleteSecurityListRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteSecurityListRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteSecurityListRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteSecurityListResponse wrapper for the DeleteSecurityList operation type DeleteSecurityListResponse struct { @@ -38,3 +56,8 @@ type DeleteSecurityListResponse struct { func (response DeleteSecurityListResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_service_gateway_request_response.go new file mode 100644 index 000000000..d5d426cc0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_service_gateway_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteServiceGatewayRequest wrapper for the DeleteServiceGateway operation +type DeleteServiceGatewayRequest struct { + + // The service gateway's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteServiceGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteServiceGatewayResponse wrapper for the DeleteServiceGateway operation +type DeleteServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_subnet_request_response.go index cd198d893..8486c5de2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_subnet_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_subnet_request_response.go @@ -18,12 +18,30 @@ type DeleteSubnetRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteSubnetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteSubnetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteSubnetResponse wrapper for the DeleteSubnet operation type DeleteSubnetResponse struct { @@ -38,3 +56,8 @@ type DeleteSubnetResponse struct { func (response DeleteSubnetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_vcn_request_response.go index 9e30cccc4..de26a8197 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_vcn_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_vcn_request_response.go @@ -18,12 +18,30 @@ type DeleteVcnRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteVcnRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteVcnRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteVcnResponse wrapper for the DeleteVcn operation type DeleteVcnResponse struct { @@ -38,3 +56,8 @@ type DeleteVcnResponse struct { func (response DeleteVcnResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_request_response.go index 55caa0d27..14f359682 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_request_response.go @@ -18,12 +18,30 @@ type DeleteVirtualCircuitRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteVirtualCircuitRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteVirtualCircuitRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteVirtualCircuitResponse wrapper for the DeleteVirtualCircuit operation type DeleteVirtualCircuitResponse struct { @@ -38,3 +56,8 @@ type DeleteVirtualCircuitResponse struct { func (response DeleteVirtualCircuitResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_policy_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_policy_assignment_request_response.go new file mode 100644 index 000000000..8545c0b19 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_policy_assignment_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteVolumeBackupPolicyAssignmentRequest wrapper for the DeleteVolumeBackupPolicyAssignment operation +type DeleteVolumeBackupPolicyAssignmentRequest struct { + + // The OCID of the volume backup policy assignment. + PolicyAssignmentId *string `mandatory:"true" contributesTo:"path" name:"policyAssignmentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeBackupPolicyAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeBackupPolicyAssignmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeBackupPolicyAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteVolumeBackupPolicyAssignmentResponse wrapper for the DeleteVolumeBackupPolicyAssignment operation +type DeleteVolumeBackupPolicyAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeBackupPolicyAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeBackupPolicyAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_request_response.go index 4c1e30354..042f4fdbc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_request_response.go @@ -18,12 +18,30 @@ type DeleteVolumeBackupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteVolumeBackupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteVolumeBackupResponse wrapper for the DeleteVolumeBackup operation type DeleteVolumeBackupResponse struct { @@ -38,3 +56,8 @@ type DeleteVolumeBackupResponse struct { func (response DeleteVolumeBackupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_backup_request_response.go new file mode 100644 index 000000000..a5d57ea01 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_backup_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteVolumeGroupBackupRequest wrapper for the DeleteVolumeGroupBackup operation +type DeleteVolumeGroupBackupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeGroupBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteVolumeGroupBackupResponse wrapper for the DeleteVolumeGroupBackup operation +type DeleteVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_request_response.go new file mode 100644 index 000000000..8b6375ae8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_group_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteVolumeGroupRequest wrapper for the DeleteVolumeGroup operation +type DeleteVolumeGroupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group. + VolumeGroupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteVolumeGroupResponse wrapper for the DeleteVolumeGroup operation +type DeleteVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_request_response.go index e9bfd8a60..0f776c822 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_request_response.go @@ -18,12 +18,30 @@ type DeleteVolumeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteVolumeResponse wrapper for the DeleteVolume operation type DeleteVolumeResponse struct { @@ -38,3 +56,8 @@ type DeleteVolumeResponse struct { func (response DeleteVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/detach_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/detach_boot_volume_request_response.go index 5820949e9..4c1902113 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/detach_boot_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/detach_boot_volume_request_response.go @@ -18,12 +18,30 @@ type DetachBootVolumeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DetachBootVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DetachBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DetachBootVolumeResponse wrapper for the DetachBootVolume operation type DetachBootVolumeResponse struct { @@ -38,3 +56,8 @@ type DetachBootVolumeResponse struct { func (response DetachBootVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DetachBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/detach_service_id_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/detach_service_id_request_response.go new file mode 100644 index 000000000..7fdb08998 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/detach_service_id_request_response.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DetachServiceIdRequest wrapper for the DetachServiceId operation +type DetachServiceIdRequest struct { + + // The service gateway's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // ServiceId of Service to be detached from a Service Gateway. + DetachServiceDetails ServiceIdRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachServiceIdRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachServiceIdRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachServiceIdRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DetachServiceIdResponse wrapper for the DetachServiceId operation +type DetachServiceIdResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DetachServiceIdResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachServiceIdResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/detach_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/detach_vnic_request_response.go index 7f4bf5e93..63e374135 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/detach_vnic_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/detach_vnic_request_response.go @@ -18,12 +18,30 @@ type DetachVnicRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DetachVnicRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DetachVnicRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DetachVnicResponse wrapper for the DetachVnic operation type DetachVnicResponse struct { @@ -38,3 +56,8 @@ type DetachVnicResponse struct { func (response DetachVnicResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DetachVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/detach_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/detach_volume_request_response.go index 59188b434..a445d0af6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/detach_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/detach_volume_request_response.go @@ -18,12 +18,30 @@ type DetachVolumeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DetachVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DetachVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DetachVolumeResponse wrapper for the DetachVolume operation type DetachVolumeResponse struct { @@ -38,3 +56,8 @@ type DetachVolumeResponse struct { func (response DetachVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DetachVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/dhcp_options.go b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_options.go index f96edd995..aa28c0479 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/dhcp_options.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_options.go @@ -45,9 +45,20 @@ type DhcpOptions struct { // The OCID of the VCN the set of DHCP options belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m DhcpOptions) String() string { @@ -57,20 +68,24 @@ func (m DhcpOptions) String() string { // UnmarshalJSON unmarshals from json func (m *DhcpOptions) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - CompartmentId *string `json:"compartmentId"` - Id *string `json:"id"` - LifecycleState DhcpOptionsLifecycleStateEnum `json:"lifecycleState"` - Options []dhcpoption `json:"options"` - TimeCreated *common.SDKTime `json:"timeCreated"` - VcnId *string `json:"vcnId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState DhcpOptionsLifecycleStateEnum `json:"lifecycleState"` + Options []dhcpoption `json:"options"` + TimeCreated *common.SDKTime `json:"timeCreated"` + VcnId *string `json:"vcnId"` }{} e = json.Unmarshal(data, &model) if e != nil { return } + m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags m.CompartmentId = model.CompartmentId m.Id = model.Id m.LifecycleState = model.LifecycleState @@ -80,7 +95,7 @@ func (m *DhcpOptions) UnmarshalJSON(data []byte) (e error) { if err != nil { return err } - m.Options[i] = nn + m.Options[i] = nn.(DhcpOption) } m.TimeCreated = model.TimeCreated m.VcnId = model.VcnId diff --git a/vendor/github.com/oracle/oci-go-sdk/core/drg.go b/vendor/github.com/oracle/oci-go-sdk/core/drg.go index b87673bba..224faec55 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/drg.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/drg.go @@ -31,10 +31,21 @@ type Drg struct { // The DRG's current state. LifecycleState DrgLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the DRG was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/vendor/github.com/oracle/oci-go-sdk/core/egress_security_rule.go b/vendor/github.com/oracle/oci-go-sdk/core/egress_security_rule.go index 313470a2f..ed40929de 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/egress_security_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/egress_security_rule.go @@ -15,8 +15,8 @@ import ( // EgressSecurityRule A rule for allowing outbound IP packets. type EgressSecurityRule struct { - // The destination CIDR block for the egress rule. This is the range of IP addresses that a - // packet originating from the instance can go to. + // The destination service cidrBlock or destination IP address range in CIDR notation for the egress rule. + // This is the range of IP addresses that a packet originating from the instance can go to. Destination *string `mandatory:"true" json:"destination"` // The transport protocol. Specify either `all` or an IPv4 protocol number as @@ -25,6 +25,11 @@ type EgressSecurityRule struct { // Options are supported only for ICMP ("1"), TCP ("6"), and UDP ("17"). Protocol *string `mandatory:"true" json:"protocol"` + // Type of destination for EgressSecurityRule. SERVICE_CIDR_BLOCK should be used if destination is a service + // cidrBlock. CIDR_BLOCK should be used if destination is IP address range in CIDR notation. + // It defaults to CIDR_BLOCK, if not specified. + DestinationType EgressSecurityRuleDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` + // Optional and valid only for ICMP. Use to specify a particular ICMP type and code // as defined in // ICMP Parameters (http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml). @@ -54,3 +59,26 @@ type EgressSecurityRule struct { func (m EgressSecurityRule) String() string { return common.PointerString(m) } + +// EgressSecurityRuleDestinationTypeEnum Enum with underlying type: string +type EgressSecurityRuleDestinationTypeEnum string + +// Set of constants representing the allowable values for EgressSecurityRuleDestinationType +const ( + EgressSecurityRuleDestinationTypeCidrBlock EgressSecurityRuleDestinationTypeEnum = "CIDR_BLOCK" + EgressSecurityRuleDestinationTypeServiceCidrBlock EgressSecurityRuleDestinationTypeEnum = "SERVICE_CIDR_BLOCK" +) + +var mappingEgressSecurityRuleDestinationType = map[string]EgressSecurityRuleDestinationTypeEnum{ + "CIDR_BLOCK": EgressSecurityRuleDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": EgressSecurityRuleDestinationTypeServiceCidrBlock, +} + +// GetEgressSecurityRuleDestinationTypeEnumValues Enumerates the set of values for EgressSecurityRuleDestinationType +func GetEgressSecurityRuleDestinationTypeEnumValues() []EgressSecurityRuleDestinationTypeEnum { + values := make([]EgressSecurityRuleDestinationTypeEnum, 0) + for _, v := range mappingEgressSecurityRuleDestinationType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/export_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/export_image_request_response.go index 4ecb1a3ce..eaed2b19f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/export_image_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/export_image_request_response.go @@ -28,12 +28,30 @@ type ExportImageRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ExportImageRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ExportImageRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ExportImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ExportImageResponse wrapper for the ExportImage operation type ExportImageResponse struct { @@ -54,3 +72,8 @@ type ExportImageResponse struct { func (response ExportImageResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ExportImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_attachment_request_response.go index e14e9201b..a1d17edf8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_attachment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_attachment_request_response.go @@ -13,12 +13,30 @@ type GetBootVolumeAttachmentRequest struct { // The OCID of the boot volume attachment. BootVolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBootVolumeAttachmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeAttachmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBootVolumeAttachmentResponse wrapper for the GetBootVolumeAttachment operation type GetBootVolumeAttachmentResponse struct { @@ -39,3 +57,8 @@ type GetBootVolumeAttachmentResponse struct { func (response GetBootVolumeAttachmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_backup_request_response.go new file mode 100644 index 000000000..e49466634 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_backup_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBootVolumeBackupRequest wrapper for the GetBootVolumeBackup operation +type GetBootVolumeBackupRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetBootVolumeBackupResponse wrapper for the GetBootVolumeBackup operation +type GetBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeBackup instance + BootVolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_request_response.go index 95c3d0909..fd1fbad39 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_request_response.go @@ -13,12 +13,30 @@ type GetBootVolumeRequest struct { // The OCID of the boot volume. BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBootVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBootVolumeResponse wrapper for the GetBootVolume operation type GetBootVolumeResponse struct { @@ -39,3 +57,8 @@ type GetBootVolumeResponse struct { func (response GetBootVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_content_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_content_request_response.go index 4fc8e50ba..638737885 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_content_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_content_request_response.go @@ -19,12 +19,30 @@ type GetConsoleHistoryContentRequest struct { // Length of the snapshot data to retrieve. Length *int `mandatory:"false" contributesTo:"query" name:"length"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetConsoleHistoryContentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetConsoleHistoryContentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConsoleHistoryContentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetConsoleHistoryContentResponse wrapper for the GetConsoleHistoryContent operation type GetConsoleHistoryContentResponse struct { @@ -45,3 +63,8 @@ type GetConsoleHistoryContentResponse struct { func (response GetConsoleHistoryContentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetConsoleHistoryContentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_request_response.go index b5aa9eb38..b4b98196f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_request_response.go @@ -13,12 +13,30 @@ type GetConsoleHistoryRequest struct { // The OCID of the console history. InstanceConsoleHistoryId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleHistoryId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetConsoleHistoryRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetConsoleHistoryRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetConsoleHistoryResponse wrapper for the GetConsoleHistory operation type GetConsoleHistoryResponse struct { @@ -39,3 +57,8 @@ type GetConsoleHistoryResponse struct { func (response GetConsoleHistoryResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cpe_request_response.go index 0ed76a7f9..879f272d7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_cpe_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cpe_request_response.go @@ -13,12 +13,30 @@ type GetCpeRequest struct { // The OCID of the CPE. CpeId *string `mandatory:"true" contributesTo:"path" name:"cpeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetCpeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetCpeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetCpeResponse wrapper for the GetCpe operation type GetCpeResponse struct { @@ -39,3 +57,8 @@ type GetCpeResponse struct { func (response GetCpeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_group_request_response.go index fd3d8803e..6b7822fbd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_group_request_response.go @@ -13,12 +13,30 @@ type GetCrossConnectGroupRequest struct { // The OCID of the cross-connect group. CrossConnectGroupId *string `mandatory:"true" contributesTo:"path" name:"crossConnectGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetCrossConnectGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetCrossConnectGroupResponse wrapper for the GetCrossConnectGroup operation type GetCrossConnectGroupResponse struct { @@ -39,3 +57,8 @@ type GetCrossConnectGroupResponse struct { func (response GetCrossConnectGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_letter_of_authority_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_letter_of_authority_request_response.go index 674ea1f19..f211ee39a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_letter_of_authority_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_letter_of_authority_request_response.go @@ -13,12 +13,30 @@ type GetCrossConnectLetterOfAuthorityRequest struct { // The OCID of the cross-connect. CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetCrossConnectLetterOfAuthorityRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectLetterOfAuthorityRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectLetterOfAuthorityRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetCrossConnectLetterOfAuthorityResponse wrapper for the GetCrossConnectLetterOfAuthority operation type GetCrossConnectLetterOfAuthorityResponse struct { @@ -36,3 +54,8 @@ type GetCrossConnectLetterOfAuthorityResponse struct { func (response GetCrossConnectLetterOfAuthorityResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectLetterOfAuthorityResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_request_response.go index b505c6ad5..7516ec10f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_request_response.go @@ -13,12 +13,30 @@ type GetCrossConnectRequest struct { // The OCID of the cross-connect. CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetCrossConnectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetCrossConnectResponse wrapper for the GetCrossConnect operation type GetCrossConnectResponse struct { @@ -39,3 +57,8 @@ type GetCrossConnectResponse struct { func (response GetCrossConnectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_status_request_response.go index cf826242e..672f8424e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_status_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_status_request_response.go @@ -13,12 +13,30 @@ type GetCrossConnectStatusRequest struct { // The OCID of the cross-connect. CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetCrossConnectStatusRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectStatusRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetCrossConnectStatusResponse wrapper for the GetCrossConnectStatus operation type GetCrossConnectStatusResponse struct { @@ -36,3 +54,8 @@ type GetCrossConnectStatusResponse struct { func (response GetCrossConnectStatusResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_dhcp_options_request_response.go index 72f46761c..0834133aa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_dhcp_options_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_dhcp_options_request_response.go @@ -13,12 +13,30 @@ type GetDhcpOptionsRequest struct { // The OCID for the set of DHCP options. DhcpId *string `mandatory:"true" contributesTo:"path" name:"dhcpId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDhcpOptionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDhcpOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDhcpOptionsResponse wrapper for the GetDhcpOptions operation type GetDhcpOptionsResponse struct { @@ -39,3 +57,8 @@ type GetDhcpOptionsResponse struct { func (response GetDhcpOptionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_attachment_request_response.go index b485721ae..784becaf8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_drg_attachment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_attachment_request_response.go @@ -13,12 +13,30 @@ type GetDrgAttachmentRequest struct { // The OCID of the DRG attachment. DrgAttachmentId *string `mandatory:"true" contributesTo:"path" name:"drgAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDrgAttachmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDrgAttachmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDrgAttachmentResponse wrapper for the GetDrgAttachment operation type GetDrgAttachmentResponse struct { @@ -39,3 +57,8 @@ type GetDrgAttachmentResponse struct { func (response GetDrgAttachmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_request_response.go index 4488accfc..b134ae074 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_drg_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_request_response.go @@ -13,12 +13,30 @@ type GetDrgRequest struct { // The OCID of the DRG. DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDrgRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDrgRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDrgResponse wrapper for the GetDrg operation type GetDrgResponse struct { @@ -39,3 +57,8 @@ type GetDrgResponse struct { func (response GetDrgResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_fast_connect_provider_service_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_fast_connect_provider_service_request_response.go index 28b352403..365d8de74 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_fast_connect_provider_service_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_fast_connect_provider_service_request_response.go @@ -13,12 +13,30 @@ type GetFastConnectProviderServiceRequest struct { // The OCID of the provider service. ProviderServiceId *string `mandatory:"true" contributesTo:"path" name:"providerServiceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetFastConnectProviderServiceRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetFastConnectProviderServiceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFastConnectProviderServiceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetFastConnectProviderServiceResponse wrapper for the GetFastConnectProviderService operation type GetFastConnectProviderServiceResponse struct { @@ -36,3 +54,8 @@ type GetFastConnectProviderServiceResponse struct { func (response GetFastConnectProviderServiceResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetFastConnectProviderServiceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_config_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_config_request_response.go index a41b69aed..777e4b0f0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_config_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_config_request_response.go @@ -13,12 +13,30 @@ type GetIPSecConnectionDeviceConfigRequest struct { // The OCID of the IPSec connection. IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetIPSecConnectionDeviceConfigRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionDeviceConfigRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionDeviceConfigRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetIPSecConnectionDeviceConfigResponse wrapper for the GetIPSecConnectionDeviceConfig operation type GetIPSecConnectionDeviceConfigResponse struct { @@ -39,3 +57,8 @@ type GetIPSecConnectionDeviceConfigResponse struct { func (response GetIPSecConnectionDeviceConfigResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionDeviceConfigResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_status_request_response.go index c3fbde11d..3adb34bc4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_status_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_status_request_response.go @@ -13,12 +13,30 @@ type GetIPSecConnectionDeviceStatusRequest struct { // The OCID of the IPSec connection. IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetIPSecConnectionDeviceStatusRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionDeviceStatusRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionDeviceStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetIPSecConnectionDeviceStatusResponse wrapper for the GetIPSecConnectionDeviceStatus operation type GetIPSecConnectionDeviceStatusResponse struct { @@ -39,3 +57,8 @@ type GetIPSecConnectionDeviceStatusResponse struct { func (response GetIPSecConnectionDeviceStatusResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionDeviceStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_request_response.go index 1ba8d86d0..05fdf1121 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_request_response.go @@ -13,12 +13,30 @@ type GetIPSecConnectionRequest struct { // The OCID of the IPSec connection. IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetIPSecConnectionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetIPSecConnectionResponse wrapper for the GetIPSecConnection operation type GetIPSecConnectionResponse struct { @@ -39,3 +57,8 @@ type GetIPSecConnectionResponse struct { func (response GetIPSecConnectionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_image_request_response.go index 9c64a2429..233b41e64 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_image_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_image_request_response.go @@ -13,12 +13,30 @@ type GetImageRequest struct { // The OCID of the image. ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetImageRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetImageRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetImageResponse wrapper for the GetImage operation type GetImageResponse struct { @@ -39,3 +57,8 @@ type GetImageResponse struct { func (response GetImageResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_console_connection_request_response.go index c90d9c464..31164a0eb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_instance_console_connection_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_console_connection_request_response.go @@ -13,12 +13,30 @@ type GetInstanceConsoleConnectionRequest struct { // The OCID of the intance console connection InstanceConsoleConnectionId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleConnectionId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetInstanceConsoleConnectionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetInstanceConsoleConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstanceConsoleConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetInstanceConsoleConnectionResponse wrapper for the GetInstanceConsoleConnection operation type GetInstanceConsoleConnectionResponse struct { @@ -36,3 +54,8 @@ type GetInstanceConsoleConnectionResponse struct { func (response GetInstanceConsoleConnectionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetInstanceConsoleConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_request_response.go index 8619c5ade..c7140d1ed 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_instance_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_request_response.go @@ -13,12 +13,30 @@ type GetInstanceRequest struct { // The OCID of the instance. InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetInstanceRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetInstanceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetInstanceResponse wrapper for the GetInstance operation type GetInstanceResponse struct { @@ -39,3 +57,8 @@ type GetInstanceResponse struct { func (response GetInstanceResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_internet_gateway_request_response.go index 61423dffb..88e355cb7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_internet_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_internet_gateway_request_response.go @@ -13,12 +13,30 @@ type GetInternetGatewayRequest struct { // The OCID of the Internet Gateway. IgId *string `mandatory:"true" contributesTo:"path" name:"igId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetInternetGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetInternetGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetInternetGatewayResponse wrapper for the GetInternetGateway operation type GetInternetGatewayResponse struct { @@ -39,3 +57,8 @@ type GetInternetGatewayResponse struct { func (response GetInternetGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_local_peering_gateway_request_response.go index 3a04a7c17..8b73081de 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_local_peering_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_local_peering_gateway_request_response.go @@ -13,12 +13,30 @@ type GetLocalPeeringGatewayRequest struct { // The OCID of the local peering gateway. LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetLocalPeeringGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetLocalPeeringGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetLocalPeeringGatewayResponse wrapper for the GetLocalPeeringGateway operation type GetLocalPeeringGatewayResponse struct { @@ -39,3 +57,8 @@ type GetLocalPeeringGatewayResponse struct { func (response GetLocalPeeringGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_private_ip_request_response.go index 778c771bf..1870f7c46 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_private_ip_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_private_ip_request_response.go @@ -11,14 +11,32 @@ import ( // GetPrivateIpRequest wrapper for the GetPrivateIp operation type GetPrivateIpRequest struct { - // The private IP's OCID. + // The OCID of the private IP. PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetPrivateIpRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetPrivateIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetPrivateIpResponse wrapper for the GetPrivateIp operation type GetPrivateIpResponse struct { @@ -39,3 +57,8 @@ type GetPrivateIpResponse struct { func (response GetPrivateIpResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetPrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_details.go b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_details.go new file mode 100644 index 000000000..258895817 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// GetPublicIpByIpAddressDetails IP address of the public IP. +type GetPublicIpByIpAddressDetails struct { + + // The public IP address. + // Example: 129.146.2.1 + IpAddress *string `mandatory:"true" json:"ipAddress"` +} + +func (m GetPublicIpByIpAddressDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_request_response.go new file mode 100644 index 000000000..20215eca0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_ip_address_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetPublicIpByIpAddressRequest wrapper for the GetPublicIpByIpAddress operation +type GetPublicIpByIpAddressRequest struct { + + // IP address details for fetching the public IP. + GetPublicIpByIpAddressDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPublicIpByIpAddressRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPublicIpByIpAddressRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPublicIpByIpAddressRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetPublicIpByIpAddressResponse wrapper for the GetPublicIpByIpAddress operation +type GetPublicIpByIpAddressResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPublicIpByIpAddressResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPublicIpByIpAddressResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_details.go b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_details.go new file mode 100644 index 000000000..5957dfe91 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// GetPublicIpByPrivateIpIdDetails Details of the private IP that the public IP is assigned to. +type GetPublicIpByPrivateIpIdDetails struct { + + // OCID of the private IP. + PrivateIpId *string `mandatory:"true" json:"privateIpId"` +} + +func (m GetPublicIpByPrivateIpIdDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_request_response.go new file mode 100644 index 000000000..16d32d3a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_by_private_ip_id_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetPublicIpByPrivateIpIdRequest wrapper for the GetPublicIpByPrivateIpId operation +type GetPublicIpByPrivateIpIdRequest struct { + + // Private IP details for fetching the public IP. + GetPublicIpByPrivateIpIdDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPublicIpByPrivateIpIdRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPublicIpByPrivateIpIdRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPublicIpByPrivateIpIdRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetPublicIpByPrivateIpIdResponse wrapper for the GetPublicIpByPrivateIpId operation +type GetPublicIpByPrivateIpIdResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPublicIpByPrivateIpIdResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPublicIpByPrivateIpIdResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_request_response.go new file mode 100644 index 000000000..139875b2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_public_ip_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetPublicIpRequest wrapper for the GetPublicIp operation +type GetPublicIpRequest struct { + + // The OCID of the public IP. + PublicIpId *string `mandatory:"true" contributesTo:"path" name:"publicIpId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPublicIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetPublicIpResponse wrapper for the GetPublicIp operation +type GetPublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_remote_peering_connection_request_response.go new file mode 100644 index 000000000..2e598c784 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_remote_peering_connection_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetRemotePeeringConnectionRequest wrapper for the GetRemotePeeringConnection operation +type GetRemotePeeringConnectionRequest struct { + + // The OCID of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRemotePeeringConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetRemotePeeringConnectionResponse wrapper for the GetRemotePeeringConnection operation +type GetRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RemotePeeringConnection instance + RemotePeeringConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_route_table_request_response.go index f74bee61b..729693657 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_route_table_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_route_table_request_response.go @@ -13,12 +13,30 @@ type GetRouteTableRequest struct { // The OCID of the route table. RtId *string `mandatory:"true" contributesTo:"path" name:"rtId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetRouteTableRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetRouteTableRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetRouteTableResponse wrapper for the GetRouteTable operation type GetRouteTableResponse struct { @@ -39,3 +57,8 @@ type GetRouteTableResponse struct { func (response GetRouteTableResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_security_list_request_response.go index a62a52d89..5fa9cc194 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_security_list_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_security_list_request_response.go @@ -13,12 +13,30 @@ type GetSecurityListRequest struct { // The OCID of the security list. SecurityListId *string `mandatory:"true" contributesTo:"path" name:"securityListId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetSecurityListRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetSecurityListRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetSecurityListResponse wrapper for the GetSecurityList operation type GetSecurityListResponse struct { @@ -39,3 +57,8 @@ type GetSecurityListResponse struct { func (response GetSecurityListResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_service_gateway_request_response.go new file mode 100644 index 000000000..89491a577 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_service_gateway_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetServiceGatewayRequest wrapper for the GetServiceGateway operation +type GetServiceGatewayRequest struct { + + // The service gateway's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetServiceGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetServiceGatewayResponse wrapper for the GetServiceGateway operation +type GetServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_service_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_service_request_response.go new file mode 100644 index 000000000..f384d6887 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_service_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetServiceRequest wrapper for the GetService operation +type GetServiceRequest struct { + + // The service's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + ServiceId *string `mandatory:"true" contributesTo:"path" name:"serviceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetServiceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetServiceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetServiceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetServiceResponse wrapper for the GetService operation +type GetServiceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Service instance + Service `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetServiceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetServiceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_subnet_request_response.go index a8ffa4c10..8d54d3b3d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_subnet_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_subnet_request_response.go @@ -13,12 +13,30 @@ type GetSubnetRequest struct { // The OCID of the subnet. SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetSubnetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetSubnetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetSubnetResponse wrapper for the GetSubnet operation type GetSubnetResponse struct { @@ -39,3 +57,8 @@ type GetSubnetResponse struct { func (response GetSubnetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_vcn_request_response.go index 5696f7c3f..c945e88b3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_vcn_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_vcn_request_response.go @@ -13,12 +13,30 @@ type GetVcnRequest struct { // The OCID of the VCN. VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetVcnRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetVcnRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetVcnResponse wrapper for the GetVcn operation type GetVcnResponse struct { @@ -39,3 +57,8 @@ type GetVcnResponse struct { func (response GetVcnResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_virtual_circuit_request_response.go index 85ac11259..addd39ae3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_virtual_circuit_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_virtual_circuit_request_response.go @@ -13,12 +13,30 @@ type GetVirtualCircuitRequest struct { // The OCID of the virtual circuit. VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetVirtualCircuitRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetVirtualCircuitRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetVirtualCircuitResponse wrapper for the GetVirtualCircuit operation type GetVirtualCircuitResponse struct { @@ -39,3 +57,8 @@ type GetVirtualCircuitResponse struct { func (response GetVirtualCircuitResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_attachment_request_response.go index 3c0e62d0e..6ca22f928 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_attachment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_attachment_request_response.go @@ -13,12 +13,30 @@ type GetVnicAttachmentRequest struct { // The OCID of the VNIC attachment. VnicAttachmentId *string `mandatory:"true" contributesTo:"path" name:"vnicAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetVnicAttachmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetVnicAttachmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVnicAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetVnicAttachmentResponse wrapper for the GetVnicAttachment operation type GetVnicAttachmentResponse struct { @@ -39,3 +57,8 @@ type GetVnicAttachmentResponse struct { func (response GetVnicAttachmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetVnicAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_request_response.go index 6f52d96c5..70887989a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_request_response.go @@ -13,12 +13,30 @@ type GetVnicRequest struct { // The OCID of the VNIC. VnicId *string `mandatory:"true" contributesTo:"path" name:"vnicId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetVnicRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetVnicRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetVnicResponse wrapper for the GetVnic operation type GetVnicResponse struct { @@ -39,3 +57,8 @@ type GetVnicResponse struct { func (response GetVnicResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_attachment_request_response.go index e9492439f..f63699642 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_attachment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_attachment_request_response.go @@ -13,12 +13,30 @@ type GetVolumeAttachmentRequest struct { // The OCID of the volume attachment. VolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"volumeAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetVolumeAttachmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeAttachmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetVolumeAttachmentResponse wrapper for the GetVolumeAttachment operation type GetVolumeAttachmentResponse struct { @@ -39,3 +57,8 @@ type GetVolumeAttachmentResponse struct { func (response GetVolumeAttachmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_asset_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_asset_assignment_request_response.go new file mode 100644 index 000000000..8d1c8a24f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_asset_assignment_request_response.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeBackupPolicyAssetAssignmentRequest wrapper for the GetVolumeBackupPolicyAssetAssignment operation +type GetVolumeBackupPolicyAssetAssignmentRequest struct { + + // The OCID of an asset (e.g. a volume). + AssetId *string `mandatory:"true" contributesTo:"query" name:"assetId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeBackupPolicyAssetAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupPolicyAssetAssignmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupPolicyAssetAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetVolumeBackupPolicyAssetAssignmentResponse wrapper for the GetVolumeBackupPolicyAssetAssignment operation +type GetVolumeBackupPolicyAssetAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeBackupPolicyAssignment instances + Items []VolumeBackupPolicyAssignment `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeBackupPolicyAssetAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupPolicyAssetAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_assignment_request_response.go new file mode 100644 index 000000000..7d94f0333 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_assignment_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeBackupPolicyAssignmentRequest wrapper for the GetVolumeBackupPolicyAssignment operation +type GetVolumeBackupPolicyAssignmentRequest struct { + + // The OCID of the volume backup policy assignment. + PolicyAssignmentId *string `mandatory:"true" contributesTo:"path" name:"policyAssignmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeBackupPolicyAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupPolicyAssignmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupPolicyAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetVolumeBackupPolicyAssignmentResponse wrapper for the GetVolumeBackupPolicyAssignment operation +type GetVolumeBackupPolicyAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicyAssignment instance + VolumeBackupPolicyAssignment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeBackupPolicyAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupPolicyAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_request_response.go new file mode 100644 index 000000000..2a0d91988 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_policy_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeBackupPolicyRequest wrapper for the GetVolumeBackupPolicy operation +type GetVolumeBackupPolicyRequest struct { + + // The OCID of the volume backup policy. + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeBackupPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupPolicyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetVolumeBackupPolicyResponse wrapper for the GetVolumeBackupPolicy operation +type GetVolumeBackupPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicy instance + VolumeBackupPolicy `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeBackupPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_request_response.go index 6ca44c977..70270a3b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_request_response.go @@ -13,12 +13,30 @@ type GetVolumeBackupRequest struct { // The OCID of the volume backup. VolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeBackupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetVolumeBackupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetVolumeBackupResponse wrapper for the GetVolumeBackup operation type GetVolumeBackupResponse struct { @@ -39,3 +57,8 @@ type GetVolumeBackupResponse struct { func (response GetVolumeBackupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_backup_request_response.go new file mode 100644 index 000000000..bd2ff5a43 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_backup_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeGroupBackupRequest wrapper for the GetVolumeGroupBackup operation +type GetVolumeGroupBackupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeGroupBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetVolumeGroupBackupResponse wrapper for the GetVolumeGroupBackup operation +type GetVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupBackup instance + VolumeGroupBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_request_response.go new file mode 100644 index 000000000..f31979ee9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_group_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeGroupRequest wrapper for the GetVolumeGroup operation +type GetVolumeGroupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group. + VolumeGroupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetVolumeGroupResponse wrapper for the GetVolumeGroup operation +type GetVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroup instance + VolumeGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_request_response.go index 57e71a0f2..4efa010a8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_request_response.go @@ -13,12 +13,30 @@ type GetVolumeRequest struct { // The OCID of the volume. VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetVolumeResponse wrapper for the GetVolume operation type GetVolumeResponse struct { @@ -39,3 +57,8 @@ type GetVolumeResponse struct { func (response GetVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_windows_instance_initial_credentials_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_windows_instance_initial_credentials_request_response.go index 98d138e2b..9869a425c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/get_windows_instance_initial_credentials_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_windows_instance_initial_credentials_request_response.go @@ -13,12 +13,30 @@ type GetWindowsInstanceInitialCredentialsRequest struct { // The OCID of the instance. InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetWindowsInstanceInitialCredentialsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetWindowsInstanceInitialCredentialsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWindowsInstanceInitialCredentialsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetWindowsInstanceInitialCredentialsResponse wrapper for the GetWindowsInstanceInitialCredentials operation type GetWindowsInstanceInitialCredentialsResponse struct { @@ -36,3 +54,8 @@ type GetWindowsInstanceInitialCredentialsResponse struct { func (response GetWindowsInstanceInitialCredentialsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetWindowsInstanceInitialCredentialsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/i_scsi_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/i_scsi_volume_attachment.go index 107ab34f3..a9fc10166 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/i_scsi_volume_attachment.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/i_scsi_volume_attachment.go @@ -53,6 +53,9 @@ type IScsiVolumeAttachment struct { // Example: `My volume attachment` DisplayName *string `mandatory:"false" json:"displayName"` + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + // The Challenge-Handshake-Authentication-Protocol (CHAP) secret valid for the associated CHAP user name. // (Also called the "CHAP password".) // Example: `d6866c0d-298b-48ba-95af-309b4faux45e` @@ -91,6 +94,11 @@ func (m IScsiVolumeAttachment) GetInstanceId() *string { return m.InstanceId } +//GetIsReadOnly returns IsReadOnly +func (m IScsiVolumeAttachment) GetIsReadOnly() *bool { + return m.IsReadOnly +} + //GetLifecycleState returns LifecycleState func (m IScsiVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { return m.LifecycleState diff --git a/vendor/github.com/oracle/oci-go-sdk/core/image.go b/vendor/github.com/oracle/oci-go-sdk/core/image.go index 250a1af1c..c4e87ea0b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/image.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/image.go @@ -47,17 +47,65 @@ type Image struct { // The OCID of the image originally used to launch the instance. BaseImageId *string `mandatory:"false" json:"baseImageId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name for the image. It does not have to be unique, and it's changeable. // Avoid entering confidential information. // You cannot use an Oracle-provided image name as a custom image name. // Example: `My custom Oracle Linux image` DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: + // * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for Oracle-provided images. + // * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. + // * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. + LaunchMode ImageLaunchModeEnum `mandatory:"false" json:"launchMode,omitempty"` + + LaunchOptions *LaunchOptions `mandatory:"false" json:"launchOptions"` + + // Image size (1 MB = 1048576 bytes) + // Example: `47694` + SizeInMBs *int `mandatory:"false" json:"sizeInMBs"` } func (m Image) String() string { return common.PointerString(m) } +// ImageLaunchModeEnum Enum with underlying type: string +type ImageLaunchModeEnum string + +// Set of constants representing the allowable values for ImageLaunchMode +const ( + ImageLaunchModeNative ImageLaunchModeEnum = "NATIVE" + ImageLaunchModeEmulated ImageLaunchModeEnum = "EMULATED" + ImageLaunchModeCustom ImageLaunchModeEnum = "CUSTOM" +) + +var mappingImageLaunchMode = map[string]ImageLaunchModeEnum{ + "NATIVE": ImageLaunchModeNative, + "EMULATED": ImageLaunchModeEmulated, + "CUSTOM": ImageLaunchModeCustom, +} + +// GetImageLaunchModeEnumValues Enumerates the set of values for ImageLaunchMode +func GetImageLaunchModeEnumValues() []ImageLaunchModeEnum { + values := make([]ImageLaunchModeEnum, 0) + for _, v := range mappingImageLaunchMode { + values = append(values, v) + } + return values +} + // ImageLifecycleStateEnum Enum with underlying type: string type ImageLifecycleStateEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/image_source_details.go b/vendor/github.com/oracle/oci-go-sdk/core/image_source_details.go index ae8d32acb..c2b66a58e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/image_source_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/image_source_details.go @@ -15,11 +15,16 @@ import ( // ImageSourceDetails The representation of ImageSourceDetails type ImageSourceDetails interface { + + // The format of the image to be imported. Exported Oracle images are QCOW2. Only monolithic + // images are supported. + GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum } type imagesourcedetails struct { - JsonData []byte - SourceType string `json:"sourceType"` + JsonData []byte + SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` + SourceType string `json:"sourceType"` } // UnmarshalJSON unmarshals json @@ -33,6 +38,7 @@ func (m *imagesourcedetails) UnmarshalJSON(data []byte) error { if err != nil { return err } + m.SourceImageType = s.Model.SourceImageType m.SourceType = s.Model.SourceType return err @@ -55,6 +61,34 @@ func (m *imagesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } +//GetSourceImageType returns SourceImageType +func (m imagesourcedetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { + return m.SourceImageType +} + func (m imagesourcedetails) String() string { return common.PointerString(m) } + +// ImageSourceDetailsSourceImageTypeEnum Enum with underlying type: string +type ImageSourceDetailsSourceImageTypeEnum string + +// Set of constants representing the allowable values for ImageSourceDetailsSourceImageType +const ( + ImageSourceDetailsSourceImageTypeQcow2 ImageSourceDetailsSourceImageTypeEnum = "QCOW2" + ImageSourceDetailsSourceImageTypeVmdk ImageSourceDetailsSourceImageTypeEnum = "VMDK" +) + +var mappingImageSourceDetailsSourceImageType = map[string]ImageSourceDetailsSourceImageTypeEnum{ + "QCOW2": ImageSourceDetailsSourceImageTypeQcow2, + "VMDK": ImageSourceDetailsSourceImageTypeVmdk, +} + +// GetImageSourceDetailsSourceImageTypeEnumValues Enumerates the set of values for ImageSourceDetailsSourceImageType +func GetImageSourceDetailsSourceImageTypeEnumValues() []ImageSourceDetailsSourceImageTypeEnum { + values := make([]ImageSourceDetailsSourceImageTypeEnum, 0) + for _, v := range mappingImageSourceDetailsSourceImageType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_tuple_details.go b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_tuple_details.go index 61eddb488..a07592a1f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_tuple_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_tuple_details.go @@ -24,6 +24,15 @@ type ImageSourceViaObjectStorageTupleDetails struct { // The Object Storage name for the image. ObjectName *string `mandatory:"true" json:"objectName"` + + // The format of the image to be imported. Exported Oracle images are QCOW2. Only monolithic + // images are supported. + SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` +} + +//GetSourceImageType returns SourceImageType +func (m ImageSourceViaObjectStorageTupleDetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { + return m.SourceImageType } func (m ImageSourceViaObjectStorageTupleDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_uri_details.go b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_uri_details.go index e65376d4d..6f5a04fc9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_uri_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_uri_details.go @@ -18,6 +18,15 @@ type ImageSourceViaObjectStorageUriDetails struct { // The Object Storage URL for the image. SourceUri *string `mandatory:"true" json:"sourceUri"` + + // The format of the image to be imported. Exported Oracle images are QCOW2. Only monolithic + // images are supported. + SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` +} + +//GetSourceImageType returns SourceImageType +func (m ImageSourceViaObjectStorageUriDetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { + return m.SourceImageType } func (m ImageSourceViaObjectStorageUriDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/ingress_security_rule.go b/vendor/github.com/oracle/oci-go-sdk/core/ingress_security_rule.go index fbd7d7561..3f9f168a1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/ingress_security_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/ingress_security_rule.go @@ -21,8 +21,10 @@ type IngressSecurityRule struct { // Options are supported only for ICMP ("1"), TCP ("6"), and UDP ("17"). Protocol *string `mandatory:"true" json:"protocol"` - // The source CIDR block for the ingress rule. This is the range of IP addresses that a - // packet coming into the instance can come from. + // The source service cidrBlock or source IP address range in CIDR notation for the ingress rule. This is the + // range of IP addresses that a packet coming into the instance can come from. + // Examples: `10.12.0.0/16` + // `oci-phx-objectstorage` Source *string `mandatory:"true" json:"source"` // Optional and valid only for ICMP. Use to specify a particular ICMP type and code @@ -42,6 +44,11 @@ type IngressSecurityRule struct { // and a corresponding rule is not necessary for bidirectional traffic. IsStateless *bool `mandatory:"false" json:"isStateless"` + // Type of source for IngressSecurityRule. SERVICE_CIDR_BLOCK should be used if source is a service cidrBlock. + // CIDR_BLOCK should be used if source is IP address range in CIDR notation. It defaults to CIDR_BLOCK, if + // not specified. + SourceType IngressSecurityRuleSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + // Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. // If you specify TCP as the protocol but omit this object, then all destination ports are allowed. TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` @@ -54,3 +61,26 @@ type IngressSecurityRule struct { func (m IngressSecurityRule) String() string { return common.PointerString(m) } + +// IngressSecurityRuleSourceTypeEnum Enum with underlying type: string +type IngressSecurityRuleSourceTypeEnum string + +// Set of constants representing the allowable values for IngressSecurityRuleSourceType +const ( + IngressSecurityRuleSourceTypeCidrBlock IngressSecurityRuleSourceTypeEnum = "CIDR_BLOCK" + IngressSecurityRuleSourceTypeServiceCidrBlock IngressSecurityRuleSourceTypeEnum = "SERVICE_CIDR_BLOCK" +) + +var mappingIngressSecurityRuleSourceType = map[string]IngressSecurityRuleSourceTypeEnum{ + "CIDR_BLOCK": IngressSecurityRuleSourceTypeCidrBlock, + "SERVICE_CIDR_BLOCK": IngressSecurityRuleSourceTypeServiceCidrBlock, +} + +// GetIngressSecurityRuleSourceTypeEnumValues Enumerates the set of values for IngressSecurityRuleSourceType +func GetIngressSecurityRuleSourceTypeEnumValues() []IngressSecurityRuleSourceTypeEnum { + values := make([]IngressSecurityRuleSourceTypeEnum, 0) + for _, v := range mappingIngressSecurityRuleSourceType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance.go b/vendor/github.com/oracle/oci-go-sdk/core/instance.go index afad7986f..361c6295f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/instance.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance.go @@ -48,6 +48,11 @@ type Instance struct { // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. // Example: `My bare metal instance` @@ -58,6 +63,12 @@ type Instance struct { // If you don't need nested metadata values, it is strongly advised to avoid using this object and use the Metadata object instead. ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Deprecated. Use `sourceDetails` instead. ImageId *string `mandatory:"false" json:"imageId"` @@ -81,6 +92,14 @@ type Instance struct { // For more information about iPXE, see http://ipxe.org. IpxeScript *string `mandatory:"false" json:"ipxeScript"` + // Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: + // * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for Oracle-provided images. + // * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. + // * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. + LaunchMode InstanceLaunchModeEnum `mandatory:"false" json:"launchMode,omitempty"` + + LaunchOptions *LaunchOptions `mandatory:"false" json:"launchOptions"` + // Custom metadata that you provide. Metadata map[string]string `mandatory:"false" json:"metadata"` @@ -95,35 +114,43 @@ func (m Instance) String() string { // UnmarshalJSON unmarshals from json func (m *Instance) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` - ImageId *string `json:"imageId"` - IpxeScript *string `json:"ipxeScript"` - Metadata map[string]string `json:"metadata"` - SourceDetails instancesourcedetails `json:"sourceDetails"` - AvailabilityDomain *string `json:"availabilityDomain"` - CompartmentId *string `json:"compartmentId"` - Id *string `json:"id"` - LifecycleState InstanceLifecycleStateEnum `json:"lifecycleState"` - Region *string `json:"region"` - Shape *string `json:"shape"` - TimeCreated *common.SDKTime `json:"timeCreated"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + FreeformTags map[string]string `json:"freeformTags"` + ImageId *string `json:"imageId"` + IpxeScript *string `json:"ipxeScript"` + LaunchMode InstanceLaunchModeEnum `json:"launchMode"` + LaunchOptions *LaunchOptions `json:"launchOptions"` + Metadata map[string]string `json:"metadata"` + SourceDetails instancesourcedetails `json:"sourceDetails"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState InstanceLifecycleStateEnum `json:"lifecycleState"` + Region *string `json:"region"` + Shape *string `json:"shape"` + TimeCreated *common.SDKTime `json:"timeCreated"` }{} e = json.Unmarshal(data, &model) if e != nil { return } + m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName m.ExtendedMetadata = model.ExtendedMetadata + m.FreeformTags = model.FreeformTags m.ImageId = model.ImageId m.IpxeScript = model.IpxeScript + m.LaunchMode = model.LaunchMode + m.LaunchOptions = model.LaunchOptions m.Metadata = model.Metadata nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) if e != nil { return } - m.SourceDetails = nn + m.SourceDetails = nn.(InstanceSourceDetails) m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId m.Id = model.Id @@ -134,6 +161,31 @@ func (m *Instance) UnmarshalJSON(data []byte) (e error) { return } +// InstanceLaunchModeEnum Enum with underlying type: string +type InstanceLaunchModeEnum string + +// Set of constants representing the allowable values for InstanceLaunchMode +const ( + InstanceLaunchModeNative InstanceLaunchModeEnum = "NATIVE" + InstanceLaunchModeEmulated InstanceLaunchModeEnum = "EMULATED" + InstanceLaunchModeCustom InstanceLaunchModeEnum = "CUSTOM" +) + +var mappingInstanceLaunchMode = map[string]InstanceLaunchModeEnum{ + "NATIVE": InstanceLaunchModeNative, + "EMULATED": InstanceLaunchModeEmulated, + "CUSTOM": InstanceLaunchModeCustom, +} + +// GetInstanceLaunchModeEnumValues Enumerates the set of values for InstanceLaunchMode +func GetInstanceLaunchModeEnumValues() []InstanceLaunchModeEnum { + values := make([]InstanceLaunchModeEnum, 0) + for _, v := range mappingInstanceLaunchMode { + values = append(values, v) + } + return values +} + // InstanceLifecycleStateEnum Enum with underlying type: string type InstanceLifecycleStateEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_action_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_action_request_response.go index 37faf1966..fb7f195d7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/instance_action_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_action_request_response.go @@ -28,12 +28,30 @@ type InstanceActionRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request InstanceActionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request InstanceActionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request InstanceActionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // InstanceActionResponse wrapper for the InstanceAction operation type InstanceActionResponse struct { @@ -55,6 +73,11 @@ func (response InstanceActionResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response InstanceActionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // InstanceActionActionEnum Enum with underlying type: string type InstanceActionActionEnum string @@ -64,6 +87,7 @@ const ( InstanceActionActionStart InstanceActionActionEnum = "START" InstanceActionActionSoftreset InstanceActionActionEnum = "SOFTRESET" InstanceActionActionReset InstanceActionActionEnum = "RESET" + InstanceActionActionSoftstop InstanceActionActionEnum = "SOFTSTOP" ) var mappingInstanceActionAction = map[string]InstanceActionActionEnum{ @@ -71,6 +95,7 @@ var mappingInstanceActionAction = map[string]InstanceActionActionEnum{ "START": InstanceActionActionStart, "SOFTRESET": InstanceActionActionSoftreset, "RESET": InstanceActionActionReset, + "SOFTSTOP": InstanceActionActionSoftstop, } // GetInstanceActionActionEnumValues Enumerates the set of values for InstanceActionAction diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_console_connection.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_console_connection.go index 3dd2f61a4..a847f610c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/instance_console_connection.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_console_connection.go @@ -24,9 +24,20 @@ type InstanceConsoleConnection struct { // The SSH connection string for the console connection. ConnectionString *string `mandatory:"false" json:"connectionString"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The SSH public key fingerprint for the console connection. Fingerprint *string `mandatory:"false" json:"fingerprint"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The OCID of the console connection. Id *string `mandatory:"false" json:"id"` @@ -35,6 +46,10 @@ type InstanceConsoleConnection struct { // The current state of the console connection. LifecycleState InstanceConsoleConnectionLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The SSH connection string for the SSH tunnel used to + // connect to the console connection over VNC. + VncConnectionString *string `mandatory:"false" json:"vncConnectionString"` } func (m InstanceConsoleConnection) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_image_details.go index 3327d9ecf..cb19cbd77 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_image_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_image_details.go @@ -18,6 +18,9 @@ type InstanceSourceViaImageDetails struct { // The OCID of the image used to boot the instance. ImageId *string `mandatory:"true" json:"imageId"` + + // The size of the boot volume in GBs. Minimum value is 50 GB and maximum value is 16384 GB (16TB). + BootVolumeSizeInGBs *int `mandatory:"false" json:"bootVolumeSizeInGBs"` } func (m InstanceSourceViaImageDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/internet_gateway.go b/vendor/github.com/oracle/oci-go-sdk/core/internet_gateway.go index a9b8f1c0b..062cb0ac8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/internet_gateway.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/internet_gateway.go @@ -32,10 +32,21 @@ type InternetGateway struct { // The OCID of the VCN the Internet Gateway belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Whether the gateway is enabled. When the gateway is disabled, traffic is not // routed to/from the Internet, regardless of route rules. IsEnabled *bool `mandatory:"false" json:"isEnabled"` diff --git a/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection.go b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection.go index c57e74559..db9e71f2d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection.go @@ -41,10 +41,21 @@ type IpSecConnection struct { // Example: `10.0.1.0/24` StaticRoutes []string `mandatory:"true" json:"staticRoutes"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the IPSec connection was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_details.go index c40c778ca..292338cd5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_details.go @@ -14,7 +14,7 @@ import ( ) // LaunchInstanceDetails Instance launch details. -// Use the sourceDetails parameter to specify whether a boot volume should be used for a new instance launch. +// Use the `sourceDetails` parameter to specify whether a boot volume or an image should be used to launch a new instance. type LaunchInstanceDetails struct { // The Availability Domain of the instance. @@ -33,6 +33,11 @@ type LaunchInstanceDetails struct { // the instance is launched. CreateVnicDetails *CreateVnicDetails `mandatory:"false" json:"createVnicDetails"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. // Example: `My bare metal instance` @@ -43,7 +48,13 @@ type LaunchInstanceDetails struct { // If you don't need nested metadata values, it is strongly advised to avoid using this object and use the Metadata object instead. ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` - // Deprecated. Instead Use `hostnameLabel` in + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Deprecated. Instead use `hostnameLabel` in // CreateVnicDetails. // If you provide both, the values must match. HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` @@ -119,6 +130,7 @@ type LaunchInstanceDetails struct { Metadata map[string]string `mandatory:"false" json:"metadata"` // Details for creating an instance. + // Use this parameter to specify whether a boot volume or an image should be used to launch a new instance. SourceDetails InstanceSourceDetails `mandatory:"false" json:"sourceDetails"` // Deprecated. Instead use `subnetId` in @@ -134,18 +146,20 @@ func (m LaunchInstanceDetails) String() string { // UnmarshalJSON unmarshals from json func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - CreateVnicDetails *CreateVnicDetails `json:"createVnicDetails"` - DisplayName *string `json:"displayName"` - ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` - HostnameLabel *string `json:"hostnameLabel"` - ImageId *string `json:"imageId"` - IpxeScript *string `json:"ipxeScript"` - Metadata map[string]string `json:"metadata"` - SourceDetails instancesourcedetails `json:"sourceDetails"` - SubnetId *string `json:"subnetId"` - AvailabilityDomain *string `json:"availabilityDomain"` - CompartmentId *string `json:"compartmentId"` - Shape *string `json:"shape"` + CreateVnicDetails *CreateVnicDetails `json:"createVnicDetails"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + FreeformTags map[string]string `json:"freeformTags"` + HostnameLabel *string `json:"hostnameLabel"` + ImageId *string `json:"imageId"` + IpxeScript *string `json:"ipxeScript"` + Metadata map[string]string `json:"metadata"` + SourceDetails instancesourcedetails `json:"sourceDetails"` + SubnetId *string `json:"subnetId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + Shape *string `json:"shape"` }{} e = json.Unmarshal(data, &model) @@ -153,8 +167,10 @@ func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { return } m.CreateVnicDetails = model.CreateVnicDetails + m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName m.ExtendedMetadata = model.ExtendedMetadata + m.FreeformTags = model.FreeformTags m.HostnameLabel = model.HostnameLabel m.ImageId = model.ImageId m.IpxeScript = model.IpxeScript @@ -163,7 +179,7 @@ func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { if e != nil { return } - m.SourceDetails = nn + m.SourceDetails = nn.(InstanceSourceDetails) m.SubnetId = model.SubnetId m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_request_response.go index dfccbc48b..9911ec83e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_request_response.go @@ -20,12 +20,30 @@ type LaunchInstanceRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request LaunchInstanceRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request LaunchInstanceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request LaunchInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // LaunchInstanceResponse wrapper for the LaunchInstance operation type LaunchInstanceResponse struct { @@ -46,3 +64,8 @@ type LaunchInstanceResponse struct { func (response LaunchInstanceResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response LaunchInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/launch_options.go b/vendor/github.com/oracle/oci-go-sdk/core/launch_options.go new file mode 100644 index 000000000..267a591b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/launch_options.go @@ -0,0 +1,157 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LaunchOptions Options for tuning compatibility and performance of VM shapes. +type LaunchOptions struct { + + // Emulation type for volume. + // * `ISCSI` - ISCSI attached block storage device. This is the default for Boot Volumes and Remote Block + // Storage volumes on Oracle provided images. + // * `SCSI` - Emulated SCSI disk. + // * `IDE` - Emulated IDE disk. + // * `VFIO` - Direct attached Virtual Function storage. This is the default option for Local data + // volumes on Oracle provided images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. + BootVolumeType LaunchOptionsBootVolumeTypeEnum `mandatory:"true" json:"bootVolumeType"` + + // Firmware used to boot VM. Select the option that matches your operating system. + // * `BIOS` - Boot VM using BIOS style firmware. This is compatible with both 32 bit and 64 bit operating + // systems that boot using MBR style bootloaders. + // * `UEFI_64` - Boot VM using UEFI style firmware compatible with 64 bit operating systems. This is the + // default for Oracle provided images. + Firmware LaunchOptionsFirmwareEnum `mandatory:"true" json:"firmware"` + + // Emulation type for NIC. + // * `E1000` - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. + // * `VFIO` - Direct attached Virtual Function network controller. Default for Oracle provided images. + NetworkType LaunchOptionsNetworkTypeEnum `mandatory:"true" json:"networkType"` + + // Emulation type for volume. + // * `ISCSI` - ISCSI attached block storage device. This is the default for Boot Volumes and Remote Block + // Storage volumes on Oracle provided images. + // * `SCSI` - Emulated SCSI disk. + // * `IDE` - Emulated IDE disk. + // * `VFIO` - Direct attached Virtual Function storage. This is the default option for Local data + // volumes on Oracle provided images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. + RemoteDataVolumeType LaunchOptionsRemoteDataVolumeTypeEnum `mandatory:"true" json:"remoteDataVolumeType"` +} + +func (m LaunchOptions) String() string { + return common.PointerString(m) +} + +// LaunchOptionsBootVolumeTypeEnum Enum with underlying type: string +type LaunchOptionsBootVolumeTypeEnum string + +// Set of constants representing the allowable values for LaunchOptionsBootVolumeType +const ( + LaunchOptionsBootVolumeTypeIscsi LaunchOptionsBootVolumeTypeEnum = "ISCSI" + LaunchOptionsBootVolumeTypeScsi LaunchOptionsBootVolumeTypeEnum = "SCSI" + LaunchOptionsBootVolumeTypeIde LaunchOptionsBootVolumeTypeEnum = "IDE" + LaunchOptionsBootVolumeTypeVfio LaunchOptionsBootVolumeTypeEnum = "VFIO" + LaunchOptionsBootVolumeTypeParavirtualized LaunchOptionsBootVolumeTypeEnum = "PARAVIRTUALIZED" +) + +var mappingLaunchOptionsBootVolumeType = map[string]LaunchOptionsBootVolumeTypeEnum{ + "ISCSI": LaunchOptionsBootVolumeTypeIscsi, + "SCSI": LaunchOptionsBootVolumeTypeScsi, + "IDE": LaunchOptionsBootVolumeTypeIde, + "VFIO": LaunchOptionsBootVolumeTypeVfio, + "PARAVIRTUALIZED": LaunchOptionsBootVolumeTypeParavirtualized, +} + +// GetLaunchOptionsBootVolumeTypeEnumValues Enumerates the set of values for LaunchOptionsBootVolumeType +func GetLaunchOptionsBootVolumeTypeEnumValues() []LaunchOptionsBootVolumeTypeEnum { + values := make([]LaunchOptionsBootVolumeTypeEnum, 0) + for _, v := range mappingLaunchOptionsBootVolumeType { + values = append(values, v) + } + return values +} + +// LaunchOptionsFirmwareEnum Enum with underlying type: string +type LaunchOptionsFirmwareEnum string + +// Set of constants representing the allowable values for LaunchOptionsFirmware +const ( + LaunchOptionsFirmwareBios LaunchOptionsFirmwareEnum = "BIOS" + LaunchOptionsFirmwareUefi64 LaunchOptionsFirmwareEnum = "UEFI_64" +) + +var mappingLaunchOptionsFirmware = map[string]LaunchOptionsFirmwareEnum{ + "BIOS": LaunchOptionsFirmwareBios, + "UEFI_64": LaunchOptionsFirmwareUefi64, +} + +// GetLaunchOptionsFirmwareEnumValues Enumerates the set of values for LaunchOptionsFirmware +func GetLaunchOptionsFirmwareEnumValues() []LaunchOptionsFirmwareEnum { + values := make([]LaunchOptionsFirmwareEnum, 0) + for _, v := range mappingLaunchOptionsFirmware { + values = append(values, v) + } + return values +} + +// LaunchOptionsNetworkTypeEnum Enum with underlying type: string +type LaunchOptionsNetworkTypeEnum string + +// Set of constants representing the allowable values for LaunchOptionsNetworkType +const ( + LaunchOptionsNetworkTypeE1000 LaunchOptionsNetworkTypeEnum = "E1000" + LaunchOptionsNetworkTypeVfio LaunchOptionsNetworkTypeEnum = "VFIO" +) + +var mappingLaunchOptionsNetworkType = map[string]LaunchOptionsNetworkTypeEnum{ + "E1000": LaunchOptionsNetworkTypeE1000, + "VFIO": LaunchOptionsNetworkTypeVfio, +} + +// GetLaunchOptionsNetworkTypeEnumValues Enumerates the set of values for LaunchOptionsNetworkType +func GetLaunchOptionsNetworkTypeEnumValues() []LaunchOptionsNetworkTypeEnum { + values := make([]LaunchOptionsNetworkTypeEnum, 0) + for _, v := range mappingLaunchOptionsNetworkType { + values = append(values, v) + } + return values +} + +// LaunchOptionsRemoteDataVolumeTypeEnum Enum with underlying type: string +type LaunchOptionsRemoteDataVolumeTypeEnum string + +// Set of constants representing the allowable values for LaunchOptionsRemoteDataVolumeType +const ( + LaunchOptionsRemoteDataVolumeTypeIscsi LaunchOptionsRemoteDataVolumeTypeEnum = "ISCSI" + LaunchOptionsRemoteDataVolumeTypeScsi LaunchOptionsRemoteDataVolumeTypeEnum = "SCSI" + LaunchOptionsRemoteDataVolumeTypeIde LaunchOptionsRemoteDataVolumeTypeEnum = "IDE" + LaunchOptionsRemoteDataVolumeTypeVfio LaunchOptionsRemoteDataVolumeTypeEnum = "VFIO" + LaunchOptionsRemoteDataVolumeTypeParavirtualized LaunchOptionsRemoteDataVolumeTypeEnum = "PARAVIRTUALIZED" +) + +var mappingLaunchOptionsRemoteDataVolumeType = map[string]LaunchOptionsRemoteDataVolumeTypeEnum{ + "ISCSI": LaunchOptionsRemoteDataVolumeTypeIscsi, + "SCSI": LaunchOptionsRemoteDataVolumeTypeScsi, + "IDE": LaunchOptionsRemoteDataVolumeTypeIde, + "VFIO": LaunchOptionsRemoteDataVolumeTypeVfio, + "PARAVIRTUALIZED": LaunchOptionsRemoteDataVolumeTypeParavirtualized, +} + +// GetLaunchOptionsRemoteDataVolumeTypeEnumValues Enumerates the set of values for LaunchOptionsRemoteDataVolumeType +func GetLaunchOptionsRemoteDataVolumeTypeEnumValues() []LaunchOptionsRemoteDataVolumeTypeEnum { + values := make([]LaunchOptionsRemoteDataVolumeTypeEnum, 0) + for _, v := range mappingLaunchOptionsRemoteDataVolumeType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_allowed_peer_regions_for_remote_peering_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_allowed_peer_regions_for_remote_peering_request_response.go new file mode 100644 index 000000000..de28d36a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_allowed_peer_regions_for_remote_peering_request_response.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListAllowedPeerRegionsForRemotePeeringRequest wrapper for the ListAllowedPeerRegionsForRemotePeering operation +type ListAllowedPeerRegionsForRemotePeeringRequest struct { + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAllowedPeerRegionsForRemotePeeringRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAllowedPeerRegionsForRemotePeeringRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAllowedPeerRegionsForRemotePeeringRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListAllowedPeerRegionsForRemotePeeringResponse wrapper for the ListAllowedPeerRegionsForRemotePeering operation +type ListAllowedPeerRegionsForRemotePeeringResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PeerRegionForRemotePeering instance + Items []PeerRegionForRemotePeering `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListAllowedPeerRegionsForRemotePeeringResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAllowedPeerRegionsForRemotePeeringResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_attachments_request_response.go index 51669f7e1..b3fcdecd3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_attachments_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_attachments_request_response.go @@ -30,19 +30,37 @@ type ListBootVolumeAttachmentsRequest struct { // The OCID of the boot volume. BootVolumeId *string `mandatory:"false" contributesTo:"query" name:"bootVolumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListBootVolumeAttachmentsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListBootVolumeAttachmentsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBootVolumeAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListBootVolumeAttachmentsResponse wrapper for the ListBootVolumeAttachments operation type ListBootVolumeAttachmentsResponse struct { // The underlying http response RawResponse *http.Response - // The []BootVolumeAttachment instance + // A list of []BootVolumeAttachment instances Items []BootVolumeAttachment `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -58,3 +76,8 @@ type ListBootVolumeAttachmentsResponse struct { func (response ListBootVolumeAttachmentsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListBootVolumeAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_backups_request_response.go new file mode 100644 index 000000000..1b47737ec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_backups_request_response.go @@ -0,0 +1,141 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListBootVolumeBackupsRequest wrapper for the ListBootVolumeBackups operation +type ListBootVolumeBackupsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"false" contributesTo:"query" name:"bootVolumeId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by Availability Domain if the scope of the resource type is within a + // single Availability Domain. If you call one of these "List" operations without specifying + // an Availability Domain, the resources are grouped by Availability Domain, then sorted. + SortBy ListBootVolumeBackupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListBootVolumeBackupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + LifecycleState BootVolumeBackupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBootVolumeBackupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBootVolumeBackupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBootVolumeBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListBootVolumeBackupsResponse wrapper for the ListBootVolumeBackups operation +type ListBootVolumeBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BootVolumeBackup instances + Items []BootVolumeBackup `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListBootVolumeBackupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBootVolumeBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBootVolumeBackupsSortByEnum Enum with underlying type: string +type ListBootVolumeBackupsSortByEnum string + +// Set of constants representing the allowable values for ListBootVolumeBackupsSortBy +const ( + ListBootVolumeBackupsSortByTimecreated ListBootVolumeBackupsSortByEnum = "TIMECREATED" + ListBootVolumeBackupsSortByDisplayname ListBootVolumeBackupsSortByEnum = "DISPLAYNAME" +) + +var mappingListBootVolumeBackupsSortBy = map[string]ListBootVolumeBackupsSortByEnum{ + "TIMECREATED": ListBootVolumeBackupsSortByTimecreated, + "DISPLAYNAME": ListBootVolumeBackupsSortByDisplayname, +} + +// GetListBootVolumeBackupsSortByEnumValues Enumerates the set of values for ListBootVolumeBackupsSortBy +func GetListBootVolumeBackupsSortByEnumValues() []ListBootVolumeBackupsSortByEnum { + values := make([]ListBootVolumeBackupsSortByEnum, 0) + for _, v := range mappingListBootVolumeBackupsSortBy { + values = append(values, v) + } + return values +} + +// ListBootVolumeBackupsSortOrderEnum Enum with underlying type: string +type ListBootVolumeBackupsSortOrderEnum string + +// Set of constants representing the allowable values for ListBootVolumeBackupsSortOrder +const ( + ListBootVolumeBackupsSortOrderAsc ListBootVolumeBackupsSortOrderEnum = "ASC" + ListBootVolumeBackupsSortOrderDesc ListBootVolumeBackupsSortOrderEnum = "DESC" +) + +var mappingListBootVolumeBackupsSortOrder = map[string]ListBootVolumeBackupsSortOrderEnum{ + "ASC": ListBootVolumeBackupsSortOrderAsc, + "DESC": ListBootVolumeBackupsSortOrderDesc, +} + +// GetListBootVolumeBackupsSortOrderEnumValues Enumerates the set of values for ListBootVolumeBackupsSortOrder +func GetListBootVolumeBackupsSortOrderEnumValues() []ListBootVolumeBackupsSortOrderEnum { + values := make([]ListBootVolumeBackupsSortOrderEnum, 0) + for _, v := range mappingListBootVolumeBackupsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volumes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volumes_request_response.go index 20370d315..201523fb6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volumes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volumes_request_response.go @@ -24,19 +24,40 @@ type ListBootVolumesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the volume group. + VolumeGroupId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListBootVolumesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListBootVolumesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBootVolumesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListBootVolumesResponse wrapper for the ListBootVolumes operation type ListBootVolumesResponse struct { // The underlying http response RawResponse *http.Response - // The []BootVolume instance + // A list of []BootVolume instances Items []BootVolume `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -52,3 +73,8 @@ type ListBootVolumesResponse struct { func (response ListBootVolumesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListBootVolumesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_console_histories_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_console_histories_request_response.go index e47d04333..83295c0da 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_console_histories_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_console_histories_request_response.go @@ -43,19 +43,37 @@ type ListConsoleHistoriesRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState ConsoleHistoryLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListConsoleHistoriesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListConsoleHistoriesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListConsoleHistoriesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListConsoleHistoriesResponse wrapper for the ListConsoleHistories operation type ListConsoleHistoriesResponse struct { // The underlying http response RawResponse *http.Response - // The []ConsoleHistory instance + // A list of []ConsoleHistory instances Items []ConsoleHistory `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -72,6 +90,11 @@ func (response ListConsoleHistoriesResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListConsoleHistoriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListConsoleHistoriesSortByEnum Enum with underlying type: string type ListConsoleHistoriesSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cpes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cpes_request_response.go index 5a0ce9fb3..29ebb8062 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_cpes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cpes_request_response.go @@ -20,19 +20,37 @@ type ListCpesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCpesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCpesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCpesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCpesResponse wrapper for the ListCpes operation type ListCpesResponse struct { // The underlying http response RawResponse *http.Response - // The []Cpe instance + // A list of []Cpe instances Items []Cpe `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListCpesResponse struct { func (response ListCpesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListCpesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_groups_request_response.go index 221747c68..1a3fcd8aa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_groups_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_groups_request_response.go @@ -39,19 +39,37 @@ type ListCrossConnectGroupsRequest struct { // A filter to return only resources that match the specified lifecycle state. The value is case insensitive. LifecycleState CrossConnectGroupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCrossConnectGroupsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCrossConnectGroupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossConnectGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCrossConnectGroupsResponse wrapper for the ListCrossConnectGroups operation type ListCrossConnectGroupsResponse struct { // The underlying http response RawResponse *http.Response - // The []CrossConnectGroup instance + // A list of []CrossConnectGroup instances Items []CrossConnectGroup `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -68,6 +86,11 @@ func (response ListCrossConnectGroupsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListCrossConnectGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListCrossConnectGroupsSortByEnum Enum with underlying type: string type ListCrossConnectGroupsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_locations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_locations_request_response.go index 4200b32ac..4acd1fe56 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_locations_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_locations_request_response.go @@ -20,19 +20,37 @@ type ListCrossConnectLocationsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCrossConnectLocationsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCrossConnectLocationsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossConnectLocationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCrossConnectLocationsResponse wrapper for the ListCrossConnectLocations operation type ListCrossConnectLocationsResponse struct { // The underlying http response RawResponse *http.Response - // The []CrossConnectLocation instance + // A list of []CrossConnectLocation instances Items []CrossConnectLocation `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListCrossConnectLocationsResponse struct { func (response ListCrossConnectLocationsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListCrossConnectLocationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connects_request_response.go index e10f72d55..16bf33dbb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connects_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connects_request_response.go @@ -42,19 +42,37 @@ type ListCrossConnectsRequest struct { // A filter to return only resources that match the specified lifecycle state. The value is case insensitive. LifecycleState CrossConnectLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCrossConnectsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCrossConnectsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossConnectsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCrossConnectsResponse wrapper for the ListCrossConnects operation type ListCrossConnectsResponse struct { // The underlying http response RawResponse *http.Response - // The []CrossConnect instance + // A list of []CrossConnect instances Items []CrossConnect `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -71,6 +89,11 @@ func (response ListCrossConnectsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListCrossConnectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListCrossConnectsSortByEnum Enum with underlying type: string type ListCrossConnectsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_crossconnect_port_speed_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_crossconnect_port_speed_shapes_request_response.go index b60655348..736f194a6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_crossconnect_port_speed_shapes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_crossconnect_port_speed_shapes_request_response.go @@ -20,19 +20,37 @@ type ListCrossconnectPortSpeedShapesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCrossconnectPortSpeedShapesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCrossconnectPortSpeedShapesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossconnectPortSpeedShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCrossconnectPortSpeedShapesResponse wrapper for the ListCrossconnectPortSpeedShapes operation type ListCrossconnectPortSpeedShapesResponse struct { // The underlying http response RawResponse *http.Response - // The []CrossConnectPortSpeedShape instance + // A list of []CrossConnectPortSpeedShape instances Items []CrossConnectPortSpeedShape `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListCrossconnectPortSpeedShapesResponse struct { func (response ListCrossconnectPortSpeedShapesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListCrossconnectPortSpeedShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_dhcp_options_request_response.go index f06466fc6..721d14475 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_dhcp_options_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_dhcp_options_request_response.go @@ -42,19 +42,37 @@ type ListDhcpOptionsRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState DhcpOptionsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDhcpOptionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDhcpOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDhcpOptionsResponse wrapper for the ListDhcpOptions operation type ListDhcpOptionsResponse struct { // The underlying http response RawResponse *http.Response - // The []DhcpOptions instance + // A list of []DhcpOptions instances Items []DhcpOptions `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -71,6 +89,11 @@ func (response ListDhcpOptionsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListDhcpOptionsSortByEnum Enum with underlying type: string type ListDhcpOptionsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_drg_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_drg_attachments_request_response.go index d526209d5..3024a2530 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_drg_attachments_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_drg_attachments_request_response.go @@ -26,19 +26,37 @@ type ListDrgAttachmentsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDrgAttachmentsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDrgAttachmentsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDrgAttachmentsResponse wrapper for the ListDrgAttachments operation type ListDrgAttachmentsResponse struct { // The underlying http response RawResponse *http.Response - // The []DrgAttachment instance + // A list of []DrgAttachment instances Items []DrgAttachment `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -54,3 +72,8 @@ type ListDrgAttachmentsResponse struct { func (response ListDrgAttachmentsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_drgs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_drgs_request_response.go index 6577f9c2f..8fcc71e83 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_drgs_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_drgs_request_response.go @@ -20,19 +20,37 @@ type ListDrgsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDrgsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDrgsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDrgsResponse wrapper for the ListDrgs operation type ListDrgsResponse struct { // The underlying http response RawResponse *http.Response - // The []Drg instance + // A list of []Drg instances Items []Drg `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListDrgsResponse struct { func (response ListDrgsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_services_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_services_request_response.go index 27614fd85..c43b6d471 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_services_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_services_request_response.go @@ -20,19 +20,37 @@ type ListFastConnectProviderServicesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListFastConnectProviderServicesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListFastConnectProviderServicesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFastConnectProviderServicesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListFastConnectProviderServicesResponse wrapper for the ListFastConnectProviderServices operation type ListFastConnectProviderServicesResponse struct { // The underlying http response RawResponse *http.Response - // The []FastConnectProviderService instance + // A list of []FastConnectProviderService instances Items []FastConnectProviderService `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListFastConnectProviderServicesResponse struct { func (response ListFastConnectProviderServicesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListFastConnectProviderServicesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go index 6197b9b54..4fd9ef1ea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go @@ -20,19 +20,37 @@ type ListFastConnectProviderVirtualCircuitBandwidthShapesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListFastConnectProviderVirtualCircuitBandwidthShapesResponse wrapper for the ListFastConnectProviderVirtualCircuitBandwidthShapes operation type ListFastConnectProviderVirtualCircuitBandwidthShapesResponse struct { // The underlying http response RawResponse *http.Response - // The []VirtualCircuitBandwidthShape instance + // A list of []VirtualCircuitBandwidthShape instances Items []VirtualCircuitBandwidthShape `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListFastConnectProviderVirtualCircuitBandwidthShapesResponse struct { func (response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_i_p_sec_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_i_p_sec_connections_request_response.go index c1b346754..909372080 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_i_p_sec_connections_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_i_p_sec_connections_request_response.go @@ -26,19 +26,37 @@ type ListIPSecConnectionsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListIPSecConnectionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListIPSecConnectionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIPSecConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListIPSecConnectionsResponse wrapper for the ListIPSecConnections operation type ListIPSecConnectionsResponse struct { // The underlying http response RawResponse *http.Response - // The []IpSecConnection instance + // A list of []IpSecConnection instances Items []IpSecConnection `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -54,3 +72,8 @@ type ListIPSecConnectionsResponse struct { func (response ListIPSecConnectionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListIPSecConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_images_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_images_request_response.go index 5ac886860..f6aa04cf4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_images_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_images_request_response.go @@ -25,6 +25,9 @@ type ListImagesRequest struct { // Example: `7.2` OperatingSystemVersion *string `mandatory:"false" contributesTo:"query" name:"operatingSystemVersion"` + // Shape name. + Shape *string `mandatory:"false" contributesTo:"query" name:"shape"` + // The maximum number of items to return in a paginated "List" call. // Example: `500` Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` @@ -47,19 +50,37 @@ type ListImagesRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState ImageLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListImagesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListImagesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListImagesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListImagesResponse wrapper for the ListImages operation type ListImagesResponse struct { // The underlying http response RawResponse *http.Response - // The []Image instance + // A list of []Image instances Items []Image `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -76,6 +97,11 @@ func (response ListImagesResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListImagesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListImagesSortByEnum Enum with underlying type: string type ListImagesSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_instance_console_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_instance_console_connections_request_response.go index 012b2a77b..99d908061 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_instance_console_connections_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_instance_console_connections_request_response.go @@ -23,19 +23,37 @@ type ListInstanceConsoleConnectionsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListInstanceConsoleConnectionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListInstanceConsoleConnectionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstanceConsoleConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListInstanceConsoleConnectionsResponse wrapper for the ListInstanceConsoleConnections operation type ListInstanceConsoleConnectionsResponse struct { // The underlying http response RawResponse *http.Response - // The []InstanceConsoleConnection instance + // A list of []InstanceConsoleConnection instances Items []InstanceConsoleConnection `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +69,8 @@ type ListInstanceConsoleConnectionsResponse struct { func (response ListInstanceConsoleConnectionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListInstanceConsoleConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_instances_request_response.go index f687890c4..da04bd13c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_instances_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_instances_request_response.go @@ -43,19 +43,37 @@ type ListInstancesRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState InstanceLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListInstancesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListInstancesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstancesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListInstancesResponse wrapper for the ListInstances operation type ListInstancesResponse struct { // The underlying http response RawResponse *http.Response - // The []Instance instance + // A list of []Instance instances Items []Instance `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -72,6 +90,11 @@ func (response ListInstancesResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListInstancesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListInstancesSortByEnum Enum with underlying type: string type ListInstancesSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_internet_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_internet_gateways_request_response.go index b37985a4d..f2a06359e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_internet_gateways_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_internet_gateways_request_response.go @@ -42,19 +42,37 @@ type ListInternetGatewaysRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState InternetGatewayLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListInternetGatewaysRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListInternetGatewaysRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInternetGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListInternetGatewaysResponse wrapper for the ListInternetGateways operation type ListInternetGatewaysResponse struct { // The underlying http response RawResponse *http.Response - // The []InternetGateway instance + // A list of []InternetGateway instances Items []InternetGateway `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -71,6 +89,11 @@ func (response ListInternetGatewaysResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListInternetGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListInternetGatewaysSortByEnum Enum with underlying type: string type ListInternetGatewaysSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_local_peering_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_local_peering_gateways_request_response.go index 071ec59af..c31baaea6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_local_peering_gateways_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_local_peering_gateways_request_response.go @@ -23,19 +23,37 @@ type ListLocalPeeringGatewaysRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListLocalPeeringGatewaysRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListLocalPeeringGatewaysRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListLocalPeeringGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListLocalPeeringGatewaysResponse wrapper for the ListLocalPeeringGateways operation type ListLocalPeeringGatewaysResponse struct { // The underlying http response RawResponse *http.Response - // The []LocalPeeringGateway instance + // A list of []LocalPeeringGateway instances Items []LocalPeeringGateway `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +69,8 @@ type ListLocalPeeringGatewaysResponse struct { func (response ListLocalPeeringGatewaysResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListLocalPeeringGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_private_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_private_ips_request_response.go index 7054edfc3..5cd68f4d9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_private_ips_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_private_ips_request_response.go @@ -18,7 +18,7 @@ type ListPrivateIpsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` - // The private IP address of the `privateIp` object. + // An IP address. // Example: `10.0.3.3` IpAddress *string `mandatory:"false" contributesTo:"query" name:"ipAddress"` @@ -27,19 +27,37 @@ type ListPrivateIpsRequest struct { // The OCID of the VNIC. VnicId *string `mandatory:"false" contributesTo:"query" name:"vnicId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListPrivateIpsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListPrivateIpsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPrivateIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListPrivateIpsResponse wrapper for the ListPrivateIps operation type ListPrivateIpsResponse struct { // The underlying http response RawResponse *http.Response - // The []PrivateIp instance + // A list of []PrivateIp instances Items []PrivateIp `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -55,3 +73,8 @@ type ListPrivateIpsResponse struct { func (response ListPrivateIpsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListPrivateIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_public_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_public_ips_request_response.go new file mode 100644 index 000000000..aa32f60de --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_public_ips_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListPublicIpsRequest wrapper for the ListPublicIps operation +type ListPublicIpsRequest struct { + + // Whether the public IP is regional or specific to a particular Availability Domain. + // * `REGION`: The public IP exists within a region and can be assigned to a private IP + // in any Availability Domain in the region. Reserved public IPs have `scope` = `REGION`. + // * `AVAILABILITY_DOMAIN`: The public IP exists within the Availability Domain of the private IP + // it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. + // Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`. + Scope ListPublicIpsScopeEnum `mandatory:"true" contributesTo:"query" name:"scope" omitEmpty:"true"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The name of the Availability Domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPublicIpsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPublicIpsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPublicIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListPublicIpsResponse wrapper for the ListPublicIps operation +type ListPublicIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []PublicIp instances + Items []PublicIp `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPublicIpsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPublicIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPublicIpsScopeEnum Enum with underlying type: string +type ListPublicIpsScopeEnum string + +// Set of constants representing the allowable values for ListPublicIpsScope +const ( + ListPublicIpsScopeRegion ListPublicIpsScopeEnum = "REGION" + ListPublicIpsScopeAvailabilityDomain ListPublicIpsScopeEnum = "AVAILABILITY_DOMAIN" +) + +var mappingListPublicIpsScope = map[string]ListPublicIpsScopeEnum{ + "REGION": ListPublicIpsScopeRegion, + "AVAILABILITY_DOMAIN": ListPublicIpsScopeAvailabilityDomain, +} + +// GetListPublicIpsScopeEnumValues Enumerates the set of values for ListPublicIpsScope +func GetListPublicIpsScopeEnumValues() []ListPublicIpsScopeEnum { + values := make([]ListPublicIpsScopeEnum, 0) + for _, v := range mappingListPublicIpsScope { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_remote_peering_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_remote_peering_connections_request_response.go new file mode 100644 index 000000000..ece857a8f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_remote_peering_connections_request_response.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListRemotePeeringConnectionsRequest wrapper for the ListRemotePeeringConnections operation +type ListRemotePeeringConnectionsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the DRG. + DrgId *string `mandatory:"false" contributesTo:"query" name:"drgId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListRemotePeeringConnectionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRemotePeeringConnectionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRemotePeeringConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListRemotePeeringConnectionsResponse wrapper for the ListRemotePeeringConnections operation +type ListRemotePeeringConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []RemotePeeringConnection instances + Items []RemotePeeringConnection `presentIn:"body"` + + // A pagination token to the start of the next page, if one exist. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListRemotePeeringConnectionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRemotePeeringConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_route_tables_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_route_tables_request_response.go index 88cc414c2..a18e90c43 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_route_tables_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_route_tables_request_response.go @@ -42,19 +42,37 @@ type ListRouteTablesRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState RouteTableLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListRouteTablesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListRouteTablesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRouteTablesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListRouteTablesResponse wrapper for the ListRouteTables operation type ListRouteTablesResponse struct { // The underlying http response RawResponse *http.Response - // The []RouteTable instance + // A list of []RouteTable instances Items []RouteTable `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -71,6 +89,11 @@ func (response ListRouteTablesResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListRouteTablesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListRouteTablesSortByEnum Enum with underlying type: string type ListRouteTablesSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_security_lists_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_security_lists_request_response.go index 883452ce7..d9422d072 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_security_lists_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_security_lists_request_response.go @@ -42,19 +42,37 @@ type ListSecurityListsRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState SecurityListLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListSecurityListsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListSecurityListsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSecurityListsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListSecurityListsResponse wrapper for the ListSecurityLists operation type ListSecurityListsResponse struct { // The underlying http response RawResponse *http.Response - // The []SecurityList instance + // A list of []SecurityList instances Items []SecurityList `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -71,6 +89,11 @@ func (response ListSecurityListsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListSecurityListsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListSecurityListsSortByEnum Enum with underlying type: string type ListSecurityListsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_service_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_service_gateways_request_response.go new file mode 100644 index 000000000..bb61888a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_service_gateways_request_response.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListServiceGatewaysRequest wrapper for the ListServiceGateways operation +type ListServiceGatewaysRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by Availability Domain if the scope of the resource type is within a + // single Availability Domain. If you call one of these "List" operations without specifying + // an Availability Domain, the resources are grouped by Availability Domain, then sorted. + SortBy ListServiceGatewaysSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListServiceGatewaysSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the given lifecycle state. The state value is case-insensitive. + LifecycleState ServiceGatewayLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListServiceGatewaysRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListServiceGatewaysRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListServiceGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListServiceGatewaysResponse wrapper for the ListServiceGateways operation +type ListServiceGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ServiceGateway instances + Items []ServiceGateway `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListServiceGatewaysResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListServiceGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListServiceGatewaysSortByEnum Enum with underlying type: string +type ListServiceGatewaysSortByEnum string + +// Set of constants representing the allowable values for ListServiceGatewaysSortBy +const ( + ListServiceGatewaysSortByTimecreated ListServiceGatewaysSortByEnum = "TIMECREATED" + ListServiceGatewaysSortByDisplayname ListServiceGatewaysSortByEnum = "DISPLAYNAME" +) + +var mappingListServiceGatewaysSortBy = map[string]ListServiceGatewaysSortByEnum{ + "TIMECREATED": ListServiceGatewaysSortByTimecreated, + "DISPLAYNAME": ListServiceGatewaysSortByDisplayname, +} + +// GetListServiceGatewaysSortByEnumValues Enumerates the set of values for ListServiceGatewaysSortBy +func GetListServiceGatewaysSortByEnumValues() []ListServiceGatewaysSortByEnum { + values := make([]ListServiceGatewaysSortByEnum, 0) + for _, v := range mappingListServiceGatewaysSortBy { + values = append(values, v) + } + return values +} + +// ListServiceGatewaysSortOrderEnum Enum with underlying type: string +type ListServiceGatewaysSortOrderEnum string + +// Set of constants representing the allowable values for ListServiceGatewaysSortOrder +const ( + ListServiceGatewaysSortOrderAsc ListServiceGatewaysSortOrderEnum = "ASC" + ListServiceGatewaysSortOrderDesc ListServiceGatewaysSortOrderEnum = "DESC" +) + +var mappingListServiceGatewaysSortOrder = map[string]ListServiceGatewaysSortOrderEnum{ + "ASC": ListServiceGatewaysSortOrderAsc, + "DESC": ListServiceGatewaysSortOrderDesc, +} + +// GetListServiceGatewaysSortOrderEnumValues Enumerates the set of values for ListServiceGatewaysSortOrder +func GetListServiceGatewaysSortOrderEnumValues() []ListServiceGatewaysSortOrderEnum { + values := make([]ListServiceGatewaysSortOrderEnum, 0) + for _, v := range mappingListServiceGatewaysSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_services_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_services_request_response.go new file mode 100644 index 000000000..ec1811427 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_services_request_response.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListServicesRequest wrapper for the ListServices operation +type ListServicesRequest struct { + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListServicesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListServicesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListServicesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListServicesResponse wrapper for the ListServices operation +type ListServicesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Service instances + Items []Service `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListServicesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListServicesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_shapes_request_response.go index 71c7a2dec..6823530d7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_shapes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_shapes_request_response.go @@ -27,19 +27,37 @@ type ListShapesRequest struct { // The OCID of an image. ImageId *string `mandatory:"false" contributesTo:"query" name:"imageId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListShapesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListShapesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListShapesResponse wrapper for the ListShapes operation type ListShapesResponse struct { // The underlying http response RawResponse *http.Response - // The []Shape instance + // A list of []Shape instances Items []Shape `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -55,3 +73,8 @@ type ListShapesResponse struct { func (response ListShapesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_subnets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_subnets_request_response.go index a74e9e134..347df4123 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_subnets_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_subnets_request_response.go @@ -42,19 +42,37 @@ type ListSubnetsRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState SubnetLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListSubnetsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListSubnetsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSubnetsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListSubnetsResponse wrapper for the ListSubnets operation type ListSubnetsResponse struct { // The underlying http response RawResponse *http.Response - // The []Subnet instance + // A list of []Subnet instances Items []Subnet `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -71,6 +89,11 @@ func (response ListSubnetsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListSubnetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListSubnetsSortByEnum Enum with underlying type: string type ListSubnetsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_vcns_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_vcns_request_response.go index b1e5b0edd..6389653a6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_vcns_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_vcns_request_response.go @@ -39,19 +39,37 @@ type ListVcnsRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState VcnLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVcnsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVcnsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVcnsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVcnsResponse wrapper for the ListVcns operation type ListVcnsResponse struct { // The underlying http response RawResponse *http.Response - // The []Vcn instance + // A list of []Vcn instances Items []Vcn `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -68,6 +86,11 @@ func (response ListVcnsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListVcnsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListVcnsSortByEnum Enum with underlying type: string type ListVcnsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_bandwidth_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_bandwidth_shapes_request_response.go index 3d0ac6253..6e440c2ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_bandwidth_shapes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_bandwidth_shapes_request_response.go @@ -20,19 +20,37 @@ type ListVirtualCircuitBandwidthShapesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVirtualCircuitBandwidthShapesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitBandwidthShapesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitBandwidthShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVirtualCircuitBandwidthShapesResponse wrapper for the ListVirtualCircuitBandwidthShapes operation type ListVirtualCircuitBandwidthShapesResponse struct { // The underlying http response RawResponse *http.Response - // The []VirtualCircuitBandwidthShape instance + // A list of []VirtualCircuitBandwidthShape instances Items []VirtualCircuitBandwidthShape `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListVirtualCircuitBandwidthShapesResponse struct { func (response ListVirtualCircuitBandwidthShapesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitBandwidthShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_public_prefixes_request_response.go index 0e885eb36..64aab4389 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_public_prefixes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_public_prefixes_request_response.go @@ -17,12 +17,30 @@ type ListVirtualCircuitPublicPrefixesRequest struct { // A filter to only return resources that match the given verification state. // The state value is case-insensitive. VerificationState VirtualCircuitPublicPrefixVerificationStateEnum `mandatory:"false" contributesTo:"query" name:"verificationState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVirtualCircuitPublicPrefixesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVirtualCircuitPublicPrefixesResponse wrapper for the ListVirtualCircuitPublicPrefixes operation type ListVirtualCircuitPublicPrefixesResponse struct { @@ -40,3 +58,8 @@ type ListVirtualCircuitPublicPrefixesResponse struct { func (response ListVirtualCircuitPublicPrefixesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuits_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuits_request_response.go index 65dc99414..c1ef2de8f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuits_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuits_request_response.go @@ -39,19 +39,37 @@ type ListVirtualCircuitsRequest struct { // A filter to return only resources that match the specified lifecycle state. The value is case insensitive. LifecycleState VirtualCircuitLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVirtualCircuitsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVirtualCircuitsResponse wrapper for the ListVirtualCircuits operation type ListVirtualCircuitsResponse struct { // The underlying http response RawResponse *http.Response - // The []VirtualCircuit instance + // A list of []VirtualCircuit instances Items []VirtualCircuit `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -68,6 +86,11 @@ func (response ListVirtualCircuitsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListVirtualCircuitsSortByEnum Enum with underlying type: string type ListVirtualCircuitsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_vnic_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_vnic_attachments_request_response.go index 6746850b4..b4a93ca9a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_vnic_attachments_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_vnic_attachments_request_response.go @@ -30,19 +30,37 @@ type ListVnicAttachmentsRequest struct { // The OCID of the VNIC. VnicId *string `mandatory:"false" contributesTo:"query" name:"vnicId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVnicAttachmentsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVnicAttachmentsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVnicAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVnicAttachmentsResponse wrapper for the ListVnicAttachments operation type ListVnicAttachmentsResponse struct { // The underlying http response RawResponse *http.Response - // The []VnicAttachment instance + // A list of []VnicAttachment instances Items []VnicAttachment `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -58,3 +76,8 @@ type ListVnicAttachmentsResponse struct { func (response ListVnicAttachmentsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListVnicAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_attachments_request_response.go index 5bc7ffdf4..d753621ec 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_attachments_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_attachments_request_response.go @@ -30,19 +30,37 @@ type ListVolumeAttachmentsRequest struct { // The OCID of the volume. VolumeId *string `mandatory:"false" contributesTo:"query" name:"volumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVolumeAttachmentsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeAttachmentsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVolumeAttachmentsResponse wrapper for the ListVolumeAttachments operation type ListVolumeAttachmentsResponse struct { // The underlying http response RawResponse *http.Response - // The []VolumeAttachment instance + // A list of []VolumeAttachment instances Items []VolumeAttachment `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -58,3 +76,8 @@ type ListVolumeAttachmentsResponse struct { func (response ListVolumeAttachmentsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backup_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backup_policies_request_response.go new file mode 100644 index 000000000..59393718b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backup_policies_request_response.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVolumeBackupPoliciesRequest wrapper for the ListVolumeBackupPolicies operation +type ListVolumeBackupPoliciesRequest struct { + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeBackupPoliciesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeBackupPoliciesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeBackupPoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListVolumeBackupPoliciesResponse wrapper for the ListVolumeBackupPolicies operation +type ListVolumeBackupPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeBackupPolicy instances + Items []VolumeBackupPolicy `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeBackupPoliciesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeBackupPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backups_request_response.go index 19bdff08c..1c8ab0460 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backups_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backups_request_response.go @@ -42,19 +42,37 @@ type ListVolumeBackupsRequest struct { // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState VolumeBackupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVolumeBackupsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeBackupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVolumeBackupsResponse wrapper for the ListVolumeBackups operation type ListVolumeBackupsResponse struct { // The underlying http response RawResponse *http.Response - // The []VolumeBackup instance + // A list of []VolumeBackup instances Items []VolumeBackup `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -71,6 +89,11 @@ func (response ListVolumeBackupsResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListVolumeBackupsSortByEnum Enum with underlying type: string type ListVolumeBackupsSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_group_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_group_backups_request_response.go new file mode 100644 index 000000000..d6b10dab4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_group_backups_request_response.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVolumeGroupBackupsRequest wrapper for the ListVolumeGroupBackups operation +type ListVolumeGroupBackupsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the volume group. + VolumeGroupId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by Availability Domain if the scope of the resource type is within a + // single Availability Domain. If you call one of these "List" operations without specifying + // an Availability Domain, the resources are grouped by Availability Domain, then sorted. + SortBy ListVolumeGroupBackupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVolumeGroupBackupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeGroupBackupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeGroupBackupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeGroupBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListVolumeGroupBackupsResponse wrapper for the ListVolumeGroupBackups operation +type ListVolumeGroupBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeGroupBackup instances + Items []VolumeGroupBackup `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeGroupBackupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeGroupBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVolumeGroupBackupsSortByEnum Enum with underlying type: string +type ListVolumeGroupBackupsSortByEnum string + +// Set of constants representing the allowable values for ListVolumeGroupBackupsSortBy +const ( + ListVolumeGroupBackupsSortByTimecreated ListVolumeGroupBackupsSortByEnum = "TIMECREATED" + ListVolumeGroupBackupsSortByDisplayname ListVolumeGroupBackupsSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumeGroupBackupsSortBy = map[string]ListVolumeGroupBackupsSortByEnum{ + "TIMECREATED": ListVolumeGroupBackupsSortByTimecreated, + "DISPLAYNAME": ListVolumeGroupBackupsSortByDisplayname, +} + +// GetListVolumeGroupBackupsSortByEnumValues Enumerates the set of values for ListVolumeGroupBackupsSortBy +func GetListVolumeGroupBackupsSortByEnumValues() []ListVolumeGroupBackupsSortByEnum { + values := make([]ListVolumeGroupBackupsSortByEnum, 0) + for _, v := range mappingListVolumeGroupBackupsSortBy { + values = append(values, v) + } + return values +} + +// ListVolumeGroupBackupsSortOrderEnum Enum with underlying type: string +type ListVolumeGroupBackupsSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumeGroupBackupsSortOrder +const ( + ListVolumeGroupBackupsSortOrderAsc ListVolumeGroupBackupsSortOrderEnum = "ASC" + ListVolumeGroupBackupsSortOrderDesc ListVolumeGroupBackupsSortOrderEnum = "DESC" +) + +var mappingListVolumeGroupBackupsSortOrder = map[string]ListVolumeGroupBackupsSortOrderEnum{ + "ASC": ListVolumeGroupBackupsSortOrderAsc, + "DESC": ListVolumeGroupBackupsSortOrderDesc, +} + +// GetListVolumeGroupBackupsSortOrderEnumValues Enumerates the set of values for ListVolumeGroupBackupsSortOrder +func GetListVolumeGroupBackupsSortOrderEnumValues() []ListVolumeGroupBackupsSortOrderEnum { + values := make([]ListVolumeGroupBackupsSortOrderEnum, 0) + for _, v := range mappingListVolumeGroupBackupsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_groups_request_response.go new file mode 100644 index 000000000..3a40936a0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_groups_request_response.go @@ -0,0 +1,142 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVolumeGroupsRequest wrapper for the ListVolumeGroups operation +type ListVolumeGroupsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the Availability Domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by Availability Domain if the scope of the resource type is within a + // single Availability Domain. If you call one of these "List" operations without specifying + // an Availability Domain, the resources are grouped by Availability Domain, then sorted. + SortBy ListVolumeGroupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVolumeGroupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + LifecycleState VolumeGroupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeGroupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeGroupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListVolumeGroupsResponse wrapper for the ListVolumeGroups operation +type ListVolumeGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeGroup instances + Items []VolumeGroup `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeGroupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVolumeGroupsSortByEnum Enum with underlying type: string +type ListVolumeGroupsSortByEnum string + +// Set of constants representing the allowable values for ListVolumeGroupsSortBy +const ( + ListVolumeGroupsSortByTimecreated ListVolumeGroupsSortByEnum = "TIMECREATED" + ListVolumeGroupsSortByDisplayname ListVolumeGroupsSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumeGroupsSortBy = map[string]ListVolumeGroupsSortByEnum{ + "TIMECREATED": ListVolumeGroupsSortByTimecreated, + "DISPLAYNAME": ListVolumeGroupsSortByDisplayname, +} + +// GetListVolumeGroupsSortByEnumValues Enumerates the set of values for ListVolumeGroupsSortBy +func GetListVolumeGroupsSortByEnumValues() []ListVolumeGroupsSortByEnum { + values := make([]ListVolumeGroupsSortByEnum, 0) + for _, v := range mappingListVolumeGroupsSortBy { + values = append(values, v) + } + return values +} + +// ListVolumeGroupsSortOrderEnum Enum with underlying type: string +type ListVolumeGroupsSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumeGroupsSortOrder +const ( + ListVolumeGroupsSortOrderAsc ListVolumeGroupsSortOrderEnum = "ASC" + ListVolumeGroupsSortOrderDesc ListVolumeGroupsSortOrderEnum = "DESC" +) + +var mappingListVolumeGroupsSortOrder = map[string]ListVolumeGroupsSortOrderEnum{ + "ASC": ListVolumeGroupsSortOrderAsc, + "DESC": ListVolumeGroupsSortOrderDesc, +} + +// GetListVolumeGroupsSortOrderEnumValues Enumerates the set of values for ListVolumeGroupsSortOrder +func GetListVolumeGroupsSortOrderEnumValues() []ListVolumeGroupsSortOrderEnum { + values := make([]ListVolumeGroupsSortOrderEnum, 0) + for _, v := range mappingListVolumeGroupsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volumes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volumes_request_response.go index 20bb4c553..b2393e1fb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/list_volumes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volumes_request_response.go @@ -41,21 +41,42 @@ type ListVolumesRequest struct { // is case sensitive. SortOrder ListVolumesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + // The OCID of the volume group. + VolumeGroupId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupId"` + // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. LifecycleState VolumeLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListVolumesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListVolumesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListVolumesResponse wrapper for the ListVolumes operation type ListVolumesResponse struct { // The underlying http response RawResponse *http.Response - // The []Volume instance + // A list of []Volume instances Items []Volume `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -72,6 +93,11 @@ func (response ListVolumesResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListVolumesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListVolumesSortByEnum Enum with underlying type: string type ListVolumesSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/core/local_peering_gateway.go b/vendor/github.com/oracle/oci-go-sdk/core/local_peering_gateway.go index 61242c667..0f6417ef3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/local_peering_gateway.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/local_peering_gateway.go @@ -51,6 +51,17 @@ type LocalPeeringGateway struct { // The OCID of the VCN the LPG belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The range of IP addresses available on the VCN at the other // end of the peering from this LPG. The value is `null` if the LPG is not peered. // You can use this as the destination CIDR for a route rule to route a subnet's diff --git a/vendor/github.com/oracle/oci-go-sdk/core/paravirtualized_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/paravirtualized_volume_attachment.go new file mode 100644 index 000000000..432597620 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/paravirtualized_volume_attachment.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// ParavirtualizedVolumeAttachment A paravirtualized volume attachment. +type ParavirtualizedVolumeAttachment struct { + + // The Availability Domain of an instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the volume attachment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance the volume is attached to. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The date and time the volume was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the volume. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // A user-friendly name. Does not have to be unique, and it cannot be changed. + // Avoid entering confidential information. + // Example: `My volume attachment` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // The current state of the volume attachment. + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +//GetAvailabilityDomain returns AvailabilityDomain +func (m ParavirtualizedVolumeAttachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +//GetCompartmentId returns CompartmentId +func (m ParavirtualizedVolumeAttachment) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetDisplayName returns DisplayName +func (m ParavirtualizedVolumeAttachment) GetDisplayName() *string { + return m.DisplayName +} + +//GetId returns Id +func (m ParavirtualizedVolumeAttachment) GetId() *string { + return m.Id +} + +//GetInstanceId returns InstanceId +func (m ParavirtualizedVolumeAttachment) GetInstanceId() *string { + return m.InstanceId +} + +//GetIsReadOnly returns IsReadOnly +func (m ParavirtualizedVolumeAttachment) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +//GetLifecycleState returns LifecycleState +func (m ParavirtualizedVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { + return m.LifecycleState +} + +//GetTimeCreated returns TimeCreated +func (m ParavirtualizedVolumeAttachment) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetVolumeId returns VolumeId +func (m ParavirtualizedVolumeAttachment) GetVolumeId() *string { + return m.VolumeId +} + +func (m ParavirtualizedVolumeAttachment) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m ParavirtualizedVolumeAttachment) MarshalJSON() (buff []byte, e error) { + type MarshalTypeParavirtualizedVolumeAttachment ParavirtualizedVolumeAttachment + s := struct { + DiscriminatorParam string `json:"attachmentType"` + MarshalTypeParavirtualizedVolumeAttachment + }{ + "paravirtualized", + (MarshalTypeParavirtualizedVolumeAttachment)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/peer_region_for_remote_peering.go b/vendor/github.com/oracle/oci-go-sdk/core/peer_region_for_remote_peering.go new file mode 100644 index 000000000..25a2c262f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/peer_region_for_remote_peering.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PeerRegionForRemotePeering Details about a region that supports remote VCN peering. For more information, see VCN Peering (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.htm). +type PeerRegionForRemotePeering struct { + + // The region's name. + // Example: `us-phoenix-1` + Name *string `mandatory:"true" json:"name"` +} + +func (m PeerRegionForRemotePeering) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/private_ip.go b/vendor/github.com/oracle/oci-go-sdk/core/private_ip.go index 7ae7b37a0..cd1a2468c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/private_ip.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/private_ip.go @@ -44,10 +44,21 @@ type PrivateIp struct { // The OCID of the compartment containing the private IP. CompartmentId *string `mandatory:"false" json:"compartmentId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the private IP. Used for DNS. The value is the hostname // portion of the private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/vendor/github.com/oracle/oci-go-sdk/core/public_ip.go b/vendor/github.com/oracle/oci-go-sdk/core/public_ip.go new file mode 100644 index 000000000..536a45f64 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/public_ip.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PublicIp A *public IP* is a conceptual term that refers to a public IP address and related properties. +// The `publicIp` object is the API representation of a public IP. +// There are two types of public IPs: +// 1. Ephemeral +// 2. Reserved +// For more information and comparison of the two types, +// see Public IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). +type PublicIp struct { + + // The public IP's Availability Domain. This property is set only for ephemeral public IPs + // (that is, when the `scope` of the public IP is set to AVAILABILITY_DOMAIN). The value + // is the Availability Domain of the assigned private IP. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the compartment containing the public IP. For an ephemeral public IP, this is + // the same compartment as the private IP's. For a reserved public IP that is currently assigned, + // this can be a different compartment than the assigned private IP's. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid + // entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The public IP's Oracle ID (OCID). + Id *string `mandatory:"false" json:"id"` + + // The public IP address of the `publicIp` object. + // Example: `129.146.2.1` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The public IP's current state. + LifecycleState PublicIpLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Defines when the public IP is deleted and released back to Oracle's public IP pool. + // * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned private IP. The + // ephemeral public IP is automatically deleted when its private IP is deleted, when + // the VNIC is terminated, or when the instance is terminated. An ephemeral + // public IP must always be assigned to a private IP. + // * `RESERVED`: You control the public IP's lifetime. You can delete a reserved public IP + // whenever you like. It does not need to be assigned to a private IP at all times. + // For more information and comparison of the two types, + // see Public IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). + Lifetime PublicIpLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID of the private IP that the public IP is currently assigned to, or in the + // process of being assigned to. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` + + // Whether the public IP is regional or specific to a particular Availability Domain. + // * `REGION`: The public IP exists within a region and can be assigned to a private IP + // in any Availability Domain in the region. Reserved public IPs have `scope` = `REGION`. + // * `AVAILABILITY_DOMAIN`: The public IP exists within the Availability Domain of the private IP + // it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. + // Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`. + Scope PublicIpScopeEnum `mandatory:"false" json:"scope,omitempty"` + + // The date and time the public IP was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m PublicIp) String() string { + return common.PointerString(m) +} + +// PublicIpLifecycleStateEnum Enum with underlying type: string +type PublicIpLifecycleStateEnum string + +// Set of constants representing the allowable values for PublicIpLifecycleState +const ( + PublicIpLifecycleStateProvisioning PublicIpLifecycleStateEnum = "PROVISIONING" + PublicIpLifecycleStateAvailable PublicIpLifecycleStateEnum = "AVAILABLE" + PublicIpLifecycleStateAssigning PublicIpLifecycleStateEnum = "ASSIGNING" + PublicIpLifecycleStateAssigned PublicIpLifecycleStateEnum = "ASSIGNED" + PublicIpLifecycleStateUnassigning PublicIpLifecycleStateEnum = "UNASSIGNING" + PublicIpLifecycleStateUnassigned PublicIpLifecycleStateEnum = "UNASSIGNED" + PublicIpLifecycleStateTerminating PublicIpLifecycleStateEnum = "TERMINATING" + PublicIpLifecycleStateTerminated PublicIpLifecycleStateEnum = "TERMINATED" +) + +var mappingPublicIpLifecycleState = map[string]PublicIpLifecycleStateEnum{ + "PROVISIONING": PublicIpLifecycleStateProvisioning, + "AVAILABLE": PublicIpLifecycleStateAvailable, + "ASSIGNING": PublicIpLifecycleStateAssigning, + "ASSIGNED": PublicIpLifecycleStateAssigned, + "UNASSIGNING": PublicIpLifecycleStateUnassigning, + "UNASSIGNED": PublicIpLifecycleStateUnassigned, + "TERMINATING": PublicIpLifecycleStateTerminating, + "TERMINATED": PublicIpLifecycleStateTerminated, +} + +// GetPublicIpLifecycleStateEnumValues Enumerates the set of values for PublicIpLifecycleState +func GetPublicIpLifecycleStateEnumValues() []PublicIpLifecycleStateEnum { + values := make([]PublicIpLifecycleStateEnum, 0) + for _, v := range mappingPublicIpLifecycleState { + values = append(values, v) + } + return values +} + +// PublicIpLifetimeEnum Enum with underlying type: string +type PublicIpLifetimeEnum string + +// Set of constants representing the allowable values for PublicIpLifetime +const ( + PublicIpLifetimeEphemeral PublicIpLifetimeEnum = "EPHEMERAL" + PublicIpLifetimeReserved PublicIpLifetimeEnum = "RESERVED" +) + +var mappingPublicIpLifetime = map[string]PublicIpLifetimeEnum{ + "EPHEMERAL": PublicIpLifetimeEphemeral, + "RESERVED": PublicIpLifetimeReserved, +} + +// GetPublicIpLifetimeEnumValues Enumerates the set of values for PublicIpLifetime +func GetPublicIpLifetimeEnumValues() []PublicIpLifetimeEnum { + values := make([]PublicIpLifetimeEnum, 0) + for _, v := range mappingPublicIpLifetime { + values = append(values, v) + } + return values +} + +// PublicIpScopeEnum Enum with underlying type: string +type PublicIpScopeEnum string + +// Set of constants representing the allowable values for PublicIpScope +const ( + PublicIpScopeRegion PublicIpScopeEnum = "REGION" + PublicIpScopeAvailabilityDomain PublicIpScopeEnum = "AVAILABILITY_DOMAIN" +) + +var mappingPublicIpScope = map[string]PublicIpScopeEnum{ + "REGION": PublicIpScopeRegion, + "AVAILABILITY_DOMAIN": PublicIpScopeAvailabilityDomain, +} + +// GetPublicIpScopeEnumValues Enumerates the set of values for PublicIpScope +func GetPublicIpScopeEnumValues() []PublicIpScopeEnum { + values := make([]PublicIpScopeEnum, 0) + for _, v := range mappingPublicIpScope { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/remote_peering_connection.go b/vendor/github.com/oracle/oci-go-sdk/core/remote_peering_connection.go new file mode 100644 index 000000000..7de5c41fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/remote_peering_connection.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RemotePeeringConnection A remote peering connection (RPC) is an object on a DRG that lets the VCN that is attached +// to the DRG peer with a VCN in a different region. *Peering* means that the two VCNs can +// communicate using private IP addresses, but without the traffic traversing the internet or +// routing through your on-premises network. For more information, see +// VCN Peering (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type RemotePeeringConnection struct { + + // The OCID of the compartment that contains the RPC. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the DRG that this RPC belongs to. + DrgId *string `mandatory:"true" json:"drgId"` + + // The OCID of the RPC. + Id *string `mandatory:"true" json:"id"` + + // Whether the VCN at the other end of the peering is in a different tenancy. + // Example: `false` + IsCrossTenancyPeering *bool `mandatory:"true" json:"isCrossTenancyPeering"` + + // The RPC's current lifecycle state. + LifecycleState RemotePeeringConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Whether the RPC is peered with another RPC. `NEW` means the RPC has not yet been + // peered. `PENDING` means the peering is being established. `REVOKED` means the + // RPC at the other end of the peering has been deleted. + PeeringStatus RemotePeeringConnectionPeeringStatusEnum `mandatory:"true" json:"peeringStatus"` + + // The date and time the RPC was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // If this RPC is peered, this value is the OCID of the other RPC. + PeerId *string `mandatory:"false" json:"peerId"` + + // If this RPC is peered, this value is the region that contains the other RPC. + // Example: `us-ashburn-1` + PeerRegionName *string `mandatory:"false" json:"peerRegionName"` + + // If this RPC is peered, this value is the OCID of the other RPC's tenancy. + PeerTenancyId *string `mandatory:"false" json:"peerTenancyId"` +} + +func (m RemotePeeringConnection) String() string { + return common.PointerString(m) +} + +// RemotePeeringConnectionLifecycleStateEnum Enum with underlying type: string +type RemotePeeringConnectionLifecycleStateEnum string + +// Set of constants representing the allowable values for RemotePeeringConnectionLifecycleState +const ( + RemotePeeringConnectionLifecycleStateAvailable RemotePeeringConnectionLifecycleStateEnum = "AVAILABLE" + RemotePeeringConnectionLifecycleStateProvisioning RemotePeeringConnectionLifecycleStateEnum = "PROVISIONING" + RemotePeeringConnectionLifecycleStateTerminating RemotePeeringConnectionLifecycleStateEnum = "TERMINATING" + RemotePeeringConnectionLifecycleStateTerminated RemotePeeringConnectionLifecycleStateEnum = "TERMINATED" +) + +var mappingRemotePeeringConnectionLifecycleState = map[string]RemotePeeringConnectionLifecycleStateEnum{ + "AVAILABLE": RemotePeeringConnectionLifecycleStateAvailable, + "PROVISIONING": RemotePeeringConnectionLifecycleStateProvisioning, + "TERMINATING": RemotePeeringConnectionLifecycleStateTerminating, + "TERMINATED": RemotePeeringConnectionLifecycleStateTerminated, +} + +// GetRemotePeeringConnectionLifecycleStateEnumValues Enumerates the set of values for RemotePeeringConnectionLifecycleState +func GetRemotePeeringConnectionLifecycleStateEnumValues() []RemotePeeringConnectionLifecycleStateEnum { + values := make([]RemotePeeringConnectionLifecycleStateEnum, 0) + for _, v := range mappingRemotePeeringConnectionLifecycleState { + values = append(values, v) + } + return values +} + +// RemotePeeringConnectionPeeringStatusEnum Enum with underlying type: string +type RemotePeeringConnectionPeeringStatusEnum string + +// Set of constants representing the allowable values for RemotePeeringConnectionPeeringStatus +const ( + RemotePeeringConnectionPeeringStatusInvalid RemotePeeringConnectionPeeringStatusEnum = "INVALID" + RemotePeeringConnectionPeeringStatusNew RemotePeeringConnectionPeeringStatusEnum = "NEW" + RemotePeeringConnectionPeeringStatusPending RemotePeeringConnectionPeeringStatusEnum = "PENDING" + RemotePeeringConnectionPeeringStatusPeered RemotePeeringConnectionPeeringStatusEnum = "PEERED" + RemotePeeringConnectionPeeringStatusRevoked RemotePeeringConnectionPeeringStatusEnum = "REVOKED" +) + +var mappingRemotePeeringConnectionPeeringStatus = map[string]RemotePeeringConnectionPeeringStatusEnum{ + "INVALID": RemotePeeringConnectionPeeringStatusInvalid, + "NEW": RemotePeeringConnectionPeeringStatusNew, + "PENDING": RemotePeeringConnectionPeeringStatusPending, + "PEERED": RemotePeeringConnectionPeeringStatusPeered, + "REVOKED": RemotePeeringConnectionPeeringStatusRevoked, +} + +// GetRemotePeeringConnectionPeeringStatusEnumValues Enumerates the set of values for RemotePeeringConnectionPeeringStatus +func GetRemotePeeringConnectionPeeringStatusEnumValues() []RemotePeeringConnectionPeeringStatusEnum { + values := make([]RemotePeeringConnectionPeeringStatusEnum, 0) + for _, v := range mappingRemotePeeringConnectionPeeringStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/route_rule.go b/vendor/github.com/oracle/oci-go-sdk/core/route_rule.go index 11b0e1b2a..f50199fef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/route_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/route_rule.go @@ -16,6 +16,7 @@ import ( // packets to (a target). type RouteRule struct { + // Deprecated, Destination and DestinationType should be used instead; request including both fields will be rejected. // A destination IP address range in CIDR notation. Matching packets will // be routed to the indicated network entity (the target). // Example: `0.0.0.0/0` @@ -25,8 +26,42 @@ type RouteRule struct { // targets you can specify, see // Route Tables (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). NetworkEntityId *string `mandatory:"true" json:"networkEntityId"` + + // The destination service cidrBlock or destination IP address range in CIDR notation. Matching packets will + // be routed to the indicated network entity (the target). + // Examples: `10.12.0.0/16` + // `oci-phx-objectstorage` + Destination *string `mandatory:"false" json:"destination"` + + // Type of destination for the route rule. SERVICE_CIDR_BLOCK should be used if destination is a service + // cidrBlock. CIDR_BLOCK should be used if destination is IP address range in CIDR notation. It must be provided + // along with `destination`. + DestinationType RouteRuleDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` } func (m RouteRule) String() string { return common.PointerString(m) } + +// RouteRuleDestinationTypeEnum Enum with underlying type: string +type RouteRuleDestinationTypeEnum string + +// Set of constants representing the allowable values for RouteRuleDestinationType +const ( + RouteRuleDestinationTypeCidrBlock RouteRuleDestinationTypeEnum = "CIDR_BLOCK" + RouteRuleDestinationTypeServiceCidrBlock RouteRuleDestinationTypeEnum = "SERVICE_CIDR_BLOCK" +) + +var mappingRouteRuleDestinationType = map[string]RouteRuleDestinationTypeEnum{ + "CIDR_BLOCK": RouteRuleDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": RouteRuleDestinationTypeServiceCidrBlock, +} + +// GetRouteRuleDestinationTypeEnumValues Enumerates the set of values for RouteRuleDestinationType +func GetRouteRuleDestinationTypeEnumValues() []RouteRuleDestinationTypeEnum { + values := make([]RouteRuleDestinationTypeEnum, 0) + for _, v := range mappingRouteRuleDestinationType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/route_table.go b/vendor/github.com/oracle/oci-go-sdk/core/route_table.go index f255d131c..8e3a6bcd4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/route_table.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/route_table.go @@ -35,10 +35,21 @@ type RouteTable struct { // The OCID of the VCN the route table list belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the route table was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/vendor/github.com/oracle/oci-go-sdk/core/security_list.go b/vendor/github.com/oracle/oci-go-sdk/core/security_list.go index d55bcd206..fe5a5cd1b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/security_list.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/security_list.go @@ -50,6 +50,17 @@ type SecurityList struct { // The OCID of the VCN the security list belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m SecurityList) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/service.go b/vendor/github.com/oracle/oci-go-sdk/core/service.go new file mode 100644 index 000000000..4b0013525 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/service.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Service Information about a service that is accessible through a service gateway. +type Service struct { + + // A string that represents the public endpoints for the service. When you set up a route rule + // to route traffic to the service gateway, use this value as the destination CIDR block for + // the rule. See RouteTable. + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // Description of the service. + Description *string `mandatory:"true" json:"description"` + + // The service's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + Id *string `mandatory:"true" json:"id"` + + // Name of the service. + Name *string `mandatory:"true" json:"name"` +} + +func (m Service) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/service_gateway.go b/vendor/github.com/oracle/oci-go-sdk/core/service_gateway.go new file mode 100644 index 000000000..355899398 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/service_gateway.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ServiceGateway Represents a router that connects the edge of a VCN with public Oracle Cloud Infrastructure +// services such as Object Storage. Traffic leaving the VCN and destined for a supported public +// service (see ListServices) is routed through the +// service gateway and does not traverse the internet. The instances in the VCN do not need to +// have public IP addresses nor be in a public subnet. The VCN does not need an internet gateway +// for this traffic. For more information, see +// Access to Object Storage: Service Gateway (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/servicegateway.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type ServiceGateway struct { + + // Whether the service gateway blocks all traffic through it. The default is `false`. When + // this is `true`, traffic is not routed to any services, regardless of route rules. + // Example: `true` + BlockTraffic *bool `mandatory:"true" json:"blockTraffic"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the + // service gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the service gateway. + Id *string `mandatory:"true" json:"id"` + + // The service gateway's current state. + LifecycleState ServiceGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // List of the services enabled on this service gateway. The list can be empty. + // You can enable a particular service by using + // AttachServiceId. + Services []ServiceIdResponseDetails `mandatory:"true" json:"services"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the VCN the service gateway + // belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Usage of predefined tag keys. These predefined keys are scoped to namespaces. + // Example: `{"foo-namespace": {"bar-key": "foo-value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The date and time the service gateway was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m ServiceGateway) String() string { + return common.PointerString(m) +} + +// ServiceGatewayLifecycleStateEnum Enum with underlying type: string +type ServiceGatewayLifecycleStateEnum string + +// Set of constants representing the allowable values for ServiceGatewayLifecycleState +const ( + ServiceGatewayLifecycleStateProvisioning ServiceGatewayLifecycleStateEnum = "PROVISIONING" + ServiceGatewayLifecycleStateAvailable ServiceGatewayLifecycleStateEnum = "AVAILABLE" + ServiceGatewayLifecycleStateTerminating ServiceGatewayLifecycleStateEnum = "TERMINATING" + ServiceGatewayLifecycleStateTerminated ServiceGatewayLifecycleStateEnum = "TERMINATED" +) + +var mappingServiceGatewayLifecycleState = map[string]ServiceGatewayLifecycleStateEnum{ + "PROVISIONING": ServiceGatewayLifecycleStateProvisioning, + "AVAILABLE": ServiceGatewayLifecycleStateAvailable, + "TERMINATING": ServiceGatewayLifecycleStateTerminating, + "TERMINATED": ServiceGatewayLifecycleStateTerminated, +} + +// GetServiceGatewayLifecycleStateEnumValues Enumerates the set of values for ServiceGatewayLifecycleState +func GetServiceGatewayLifecycleStateEnumValues() []ServiceGatewayLifecycleStateEnum { + values := make([]ServiceGatewayLifecycleStateEnum, 0) + for _, v := range mappingServiceGatewayLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/service_id_request_details.go b/vendor/github.com/oracle/oci-go-sdk/core/service_id_request_details.go new file mode 100644 index 000000000..caba28c0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/service_id_request_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ServiceIdRequestDetails The representation of ServiceIdRequestDetails +type ServiceIdRequestDetails struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the service. + ServiceId *string `mandatory:"true" json:"serviceId"` +} + +func (m ServiceIdRequestDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/service_id_response_details.go b/vendor/github.com/oracle/oci-go-sdk/core/service_id_response_details.go new file mode 100644 index 000000000..82dca23f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/service_id_response_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ServiceIdResponseDetails The representation of ServiceIdResponseDetails +type ServiceIdResponseDetails struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the service. + ServiceId *string `mandatory:"true" json:"serviceId"` + + // The name of the service. + ServiceName *string `mandatory:"true" json:"serviceName"` +} + +func (m ServiceIdResponseDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/subnet.go b/vendor/github.com/oracle/oci-go-sdk/core/subnet.go index d765cefce..9667ea735 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/subnet.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/subnet.go @@ -53,6 +53,11 @@ type Subnet struct { // Example: `00:00:17:B6:4D:DD` VirtualRouterMac *string `mandatory:"true" json:"virtualRouterMac"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The OCID of the set of DHCP options associated with the subnet. DhcpOptionsId *string `mandatory:"false" json:"dhcpOptionsId"` @@ -72,6 +77,12 @@ type Subnet struct { // Example: `subnet123` DnsLabel *string `mandatory:"false" json:"dnsLabel"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Whether VNICs within this subnet can have public IP addresses. // Defaults to false, which means VNICs created in this subnet will // automatically be assigned public IP addresses unless specified diff --git a/vendor/github.com/oracle/oci-go-sdk/core/terminate_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/terminate_instance_request_response.go index 085b4c5d8..618bb316f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/terminate_instance_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/terminate_instance_request_response.go @@ -22,12 +22,30 @@ type TerminateInstanceRequest struct { // Specifies whether to delete or preserve the boot volume when terminating an instance. // The default value is false. PreserveBootVolume *bool `mandatory:"false" contributesTo:"query" name:"preserveBootVolume"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request TerminateInstanceRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request TerminateInstanceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TerminateInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // TerminateInstanceResponse wrapper for the TerminateInstance operation type TerminateInstanceResponse struct { @@ -42,3 +60,8 @@ type TerminateInstanceResponse struct { func (response TerminateInstanceResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response TerminateInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_details.go new file mode 100644 index 000000000..65b69e7fb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_details.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateBootVolumeBackupDetails The representation of UpdateBootVolumeBackupDetails +type UpdateBootVolumeBackupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A friendly user-specified name for the boot volume backup. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateBootVolumeBackupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_request_response.go new file mode 100644 index 000000000..1b4056bea --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_backup_request_response.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateBootVolumeBackupRequest wrapper for the UpdateBootVolumeBackup operation +type UpdateBootVolumeBackupRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // Update boot volume backup fields + UpdateBootVolumeBackupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateBootVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateBootVolumeBackupResponse wrapper for the UpdateBootVolumeBackup operation +type UpdateBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeBackup instance + BootVolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_details.go index ead6727c7..44a4a9fcb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_details.go @@ -15,9 +15,20 @@ import ( // UpdateBootVolumeDetails The representation of UpdateBootVolumeDetails type UpdateBootVolumeDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateBootVolumeDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_request_response.go index 08ea32ad4..e38055739 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_request_response.go @@ -21,12 +21,30 @@ type UpdateBootVolumeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateBootVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateBootVolumeResponse wrapper for the UpdateBootVolume operation type UpdateBootVolumeResponse struct { @@ -47,3 +65,8 @@ type UpdateBootVolumeResponse struct { func (response UpdateBootVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_details.go index cfecb4ead..46c73b79f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_details.go @@ -15,8 +15,19 @@ import ( // UpdateConsoleHistoryDetails The representation of UpdateConsoleHistoryDetails type UpdateConsoleHistoryDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateConsoleHistoryDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_request_response.go index c9bc64732..d1336aaaf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_request_response.go @@ -21,12 +21,30 @@ type UpdateConsoleHistoryRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateConsoleHistoryRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateConsoleHistoryRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateConsoleHistoryResponse wrapper for the UpdateConsoleHistory operation type UpdateConsoleHistoryResponse struct { @@ -47,3 +65,8 @@ type UpdateConsoleHistoryResponse struct { func (response UpdateConsoleHistoryResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_details.go index bd0daa6ef..aae63aed2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_details.go @@ -15,9 +15,20 @@ import ( // UpdateCpeDetails The representation of UpdateCpeDetails type UpdateCpeDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateCpeDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_request_response.go index a87170834..dc916ad55 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_request_response.go @@ -21,12 +21,30 @@ type UpdateCpeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateCpeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateCpeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateCpeResponse wrapper for the UpdateCpe operation type UpdateCpeResponse struct { @@ -47,3 +65,8 @@ type UpdateCpeResponse struct { func (response UpdateCpeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_request_response.go index 23164788c..48cadf431 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_request_response.go @@ -21,12 +21,30 @@ type UpdateCrossConnectGroupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateCrossConnectGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateCrossConnectGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateCrossConnectGroupResponse wrapper for the UpdateCrossConnectGroup operation type UpdateCrossConnectGroupResponse struct { @@ -47,3 +65,8 @@ type UpdateCrossConnectGroupResponse struct { func (response UpdateCrossConnectGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_request_response.go index 8af219a51..2b06ec50e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_request_response.go @@ -21,12 +21,30 @@ type UpdateCrossConnectRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateCrossConnectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateCrossConnectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateCrossConnectResponse wrapper for the UpdateCrossConnect operation type UpdateCrossConnectResponse struct { @@ -47,3 +65,8 @@ type UpdateCrossConnectResponse struct { func (response UpdateCrossConnectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_details.go index b2e221a13..2224773d9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_details.go @@ -16,10 +16,21 @@ import ( // UpdateDhcpDetails The representation of UpdateDhcpDetails type UpdateDhcpDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + Options []DhcpOption `mandatory:"false" json:"options"` } @@ -30,22 +41,26 @@ func (m UpdateDhcpDetails) String() string { // UnmarshalJSON unmarshals from json func (m *UpdateDhcpDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - Options []dhcpoption `json:"options"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + Options []dhcpoption `json:"options"` }{} e = json.Unmarshal(data, &model) if e != nil { return } + m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName + m.FreeformTags = model.FreeformTags m.Options = make([]DhcpOption, len(model.Options)) for i, n := range model.Options { nn, err := n.UnmarshalPolymorphicJSON(n.JsonData) if err != nil { return err } - m.Options[i] = nn + m.Options[i] = nn.(DhcpOption) } return } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_options_request_response.go index c8b6e542d..e87c1e8d1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_options_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_options_request_response.go @@ -21,12 +21,30 @@ type UpdateDhcpOptionsRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateDhcpOptionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateDhcpOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateDhcpOptionsResponse wrapper for the UpdateDhcpOptions operation type UpdateDhcpOptionsResponse struct { @@ -47,3 +65,8 @@ type UpdateDhcpOptionsResponse struct { func (response UpdateDhcpOptionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_request_response.go index c0580c97c..838bbd742 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_request_response.go @@ -21,12 +21,30 @@ type UpdateDrgAttachmentRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateDrgAttachmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgAttachmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateDrgAttachmentResponse wrapper for the UpdateDrgAttachment operation type UpdateDrgAttachmentResponse struct { @@ -47,3 +65,8 @@ type UpdateDrgAttachmentResponse struct { func (response UpdateDrgAttachmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_details.go index 2e64240b5..edc35e8d6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_details.go @@ -15,9 +15,20 @@ import ( // UpdateDrgDetails The representation of UpdateDrgDetails type UpdateDrgDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateDrgDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_request_response.go index 0aba53e12..f35ebd864 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_request_response.go @@ -21,12 +21,30 @@ type UpdateDrgRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateDrgRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateDrgResponse wrapper for the UpdateDrg operation type UpdateDrgResponse struct { @@ -47,3 +65,8 @@ type UpdateDrgResponse struct { func (response UpdateDrgResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_i_p_sec_connection_request_response.go index ad809bea8..403a3b790 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_i_p_sec_connection_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_i_p_sec_connection_request_response.go @@ -21,12 +21,30 @@ type UpdateIPSecConnectionRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateIPSecConnectionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateIPSecConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateIPSecConnectionResponse wrapper for the UpdateIPSecConnection operation type UpdateIPSecConnectionResponse struct { @@ -47,3 +65,8 @@ type UpdateIPSecConnectionResponse struct { func (response UpdateIPSecConnectionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_image_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_image_details.go index f3c35d5fa..1ebfa0464 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_image_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_image_details.go @@ -15,10 +15,21 @@ import ( // UpdateImageDetails The representation of UpdateImageDetails type UpdateImageDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. // Example: `My custom Oracle Linux image` DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateImageDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_image_request_response.go index 6757b1d1a..9180df384 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_image_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_image_request_response.go @@ -28,12 +28,30 @@ type UpdateImageRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateImageRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateImageRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateImageResponse wrapper for the UpdateImage operation type UpdateImageResponse struct { @@ -54,3 +72,8 @@ type UpdateImageResponse struct { func (response UpdateImageResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_details.go index e18c8c402..f7b25cba7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_details.go @@ -15,10 +15,21 @@ import ( // UpdateInstanceDetails The representation of UpdateInstanceDetails type UpdateInstanceDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. // Example: `My bare metal instance` DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateInstanceDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_request_response.go index 3705804cd..90f39c075 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_instance_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_request_response.go @@ -28,12 +28,30 @@ type UpdateInstanceRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateInstanceRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateInstanceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateInstanceResponse wrapper for the UpdateInstance operation type UpdateInstanceResponse struct { @@ -54,3 +72,8 @@ type UpdateInstanceResponse struct { func (response UpdateInstanceResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_details.go index 9410eeef1..45f493368 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_details.go @@ -15,10 +15,21 @@ import ( // UpdateInternetGatewayDetails The representation of UpdateInternetGatewayDetails type UpdateInternetGatewayDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Whether the gateway is enabled. IsEnabled *bool `mandatory:"false" json:"isEnabled"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_request_response.go index a81ca3093..52fc54a5d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_request_response.go @@ -21,12 +21,30 @@ type UpdateInternetGatewayRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateInternetGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateInternetGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateInternetGatewayResponse wrapper for the UpdateInternetGateway operation type UpdateInternetGatewayResponse struct { @@ -47,3 +65,8 @@ type UpdateInternetGatewayResponse struct { func (response UpdateInternetGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_ip_sec_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_ip_sec_connection_details.go index b6834690b..b017ebe0d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_ip_sec_connection_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_ip_sec_connection_details.go @@ -15,9 +15,20 @@ import ( // UpdateIpSecConnectionDetails The representation of UpdateIpSecConnectionDetails type UpdateIpSecConnectionDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateIpSecConnectionDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_details.go index 7b9d10083..28ff46b82 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_details.go @@ -15,9 +15,20 @@ import ( // UpdateLocalPeeringGatewayDetails The representation of UpdateLocalPeeringGatewayDetails type UpdateLocalPeeringGatewayDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateLocalPeeringGatewayDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_request_response.go index 093c48638..c4f0a8871 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_request_response.go @@ -21,12 +21,30 @@ type UpdateLocalPeeringGatewayRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateLocalPeeringGatewayRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateLocalPeeringGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateLocalPeeringGatewayResponse wrapper for the UpdateLocalPeeringGateway operation type UpdateLocalPeeringGatewayResponse struct { @@ -47,3 +65,8 @@ type UpdateLocalPeeringGatewayResponse struct { func (response UpdateLocalPeeringGatewayResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_details.go index 96c7a2a74..d93cc9c12 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_details.go @@ -15,10 +15,21 @@ import ( // UpdatePrivateIpDetails The representation of UpdatePrivateIpDetails type UpdatePrivateIpDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the private IP. Used for DNS. The value // is the hostname portion of the private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_request_response.go index ae74cf5c7..5f308f7ba 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_request_response.go @@ -11,7 +11,7 @@ import ( // UpdatePrivateIpRequest wrapper for the UpdatePrivateIp operation type UpdatePrivateIpRequest struct { - // The private IP's OCID. + // The OCID of the private IP. PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` // Private IP details. @@ -21,12 +21,30 @@ type UpdatePrivateIpRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdatePrivateIpRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdatePrivateIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdatePrivateIpResponse wrapper for the UpdatePrivateIp operation type UpdatePrivateIpResponse struct { @@ -47,3 +65,8 @@ type UpdatePrivateIpResponse struct { func (response UpdatePrivateIpResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_details.go new file mode 100644 index 000000000..b70ff3e50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdatePublicIpDetails The representation of UpdatePublicIpDetails +type UpdatePublicIpDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid + // entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the private IP to assign the public IP to. + // * If the public IP is already assigned to a different private IP, it will be unassigned + // and then reassigned to the specified private IP. + // * If you set this field to an empty string, the public IP will be unassigned from the + // private IP it is currently assigned to. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` +} + +func (m UpdatePublicIpDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_request_response.go new file mode 100644 index 000000000..3ac1bd660 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_public_ip_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdatePublicIpRequest wrapper for the UpdatePublicIp operation +type UpdatePublicIpRequest struct { + + // The OCID of the public IP. + PublicIpId *string `mandatory:"true" contributesTo:"path" name:"publicIpId"` + + // Public IP details. + UpdatePublicIpDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePublicIpRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdatePublicIpResponse wrapper for the UpdatePublicIp operation +type UpdatePublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_details.go new file mode 100644 index 000000000..38da74e72 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateRemotePeeringConnectionDetails The representation of UpdateRemotePeeringConnectionDetails +type UpdateRemotePeeringConnectionDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateRemotePeeringConnectionDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_request_response.go new file mode 100644 index 000000000..1c662b835 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_remote_peering_connection_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateRemotePeeringConnectionRequest wrapper for the UpdateRemotePeeringConnection operation +type UpdateRemotePeeringConnectionRequest struct { + + // The OCID of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // Request to the update the peering connection to remote region + UpdateRemotePeeringConnectionDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRemotePeeringConnectionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateRemotePeeringConnectionResponse wrapper for the UpdateRemotePeeringConnection operation +type UpdateRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RemotePeeringConnection instance + RemotePeeringConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_details.go index 547a1b2b9..0f10639e4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_details.go @@ -15,10 +15,21 @@ import ( // UpdateRouteTableDetails The representation of UpdateRouteTableDetails type UpdateRouteTableDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The collection of rules used for routing destination IPs to network devices. RouteRules []RouteRule `mandatory:"false" json:"routeRules"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_request_response.go index 5323576a9..5814fc53b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_request_response.go @@ -21,12 +21,30 @@ type UpdateRouteTableRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateRouteTableRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateRouteTableRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateRouteTableResponse wrapper for the UpdateRouteTable operation type UpdateRouteTableResponse struct { @@ -47,3 +65,8 @@ type UpdateRouteTableResponse struct { func (response UpdateRouteTableResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_details.go index d23a3f75c..8a60160cd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_details.go @@ -15,6 +15,11 @@ import ( // UpdateSecurityListDetails The representation of UpdateSecurityListDetails type UpdateSecurityListDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` @@ -22,6 +27,12 @@ type UpdateSecurityListDetails struct { // Rules for allowing egress IP packets. EgressSecurityRules []EgressSecurityRule `mandatory:"false" json:"egressSecurityRules"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Rules for allowing ingress IP packets. IngressSecurityRules []IngressSecurityRule `mandatory:"false" json:"ingressSecurityRules"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_request_response.go index d9e7b468d..8dfe0bd1a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_request_response.go @@ -21,12 +21,30 @@ type UpdateSecurityListRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateSecurityListRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateSecurityListRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateSecurityListResponse wrapper for the UpdateSecurityList operation type UpdateSecurityListResponse struct { @@ -47,3 +65,8 @@ type UpdateSecurityListResponse struct { func (response UpdateSecurityListResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_details.go new file mode 100644 index 000000000..4c13efa90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateServiceGatewayDetails The representation of UpdateServiceGatewayDetails +type UpdateServiceGatewayDetails struct { + + // Whether the service gateway blocks all traffic through it. The default is `false`. When + // this is `true`, traffic is not routed to any services, regardless of route rules. + // Example: `true` + BlockTraffic *bool `mandatory:"false" json:"blockTraffic"` + + // Usage of predefined tag keys. These predefined keys are scoped to namespaces. + // Example: `{"foo-namespace": {"bar-key": "foo-value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // List of all the services you want enabled on this service gateway. Sending an empty list + // means you want to disable all services. Omitting this parameter entirely keeps the + // existing list of services intact. + // You can also enable or disable a particular service by using + // AttachServiceId and + // DetachServiceId. + // For each enabled service, make sure there's a route rule with the service's `cidrBlock` + // as the rule's destination CIDR and the service gateway as the rule's target. See + // RouteTable. + Services []ServiceIdRequestDetails `mandatory:"false" json:"services"` +} + +func (m UpdateServiceGatewayDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_request_response.go new file mode 100644 index 000000000..041403532 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_service_gateway_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateServiceGatewayRequest wrapper for the UpdateServiceGateway operation +type UpdateServiceGatewayRequest struct { + + // The service gateway's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // Details object for updating a service gateway. + UpdateServiceGatewayDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateServiceGatewayRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateServiceGatewayResponse wrapper for the UpdateServiceGateway operation +type UpdateServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_details.go index e15eaa013..6de420036 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_details.go @@ -15,9 +15,20 @@ import ( // UpdateSubnetDetails The representation of UpdateSubnetDetails type UpdateSubnetDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateSubnetDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_request_response.go index 1dec9a727..60e655fd0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_request_response.go @@ -21,12 +21,30 @@ type UpdateSubnetRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateSubnetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateSubnetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateSubnetResponse wrapper for the UpdateSubnet operation type UpdateSubnetResponse struct { @@ -47,3 +65,8 @@ type UpdateSubnetResponse struct { func (response UpdateSubnetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_details.go index e4dca15cd..a1cf00310 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_details.go @@ -15,9 +15,20 @@ import ( // UpdateVcnDetails The representation of UpdateVcnDetails type UpdateVcnDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateVcnDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_request_response.go index 37e483eb0..552d56353 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_request_response.go @@ -21,12 +21,30 @@ type UpdateVcnRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateVcnRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateVcnRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateVcnResponse wrapper for the UpdateVcn operation type UpdateVcnResponse struct { @@ -47,3 +65,8 @@ type UpdateVcnResponse struct { func (response UpdateVcnResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_request_response.go index 7f2a8df15..ea13deac8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_request_response.go @@ -21,12 +21,30 @@ type UpdateVirtualCircuitRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateVirtualCircuitRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateVirtualCircuitRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateVirtualCircuitResponse wrapper for the UpdateVirtualCircuit operation type UpdateVirtualCircuitResponse struct { @@ -47,3 +65,8 @@ type UpdateVirtualCircuitResponse struct { func (response UpdateVirtualCircuitResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_details.go index 6eb74fde7..46da4890d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_details.go @@ -15,9 +15,20 @@ import ( // UpdateVnicDetails The representation of UpdateVnicDetails type UpdateVnicDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname // portion of the primary private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_request_response.go index 9bacd4eb5..ad311bb2a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_request_response.go @@ -21,12 +21,30 @@ type UpdateVnicRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateVnicRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateVnicRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateVnicResponse wrapper for the UpdateVnic operation type UpdateVnicResponse struct { @@ -47,3 +65,8 @@ type UpdateVnicResponse struct { func (response UpdateVnicResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_details.go index 05be76e2b..39530f481 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_details.go @@ -15,9 +15,20 @@ import ( // UpdateVolumeBackupDetails The representation of UpdateVolumeBackupDetails type UpdateVolumeBackupDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A friendly user-specified name for the volume backup. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateVolumeBackupDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_request_response.go index e98d05109..ba71bd0e4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_request_response.go @@ -21,12 +21,30 @@ type UpdateVolumeBackupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateVolumeBackupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateVolumeBackupResponse wrapper for the UpdateVolumeBackup operation type UpdateVolumeBackupResponse struct { @@ -43,3 +61,8 @@ type UpdateVolumeBackupResponse struct { func (response UpdateVolumeBackupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_details.go index e0b642bd7..5f40aec9a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_details.go @@ -15,9 +15,20 @@ import ( // UpdateVolumeDetails The representation of UpdateVolumeDetails type UpdateVolumeDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateVolumeDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_details.go new file mode 100644 index 000000000..32b0a9971 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_details.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateVolumeGroupBackupDetails The representation of UpdateVolumeGroupBackupDetails +type UpdateVolumeGroupBackupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A friendly user-specified name for the volume group backup. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateVolumeGroupBackupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_request_response.go new file mode 100644 index 000000000..b21e05a08 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_backup_request_response.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateVolumeGroupBackupRequest wrapper for the UpdateVolumeGroupBackup operation +type UpdateVolumeGroupBackupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // Update volume group backup fields + UpdateVolumeGroupBackupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeGroupBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateVolumeGroupBackupResponse wrapper for the UpdateVolumeGroupBackup operation +type UpdateVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupBackup instance + VolumeGroupBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_details.go new file mode 100644 index 000000000..fb9774148 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_details.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateVolumeGroupDetails The representation of UpdateVolumeGroupDetails +type UpdateVolumeGroupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name for the volume group. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // OCIDs for the volumes in this volume group. + VolumeIds []string `mandatory:"false" json:"volumeIds"` +} + +func (m UpdateVolumeGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_request_response.go new file mode 100644 index 000000000..c48b8b641 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_group_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateVolumeGroupRequest wrapper for the UpdateVolumeGroup operation +type UpdateVolumeGroupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group. + VolumeGroupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupId"` + + // Update volume group's set of volumes and/or display name + UpdateVolumeGroupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateVolumeGroupResponse wrapper for the UpdateVolumeGroup operation +type UpdateVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroup instance + VolumeGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_request_response.go index b8b044f97..7582c970b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_request_response.go @@ -21,12 +21,30 @@ type UpdateVolumeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateVolumeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateVolumeResponse wrapper for the UpdateVolume operation type UpdateVolumeResponse struct { @@ -47,3 +65,8 @@ type UpdateVolumeResponse struct { func (response UpdateVolumeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/vcn.go b/vendor/github.com/oracle/oci-go-sdk/core/vcn.go index 8077a531d..dc06abee7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/vcn.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/vcn.go @@ -41,6 +41,11 @@ type Vcn struct { // The OCID for the VCN's default security list. DefaultSecurityListId *string `mandatory:"false" json:"defaultSecurityListId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` @@ -57,6 +62,12 @@ type Vcn struct { // Example: `vcn1` DnsLabel *string `mandatory:"false" json:"dnsLabel"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the VCN was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/vendor/github.com/oracle/oci-go-sdk/core/vnic.go b/vendor/github.com/oracle/oci-go-sdk/core/vnic.go index d7eb9d053..28f33810b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/vnic.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/vnic.go @@ -52,10 +52,21 @@ type Vnic struct { // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname // portion of the primary private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume.go b/vendor/github.com/oracle/oci-go-sdk/core/volume.go index 85c7394c5..1960ec785 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/volume.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume.go @@ -44,6 +44,17 @@ type Volume struct { // The date and time the volume was created. Format defined by RFC3339. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Specifies whether the cloned volume's data has finished copying from the source volume or backup. IsHydrated *bool `mandatory:"false" json:"isHydrated"` @@ -53,6 +64,9 @@ type Volume struct { // The volume source, either an existing volume in the same Availability Domain or a volume backup. // If null, an empty volume is created. SourceDetails VolumeSourceDetails `mandatory:"false" json:"sourceDetails"` + + // The OCID of the source volume group. + VolumeGroupId *string `mandatory:"false" json:"volumeGroupId"` } func (m Volume) String() string { @@ -62,29 +76,35 @@ func (m Volume) String() string { // UnmarshalJSON unmarshals from json func (m *Volume) UnmarshalJSON(data []byte) (e error) { model := struct { - IsHydrated *bool `json:"isHydrated"` - SizeInGBs *int `json:"sizeInGBs"` - SourceDetails volumesourcedetails `json:"sourceDetails"` - AvailabilityDomain *string `json:"availabilityDomain"` - CompartmentId *string `json:"compartmentId"` - DisplayName *string `json:"displayName"` - Id *string `json:"id"` - LifecycleState VolumeLifecycleStateEnum `json:"lifecycleState"` - SizeInMBs *int `json:"sizeInMBs"` - TimeCreated *common.SDKTime `json:"timeCreated"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + IsHydrated *bool `json:"isHydrated"` + SizeInGBs *int `json:"sizeInGBs"` + SourceDetails volumesourcedetails `json:"sourceDetails"` + VolumeGroupId *string `json:"volumeGroupId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + Id *string `json:"id"` + LifecycleState VolumeLifecycleStateEnum `json:"lifecycleState"` + SizeInMBs *int `json:"sizeInMBs"` + TimeCreated *common.SDKTime `json:"timeCreated"` }{} e = json.Unmarshal(data, &model) if e != nil { return } + m.DefinedTags = model.DefinedTags + m.FreeformTags = model.FreeformTags m.IsHydrated = model.IsHydrated m.SizeInGBs = model.SizeInGBs nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) if e != nil { return } - m.SourceDetails = nn + m.SourceDetails = nn.(VolumeSourceDetails) + m.VolumeGroupId = model.VolumeGroupId m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId m.DisplayName = model.DisplayName diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_attachment.go index d8942c4e9..51a0397a5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/volume_attachment.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_attachment.go @@ -47,6 +47,9 @@ type VolumeAttachment interface { // Avoid entering confidential information. // Example: `My volume attachment` GetDisplayName() *string + + // Whether the attachment was created in read-only mode. + GetIsReadOnly() *bool } type volumeattachment struct { @@ -59,6 +62,7 @@ type volumeattachment struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` VolumeId *string `mandatory:"true" json:"volumeId"` DisplayName *string `mandatory:"false" json:"displayName"` + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` AttachmentType string `json:"attachmentType"` } @@ -81,6 +85,7 @@ func (m *volumeattachment) UnmarshalJSON(data []byte) error { m.TimeCreated = s.Model.TimeCreated m.VolumeId = s.Model.VolumeId m.DisplayName = s.Model.DisplayName + m.IsReadOnly = s.Model.IsReadOnly m.AttachmentType = s.Model.AttachmentType return err @@ -94,6 +99,10 @@ func (m *volumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{}, e mm := IScsiVolumeAttachment{} err = json.Unmarshal(data, &mm) return mm, err + case "paravirtualized": + mm := ParavirtualizedVolumeAttachment{} + err = json.Unmarshal(data, &mm) + return mm, err default: return m, nil } @@ -139,6 +148,11 @@ func (m volumeattachment) GetDisplayName() *string { return m.DisplayName } +//GetIsReadOnly returns IsReadOnly +func (m volumeattachment) GetIsReadOnly() *bool { + return m.IsReadOnly +} + func (m volumeattachment) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_backup.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup.go index 6fd52b878..c3b59bc53 100644 --- a/vendor/github.com/oracle/oci-go-sdk/core/volume_backup.go +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup.go @@ -37,6 +37,27 @@ type VolumeBackup struct { // of the volume data was taken. Format defined by RFC3339. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // The type of a volume backup. + Type VolumeBackupTypeEnum `mandatory:"true" json:"type"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The date and time the volume backup will expire and be automatically deleted. + // Format defined by RFC3339. This parameter will always be present for backups that + // were created automatically by a scheduled-backup policy. For manually created backups, + // it will be absent, signifying that there is no expiration time and the backup will + // last forever until manually deleted. + ExpirationTime *common.SDKTime `mandatory:"false" json:"expirationTime"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The size of the volume, in GBs. SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` @@ -44,6 +65,9 @@ type VolumeBackup struct { // This field is deprecated. Please use sizeInGBs. SizeInMBs *int `mandatory:"false" json:"sizeInMBs"` + // Specifies whether the backup was created manually, or via scheduled backup policy. + SourceType VolumeBackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + // The date and time the request to create the volume backup was received. Format defined by RFC3339. TimeRequestReceived *common.SDKTime `mandatory:"false" json:"timeRequestReceived"` @@ -94,3 +118,49 @@ func GetVolumeBackupLifecycleStateEnumValues() []VolumeBackupLifecycleStateEnum } return values } + +// VolumeBackupSourceTypeEnum Enum with underlying type: string +type VolumeBackupSourceTypeEnum string + +// Set of constants representing the allowable values for VolumeBackupSourceType +const ( + VolumeBackupSourceTypeManual VolumeBackupSourceTypeEnum = "MANUAL" + VolumeBackupSourceTypeScheduled VolumeBackupSourceTypeEnum = "SCHEDULED" +) + +var mappingVolumeBackupSourceType = map[string]VolumeBackupSourceTypeEnum{ + "MANUAL": VolumeBackupSourceTypeManual, + "SCHEDULED": VolumeBackupSourceTypeScheduled, +} + +// GetVolumeBackupSourceTypeEnumValues Enumerates the set of values for VolumeBackupSourceType +func GetVolumeBackupSourceTypeEnumValues() []VolumeBackupSourceTypeEnum { + values := make([]VolumeBackupSourceTypeEnum, 0) + for _, v := range mappingVolumeBackupSourceType { + values = append(values, v) + } + return values +} + +// VolumeBackupTypeEnum Enum with underlying type: string +type VolumeBackupTypeEnum string + +// Set of constants representing the allowable values for VolumeBackupType +const ( + VolumeBackupTypeFull VolumeBackupTypeEnum = "FULL" + VolumeBackupTypeIncremental VolumeBackupTypeEnum = "INCREMENTAL" +) + +var mappingVolumeBackupType = map[string]VolumeBackupTypeEnum{ + "FULL": VolumeBackupTypeFull, + "INCREMENTAL": VolumeBackupTypeIncremental, +} + +// GetVolumeBackupTypeEnumValues Enumerates the set of values for VolumeBackupType +func GetVolumeBackupTypeEnumValues() []VolumeBackupTypeEnum { + values := make([]VolumeBackupTypeEnum, 0) + for _, v := range mappingVolumeBackupType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy.go new file mode 100644 index 000000000..bbc9aad2c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeBackupPolicy A policy for automatically creating volume backups according to a recurring schedule. Has a set of one or more schedules that control when and how backups are created. +type VolumeBackupPolicy struct { + + // A user-friendly name for the volume backup policy. Does not have to be unique and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the volume backup policy. + Id *string `mandatory:"true" json:"id"` + + // The collection of schedules that this policy will apply. + Schedules []VolumeBackupSchedule `mandatory:"true" json:"schedules"` + + // The date and time the volume backup policy was created. Format defined by RFC3339. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m VolumeBackupPolicy) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy_assignment.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy_assignment.go new file mode 100644 index 000000000..81d20d691 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_policy_assignment.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeBackupPolicyAssignment Specifies that a particular volume backup policy is assigned to an asset such as a volume. +type VolumeBackupPolicyAssignment struct { + + // The OCID of the asset (e.g. a volume) to which the policy has been assigned. + AssetId *string `mandatory:"true" json:"assetId"` + + // The OCID of the volume backup policy assignment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the volume backup policy that has been assigned to an asset. + PolicyId *string `mandatory:"true" json:"policyId"` + + // The date and time the volume backup policy assignment was created. Format defined by RFC3339. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m VolumeBackupPolicyAssignment) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_schedule.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_schedule.go new file mode 100644 index 000000000..7630d772b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup_schedule.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeBackupSchedule Defines a chronological recurrence pattern for creating scheduled backups at a particular periodicity. +type VolumeBackupSchedule struct { + + // The type of backup to create. + BackupType VolumeBackupScheduleBackupTypeEnum `mandatory:"true" json:"backupType"` + + // The number of seconds (positive or negative) that the backup time should be shifted from the default interval boundaries specified by the period. + OffsetSeconds *int `mandatory:"true" json:"offsetSeconds"` + + // How often the backup should occur. + Period VolumeBackupSchedulePeriodEnum `mandatory:"true" json:"period"` + + // How long, in seconds, backups created by this schedule should be kept until being automatically deleted. + RetentionSeconds *int `mandatory:"true" json:"retentionSeconds"` +} + +func (m VolumeBackupSchedule) String() string { + return common.PointerString(m) +} + +// VolumeBackupScheduleBackupTypeEnum Enum with underlying type: string +type VolumeBackupScheduleBackupTypeEnum string + +// Set of constants representing the allowable values for VolumeBackupScheduleBackupType +const ( + VolumeBackupScheduleBackupTypeFull VolumeBackupScheduleBackupTypeEnum = "FULL" + VolumeBackupScheduleBackupTypeIncremental VolumeBackupScheduleBackupTypeEnum = "INCREMENTAL" +) + +var mappingVolumeBackupScheduleBackupType = map[string]VolumeBackupScheduleBackupTypeEnum{ + "FULL": VolumeBackupScheduleBackupTypeFull, + "INCREMENTAL": VolumeBackupScheduleBackupTypeIncremental, +} + +// GetVolumeBackupScheduleBackupTypeEnumValues Enumerates the set of values for VolumeBackupScheduleBackupType +func GetVolumeBackupScheduleBackupTypeEnumValues() []VolumeBackupScheduleBackupTypeEnum { + values := make([]VolumeBackupScheduleBackupTypeEnum, 0) + for _, v := range mappingVolumeBackupScheduleBackupType { + values = append(values, v) + } + return values +} + +// VolumeBackupSchedulePeriodEnum Enum with underlying type: string +type VolumeBackupSchedulePeriodEnum string + +// Set of constants representing the allowable values for VolumeBackupSchedulePeriod +const ( + VolumeBackupSchedulePeriodHour VolumeBackupSchedulePeriodEnum = "ONE_HOUR" + VolumeBackupSchedulePeriodDay VolumeBackupSchedulePeriodEnum = "ONE_DAY" + VolumeBackupSchedulePeriodWeek VolumeBackupSchedulePeriodEnum = "ONE_WEEK" + VolumeBackupSchedulePeriodMonth VolumeBackupSchedulePeriodEnum = "ONE_MONTH" + VolumeBackupSchedulePeriodYear VolumeBackupSchedulePeriodEnum = "ONE_YEAR" +) + +var mappingVolumeBackupSchedulePeriod = map[string]VolumeBackupSchedulePeriodEnum{ + "ONE_HOUR": VolumeBackupSchedulePeriodHour, + "ONE_DAY": VolumeBackupSchedulePeriodDay, + "ONE_WEEK": VolumeBackupSchedulePeriodWeek, + "ONE_MONTH": VolumeBackupSchedulePeriodMonth, + "ONE_YEAR": VolumeBackupSchedulePeriodYear, +} + +// GetVolumeBackupSchedulePeriodEnumValues Enumerates the set of values for VolumeBackupSchedulePeriod +func GetVolumeBackupSchedulePeriodEnumValues() []VolumeBackupSchedulePeriodEnum { + values := make([]VolumeBackupSchedulePeriodEnum, 0) + for _, v := range mappingVolumeBackupSchedulePeriod { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_group.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_group.go new file mode 100644 index 000000000..41bb97992 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_group.go @@ -0,0 +1,136 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeGroup Specifies a volume group which is a collection of volumes. For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +type VolumeGroup struct { + + // The availability domain of the volume group. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the volume group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name for the volume group. Does not have to be unique, and it's changeable. Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID for the volume group. + Id *string `mandatory:"true" json:"id"` + + // The aggregate size of the volume group in MBs. + SizeInMBs *int `mandatory:"true" json:"sizeInMBs"` + + // The date and time the volume group was created. Format defined by RFC3339. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // OCIDs for the volumes in this volume group. + VolumeIds []string `mandatory:"true" json:"volumeIds"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The current state of a volume group. + LifecycleState VolumeGroupLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The aggregate size of the volume group in GBs. + SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` + + // The volume group source. The source is either another a list of + // volume IDs in the same availability domain, another volume group, or a volume group backup. + SourceDetails VolumeGroupSourceDetails `mandatory:"false" json:"sourceDetails"` +} + +func (m VolumeGroup) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *VolumeGroup) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + LifecycleState VolumeGroupLifecycleStateEnum `json:"lifecycleState"` + SizeInGBs *int `json:"sizeInGBs"` + SourceDetails volumegroupsourcedetails `json:"sourceDetails"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + Id *string `json:"id"` + SizeInMBs *int `json:"sizeInMBs"` + TimeCreated *common.SDKTime `json:"timeCreated"` + VolumeIds []string `json:"volumeIds"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DefinedTags = model.DefinedTags + m.FreeformTags = model.FreeformTags + m.LifecycleState = model.LifecycleState + m.SizeInGBs = model.SizeInGBs + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn.(VolumeGroupSourceDetails) + m.AvailabilityDomain = model.AvailabilityDomain + m.CompartmentId = model.CompartmentId + m.DisplayName = model.DisplayName + m.Id = model.Id + m.SizeInMBs = model.SizeInMBs + m.TimeCreated = model.TimeCreated + m.VolumeIds = make([]string, len(model.VolumeIds)) + for i, n := range model.VolumeIds { + m.VolumeIds[i] = n + } + return +} + +// VolumeGroupLifecycleStateEnum Enum with underlying type: string +type VolumeGroupLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeGroupLifecycleState +const ( + VolumeGroupLifecycleStateProvisioning VolumeGroupLifecycleStateEnum = "PROVISIONING" + VolumeGroupLifecycleStateAvailable VolumeGroupLifecycleStateEnum = "AVAILABLE" + VolumeGroupLifecycleStateTerminating VolumeGroupLifecycleStateEnum = "TERMINATING" + VolumeGroupLifecycleStateTerminated VolumeGroupLifecycleStateEnum = "TERMINATED" + VolumeGroupLifecycleStateFaulty VolumeGroupLifecycleStateEnum = "FAULTY" +) + +var mappingVolumeGroupLifecycleState = map[string]VolumeGroupLifecycleStateEnum{ + "PROVISIONING": VolumeGroupLifecycleStateProvisioning, + "AVAILABLE": VolumeGroupLifecycleStateAvailable, + "TERMINATING": VolumeGroupLifecycleStateTerminating, + "TERMINATED": VolumeGroupLifecycleStateTerminated, + "FAULTY": VolumeGroupLifecycleStateFaulty, +} + +// GetVolumeGroupLifecycleStateEnumValues Enumerates the set of values for VolumeGroupLifecycleState +func GetVolumeGroupLifecycleStateEnumValues() []VolumeGroupLifecycleStateEnum { + values := make([]VolumeGroupLifecycleStateEnum, 0) + for _, v := range mappingVolumeGroupLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_group_backup.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_backup.go new file mode 100644 index 000000000..098d98881 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_backup.go @@ -0,0 +1,136 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeGroupBackup A point-in-time copy of a volume group that can then be used to create a new volume group +// or restore a volume group. For more information, see Volume Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/volumegroups.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type VolumeGroupBackup struct { + + // The OCID of the compartment that contains the volume group backup. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name for the volume group backup. Does not have to be unique and it's changeable. Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the volume group backup. + Id *string `mandatory:"true" json:"id"` + + // The current state of a volume group backup. + LifecycleState VolumeGroupBackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the volume group backup was created. This is the time the actual point-in-time image + // of the volume group data was taken. Format defined by RFC3339. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The type of backup. + Type VolumeGroupBackupTypeEnum `mandatory:"true" json:"type"` + + // OCIDs for the volume backups in this volume group backup. + VolumeBackupIds []string `mandatory:"true" json:"volumeBackupIds"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see + // Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The aggregate size of the volume group backup, in MBs. + SizeInMBs *int `mandatory:"false" json:"sizeInMBs"` + + // The aggregate size of the volume group backup, in GBs. + SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` + + // The date and time the request to create the volume group backup was received. Format defined by RFC3339. + TimeRequestReceived *common.SDKTime `mandatory:"false" json:"timeRequestReceived"` + + // The aggregate size used by the volume group backup, in MBs. + // It is typically smaller than sizeInMBs, depending on the space + // consumed on the volume group and whether the volume backup is full or incremental. + UniqueSizeInMbs *int `mandatory:"false" json:"uniqueSizeInMbs"` + + // The aggregate size used by the volume group backup, in GBs. + // It is typically smaller than sizeInGBs, depending on the space + // consumed on the volume group and whether the volume backup is full or incremental. + UniqueSizeInGbs *int `mandatory:"false" json:"uniqueSizeInGbs"` + + // The OCID of the source volume group. + VolumeGroupId *string `mandatory:"false" json:"volumeGroupId"` +} + +func (m VolumeGroupBackup) String() string { + return common.PointerString(m) +} + +// VolumeGroupBackupLifecycleStateEnum Enum with underlying type: string +type VolumeGroupBackupLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeGroupBackupLifecycleState +const ( + VolumeGroupBackupLifecycleStateCreating VolumeGroupBackupLifecycleStateEnum = "CREATING" + VolumeGroupBackupLifecycleStateCommitted VolumeGroupBackupLifecycleStateEnum = "COMMITTED" + VolumeGroupBackupLifecycleStateAvailable VolumeGroupBackupLifecycleStateEnum = "AVAILABLE" + VolumeGroupBackupLifecycleStateTerminating VolumeGroupBackupLifecycleStateEnum = "TERMINATING" + VolumeGroupBackupLifecycleStateTerminated VolumeGroupBackupLifecycleStateEnum = "TERMINATED" + VolumeGroupBackupLifecycleStateFaulty VolumeGroupBackupLifecycleStateEnum = "FAULTY" + VolumeGroupBackupLifecycleStateRequestReceived VolumeGroupBackupLifecycleStateEnum = "REQUEST_RECEIVED" +) + +var mappingVolumeGroupBackupLifecycleState = map[string]VolumeGroupBackupLifecycleStateEnum{ + "CREATING": VolumeGroupBackupLifecycleStateCreating, + "COMMITTED": VolumeGroupBackupLifecycleStateCommitted, + "AVAILABLE": VolumeGroupBackupLifecycleStateAvailable, + "TERMINATING": VolumeGroupBackupLifecycleStateTerminating, + "TERMINATED": VolumeGroupBackupLifecycleStateTerminated, + "FAULTY": VolumeGroupBackupLifecycleStateFaulty, + "REQUEST_RECEIVED": VolumeGroupBackupLifecycleStateRequestReceived, +} + +// GetVolumeGroupBackupLifecycleStateEnumValues Enumerates the set of values for VolumeGroupBackupLifecycleState +func GetVolumeGroupBackupLifecycleStateEnumValues() []VolumeGroupBackupLifecycleStateEnum { + values := make([]VolumeGroupBackupLifecycleStateEnum, 0) + for _, v := range mappingVolumeGroupBackupLifecycleState { + values = append(values, v) + } + return values +} + +// VolumeGroupBackupTypeEnum Enum with underlying type: string +type VolumeGroupBackupTypeEnum string + +// Set of constants representing the allowable values for VolumeGroupBackupType +const ( + VolumeGroupBackupTypeFull VolumeGroupBackupTypeEnum = "FULL" + VolumeGroupBackupTypeIncremental VolumeGroupBackupTypeEnum = "INCREMENTAL" +) + +var mappingVolumeGroupBackupType = map[string]VolumeGroupBackupTypeEnum{ + "FULL": VolumeGroupBackupTypeFull, + "INCREMENTAL": VolumeGroupBackupTypeIncremental, +} + +// GetVolumeGroupBackupTypeEnumValues Enumerates the set of values for VolumeGroupBackupType +func GetVolumeGroupBackupTypeEnumValues() []VolumeGroupBackupTypeEnum { + values := make([]VolumeGroupBackupTypeEnum, 0) + for _, v := range mappingVolumeGroupBackupType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_details.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_details.go new file mode 100644 index 000000000..bac01faf1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_details.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeGroupSourceDetails Specifies the source for a volume group. +type VolumeGroupSourceDetails interface { +} + +type volumegroupsourcedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *volumegroupsourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalervolumegroupsourcedetails volumegroupsourcedetails + s := struct { + Model Unmarshalervolumegroupsourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *volumegroupsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Type { + case "volumeGroupId": + mm := VolumeGroupSourceFromVolumeGroupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeIds": + mm := VolumeGroupSourceFromVolumesDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeGroupBackupId": + mm := VolumeGroupSourceFromVolumeGroupBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +func (m volumegroupsourcedetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_backup_details.go new file mode 100644 index 000000000..f5655d218 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_backup_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeGroupSourceFromVolumeGroupBackupDetails Specifies the volume group backup to restore from. +type VolumeGroupSourceFromVolumeGroupBackupDetails struct { + + // The OCID of the volume group backup to restore from. + VolumeGroupBackupId *string `mandatory:"true" json:"volumeGroupBackupId"` +} + +func (m VolumeGroupSourceFromVolumeGroupBackupDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m VolumeGroupSourceFromVolumeGroupBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeGroupSourceFromVolumeGroupBackupDetails VolumeGroupSourceFromVolumeGroupBackupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeGroupSourceFromVolumeGroupBackupDetails + }{ + "volumeGroupBackupId", + (MarshalTypeVolumeGroupSourceFromVolumeGroupBackupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_details.go new file mode 100644 index 000000000..f668ff535 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volume_group_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeGroupSourceFromVolumeGroupDetails Specifies the volume group to clone from. +type VolumeGroupSourceFromVolumeGroupDetails struct { + + // The OCID of the volume group to clone from. + VolumeGroupId *string `mandatory:"true" json:"volumeGroupId"` +} + +func (m VolumeGroupSourceFromVolumeGroupDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m VolumeGroupSourceFromVolumeGroupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeGroupSourceFromVolumeGroupDetails VolumeGroupSourceFromVolumeGroupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeGroupSourceFromVolumeGroupDetails + }{ + "volumeGroupId", + (MarshalTypeVolumeGroupSourceFromVolumeGroupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volumes_details.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volumes_details.go new file mode 100644 index 000000000..2d7ea3638 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_group_source_from_volumes_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeGroupSourceFromVolumesDetails Specifies the volumes in a volume group. +type VolumeGroupSourceFromVolumesDetails struct { + + // OCIDs for the volumes in this volume group. + VolumeIds []string `mandatory:"true" json:"volumeIds"` +} + +func (m VolumeGroupSourceFromVolumesDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m VolumeGroupSourceFromVolumesDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeGroupSourceFromVolumesDetails VolumeGroupSourceFromVolumesDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeGroupSourceFromVolumesDetails + }{ + "volumeIds", + (MarshalTypeVolumeGroupSourceFromVolumesDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/backup.go b/vendor/github.com/oracle/oci-go-sdk/database/backup.go index f898387ef..feb8bf96f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/backup.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/backup.go @@ -22,9 +22,15 @@ type Backup struct { // The OCID of the compartment. CompartmentId *string `mandatory:"false" json:"compartmentId"` + // The Oracle Database Edition of the DbSystem on which the backup was taken. + DatabaseEdition *string `mandatory:"false" json:"databaseEdition"` + // The OCID of the database. DatabaseId *string `mandatory:"false" json:"databaseId"` + // Size of the database in mega-bytes at the time the backup was taken. + DbDataSizeInMBs *int `mandatory:"false" json:"dbDataSizeInMBs"` + // The user-friendly name for the backup. It does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go index 5e12d1c60..9cbba5db9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go @@ -22,9 +22,15 @@ type BackupSummary struct { // The OCID of the compartment. CompartmentId *string `mandatory:"false" json:"compartmentId"` + // The Oracle Database Edition of the DbSystem on which the backup was taken. + DatabaseEdition *string `mandatory:"false" json:"databaseEdition"` + // The OCID of the database. DatabaseId *string `mandatory:"false" json:"databaseId"` + // Size of the database in mega-bytes at the time the backup was taken. + DbDataSizeInMBs *int `mandatory:"false" json:"dbDataSizeInMBs"` + // The user-friendly name for the backup. It does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go index 9cd01036e..fda3b7d57 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go @@ -20,12 +20,30 @@ type CreateBackupRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateBackupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateBackupResponse wrapper for the CreateBackup operation type CreateBackupResponse struct { @@ -46,3 +64,8 @@ type CreateBackupResponse struct { func (response CreateBackupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go index b65888e01..5b5f42766 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go @@ -23,12 +23,30 @@ type CreateDataGuardAssociationRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateDataGuardAssociationRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateDataGuardAssociationResponse wrapper for the CreateDataGuardAssociation operation type CreateDataGuardAssociationResponse struct { @@ -49,3 +67,8 @@ type CreateDataGuardAssociationResponse struct { func (response CreateDataGuardAssociationResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateDataGuardAssociationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go index 0565459d5..5f119edee 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go @@ -30,6 +30,16 @@ type CreateDatabaseDetails struct { // Database workload type. DbWorkload CreateDatabaseDetailsDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // National character set for the database. The default is AL16UTF16. Allowed values are: // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go new file mode 100644 index 000000000..53966dcc2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDbHomeFromBackupDetails The representation of CreateDbHomeFromBackupDetails +type CreateDbHomeFromBackupDetails struct { + Database *CreateDatabaseFromBackupDetails `mandatory:"true" json:"database"` + + // The user-provided name of the database home. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CreateDbHomeFromBackupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go index 6df0ab66c..5d1fedc5e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go @@ -20,12 +20,30 @@ type CreateDbHomeRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateDbHomeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDbHomeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateDbHomeResponse wrapper for the CreateDbHome operation type CreateDbHomeResponse struct { @@ -46,3 +64,8 @@ type CreateDbHomeResponse struct { func (response CreateDbHomeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateDbHomeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database.go b/vendor/github.com/oracle/oci-go-sdk/database/database.go index be33ef1a8..f0979ccb3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/database.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/database.go @@ -42,6 +42,16 @@ type Database struct { // Database workload type. DbWorkload *string `mandatory:"false" json:"dbWorkload"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Additional information about the current lifecycleState. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database_client.go b/vendor/github.com/oracle/oci-go-sdk/database/database_client.go index d666cc5f0..cab6c6904 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/database_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/database_client.go @@ -48,8 +48,8 @@ func (client *DatabaseClient) setConfigurationProvider(configProvider common.Con // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -60,20 +60,41 @@ func (client *DatabaseClient) ConfigurationProvider() *common.ConfigurationProvi // CreateBackup Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. func (client DatabaseClient) CreateBackup(ctx context.Context, request CreateBackupRequest) (response CreateBackupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/backups", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createBackup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBackupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createBackup implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) createBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/backups") + if err != nil { + return nil, err + } + + var response CreateBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateDataGuardAssociation Creates a new Data Guard association. A Data Guard association represents the replication relationship between the @@ -81,41 +102,83 @@ func (client DatabaseClient) CreateBackup(ctx context.Context, request CreateBac // All Oracle Cloud Infrastructure resources, including Data Guard associations, get an Oracle-assigned, unique ID // called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. // You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the -// resource in the Console. Fore more information, see -// Resource Identifiers (http://localhost:8000/Content/General/Concepts/identifiers.htm). +// resource in the Console. For more information, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). func (client DatabaseClient) CreateDataGuardAssociation(ctx context.Context, request CreateDataGuardAssociationRequest) (response CreateDataGuardAssociationResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createDataGuardAssociation, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateDataGuardAssociationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDataGuardAssociationResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createDataGuardAssociation implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) createDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations") + if err != nil { + return nil, err + } + + var response CreateDataGuardAssociationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateDbHome Creates a new DB Home in the specified DB System based on the request parameters you provide. func (client DatabaseClient) CreateDbHome(ctx context.Context, request CreateDbHomeRequest) (response CreateDbHomeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dbHomes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createDbHome, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateDbHomeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDbHomeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createDbHome implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) createDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbHomes") + if err != nil { + return nil, err + } + + var response CreateDbHomeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DbNodeAction Performs an action, such as one of the power actions (start, stop, softreset, or reset), on the specified DB Node. @@ -129,56 +192,119 @@ func (client DatabaseClient) CreateDbHome(ctx context.Context, request CreateDbH // (TerminateDbSystem) // to remove its resources from billing and quotas. func (client DatabaseClient) DbNodeAction(ctx context.Context, request DbNodeActionRequest) (response DbNodeActionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dbNodes/{dbNodeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.dbNodeAction, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DbNodeActionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DbNodeActionResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// dbNodeAction implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) dbNodeAction(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbNodes/{dbNodeId}") + if err != nil { + return nil, err + } + + var response DbNodeActionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteBackup Deletes a full backup. You cannot delete automatic backups using this API. func (client DatabaseClient) DeleteBackup(ctx context.Context, request DeleteBackupRequest) (response DeleteBackupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/backups/{backupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBackup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBackupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteBackup implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) deleteBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/backups/{backupId}") + if err != nil { + return nil, err + } + + var response DeleteBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteDbHome Deletes a DB Home. The DB Home and its database data are local to the DB System and will be lost when it is deleted. Oracle recommends that you back up any data in the DB System prior to deleting it. func (client DatabaseClient) DeleteDbHome(ctx context.Context, request DeleteDbHomeRequest) (response DeleteDbHomeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/dbHomes/{dbHomeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDbHome, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteDbHomeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDbHomeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteDbHome implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) deleteDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dbHomes/{dbHomeId}") + if err != nil { + return nil, err + } + + var response DeleteDbHomeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // FailoverDataGuardAssociation Performs a failover to transition the standby database identified by the `databaseId` parameter into the @@ -186,200 +312,431 @@ func (client DatabaseClient) DeleteDbHome(ctx context.Context, request DeleteDbH // A failover might result in data loss depending on the protection mode in effect at the time of the primary // database failure. func (client DatabaseClient) FailoverDataGuardAssociation(ctx context.Context, request FailoverDataGuardAssociationRequest) (response FailoverDataGuardAssociationResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/failover", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.failoverDataGuardAssociation, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(FailoverDataGuardAssociationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into FailoverDataGuardAssociationResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// failoverDataGuardAssociation implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) failoverDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/failover") + if err != nil { + return nil, err + } + + var response FailoverDataGuardAssociationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetBackup Gets information about the specified backup. func (client DatabaseClient) GetBackup(ctx context.Context, request GetBackupRequest) (response GetBackupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/backups/{backupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBackup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBackupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getBackup implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/backups/{backupId}") + if err != nil { + return nil, err + } + + var response GetBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDataGuardAssociation Gets the specified Data Guard association's configuration information. func (client DatabaseClient) GetDataGuardAssociation(ctx context.Context, request GetDataGuardAssociationRequest) (response GetDataGuardAssociationResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDataGuardAssociation, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDataGuardAssociationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDataGuardAssociationResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDataGuardAssociation implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}") + if err != nil { + return nil, err + } + + var response GetDataGuardAssociationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDatabase Gets information about a specific database. func (client DatabaseClient) GetDatabase(ctx context.Context, request GetDatabaseRequest) (response GetDatabaseResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases/{databaseId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDatabase, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDatabaseResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDatabase implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDatabase(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases/{databaseId}") + if err != nil { + return nil, err + } + + var response GetDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDbHome Gets information about the specified database home. func (client DatabaseClient) GetDbHome(ctx context.Context, request GetDbHomeRequest) (response GetDbHomeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDbHome, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDbHomeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbHomeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDbHome implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}") + if err != nil { + return nil, err + } + + var response GetDbHomeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDbHomePatch Gets information about a specified patch package. func (client DatabaseClient) GetDbHomePatch(ctx context.Context, request GetDbHomePatchRequest) (response GetDbHomePatchResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patches/{patchId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDbHomePatch, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDbHomePatchResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbHomePatchResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDbHomePatch implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDbHomePatch(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patches/{patchId}") + if err != nil { + return nil, err + } + + var response GetDbHomePatchResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDbHomePatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId func (client DatabaseClient) GetDbHomePatchHistoryEntry(ctx context.Context, request GetDbHomePatchHistoryEntryRequest) (response GetDbHomePatchHistoryEntryResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries/{patchHistoryEntryId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDbHomePatchHistoryEntry, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDbHomePatchHistoryEntryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbHomePatchHistoryEntryResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDbHomePatchHistoryEntry implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDbHomePatchHistoryEntry(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries/{patchHistoryEntryId}") + if err != nil { + return nil, err + } + + var response GetDbHomePatchHistoryEntryResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDbNode Gets information about the specified database node. func (client DatabaseClient) GetDbNode(ctx context.Context, request GetDbNodeRequest) (response GetDbNodeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbNodes/{dbNodeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDbNode, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDbNodeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbNodeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDbNode implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDbNode(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbNodes/{dbNodeId}") + if err != nil { + return nil, err + } + + var response GetDbNodeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDbSystem Gets information about the specified DB System. func (client DatabaseClient) GetDbSystem(ctx context.Context, request GetDbSystemRequest) (response GetDbSystemResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDbSystem, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbSystemResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDbSystem implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}") + if err != nil { + return nil, err + } + + var response GetDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDbSystemPatch Gets information about a specified patch package. func (client DatabaseClient) GetDbSystemPatch(ctx context.Context, request GetDbSystemPatchRequest) (response GetDbSystemPatchResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patches/{patchId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDbSystemPatch, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDbSystemPatchResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbSystemPatchResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDbSystemPatch implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDbSystemPatch(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patches/{patchId}") + if err != nil { + return nil, err + } + + var response GetDbSystemPatchResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetDbSystemPatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId. func (client DatabaseClient) GetDbSystemPatchHistoryEntry(ctx context.Context, request GetDbSystemPatchHistoryEntryRequest) (response GetDbSystemPatchHistoryEntryResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries/{patchHistoryEntryId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDbSystemPatchHistoryEntry, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetDbSystemPatchHistoryEntryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbSystemPatchHistoryEntryResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getDbSystemPatchHistoryEntry implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getDbSystemPatchHistoryEntry(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries/{patchHistoryEntryId}") + if err != nil { + return nil, err + } + + var response GetDbSystemPatchHistoryEntryResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // LaunchDbSystem Launches a new DB System in the specified compartment and Availability Domain. You'll specify a single Oracle @@ -391,363 +748,783 @@ func (client DatabaseClient) GetDbSystemPatchHistoryEntry(ctx context.Context, r // manage existing databases. For more information, see the // Oracle Database CLI Reference (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/References/odacli.htm#Oracle_Database_CLI_Reference). func (client DatabaseClient) LaunchDbSystem(ctx context.Context, request LaunchDbSystemRequest) (response LaunchDbSystemResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dbSystems", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.launchDbSystem, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(LaunchDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into LaunchDbSystemResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// launchDbSystem implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) launchDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems") + if err != nil { + return nil, err + } + + var response LaunchDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListBackups Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. func (client DatabaseClient) ListBackups(ctx context.Context, request ListBackupsRequest) (response ListBackupsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/backups", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBackups, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBackupsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listBackups implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listBackups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/backups") + if err != nil { + return nil, err + } + + var response ListBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDataGuardAssociations Lists all Data Guard associations for the specified database. func (client DatabaseClient) ListDataGuardAssociations(ctx context.Context, request ListDataGuardAssociationsRequest) (response ListDataGuardAssociationsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDataGuardAssociations, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDataGuardAssociationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDataGuardAssociationsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDataGuardAssociations implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDataGuardAssociations(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations") + if err != nil { + return nil, err + } + + var response ListDataGuardAssociationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDatabases Gets a list of the databases in the specified database home. func (client DatabaseClient) ListDatabases(ctx context.Context, request ListDatabasesRequest) (response ListDatabasesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDatabases, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDatabasesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDatabasesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDatabases implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDatabases(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases") + if err != nil { + return nil, err + } + + var response ListDatabasesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDbHomePatchHistoryEntries Gets history of the actions taken for patches for the specified database home. func (client DatabaseClient) ListDbHomePatchHistoryEntries(ctx context.Context, request ListDbHomePatchHistoryEntriesRequest) (response ListDbHomePatchHistoryEntriesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbHomePatchHistoryEntries, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDbHomePatchHistoryEntriesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbHomePatchHistoryEntriesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDbHomePatchHistoryEntries implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbHomePatchHistoryEntries(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries") + if err != nil { + return nil, err + } + + var response ListDbHomePatchHistoryEntriesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDbHomePatches Lists patches applicable to the requested database home. func (client DatabaseClient) ListDbHomePatches(ctx context.Context, request ListDbHomePatchesRequest) (response ListDbHomePatchesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patches", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbHomePatches, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDbHomePatchesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbHomePatchesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDbHomePatches implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbHomePatches(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patches") + if err != nil { + return nil, err + } + + var response ListDbHomePatchesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDbHomes Gets a list of database homes in the specified DB System and compartment. A database home is a directory where Oracle database software is installed. func (client DatabaseClient) ListDbHomes(ctx context.Context, request ListDbHomesRequest) (response ListDbHomesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbHomes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDbHomesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbHomesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDbHomes implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbHomes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes") + if err != nil { + return nil, err + } + + var response ListDbHomesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDbNodes Gets a list of database nodes in the specified DB System and compartment. A database node is a server running database software. func (client DatabaseClient) ListDbNodes(ctx context.Context, request ListDbNodesRequest) (response ListDbNodesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbNodes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbNodes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDbNodesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbNodesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDbNodes implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbNodes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbNodes") + if err != nil { + return nil, err + } + + var response ListDbNodesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDbSystemPatchHistoryEntries Gets the history of the patch actions performed on the specified DB System. func (client DatabaseClient) ListDbSystemPatchHistoryEntries(ctx context.Context, request ListDbSystemPatchHistoryEntriesRequest) (response ListDbSystemPatchHistoryEntriesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbSystemPatchHistoryEntries, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDbSystemPatchHistoryEntriesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemPatchHistoryEntriesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDbSystemPatchHistoryEntries implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbSystemPatchHistoryEntries(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries") + if err != nil { + return nil, err + } + + var response ListDbSystemPatchHistoryEntriesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDbSystemPatches Lists the patches applicable to the requested DB System. func (client DatabaseClient) ListDbSystemPatches(ctx context.Context, request ListDbSystemPatchesRequest) (response ListDbSystemPatchesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patches", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbSystemPatches, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDbSystemPatchesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemPatchesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDbSystemPatches implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbSystemPatches(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patches") + if err != nil { + return nil, err + } + + var response ListDbSystemPatchesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListDbSystemShapes Gets a list of the shapes that can be used to launch a new DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. func (client DatabaseClient) ListDbSystemShapes(ctx context.Context, request ListDbSystemShapesRequest) (response ListDbSystemShapesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystemShapes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbSystemShapes, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(ListDbSystemShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemShapesResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// ListDbSystems Gets a list of the DB Systems in the specified compartment. -// -func (client DatabaseClient) ListDbSystems(ctx context.Context, request ListDbSystemsRequest) (response ListDbSystemsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems", request) +// listDbSystemShapes implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbSystemShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystemShapes") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response ListDbSystemShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDbSystems Gets a list of the DB Systems in the specified compartment. You can specify a backupId to list only the DB Systems that support creating a database using this backup in this compartment. +// +func (client DatabaseClient) ListDbSystems(ctx context.Context, request ListDbSystemsRequest) (response ListDbSystemsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbSystems, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListDbSystemsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemsResponse") + } return } +// listDbSystems implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbSystems(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems") + if err != nil { + return nil, err + } + + var response ListDbSystemsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListDbVersions Gets a list of supported Oracle database versions. func (client DatabaseClient) ListDbVersions(ctx context.Context, request ListDbVersionsRequest) (response ListDbVersionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbVersions", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDbVersions, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListDbVersionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbVersionsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listDbVersions implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listDbVersions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbVersions") + if err != nil { + return nil, err + } + + var response ListDbVersionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ReinstateDataGuardAssociation Reinstates the database identified by the `databaseId` parameter into the standby role in a Data Guard association. func (client DatabaseClient) ReinstateDataGuardAssociation(ctx context.Context, request ReinstateDataGuardAssociationRequest) (response ReinstateDataGuardAssociationResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/reinstate", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.reinstateDataGuardAssociation, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ReinstateDataGuardAssociationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ReinstateDataGuardAssociationResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// reinstateDataGuardAssociation implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) reinstateDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/reinstate") + if err != nil { + return nil, err + } + + var response ReinstateDataGuardAssociationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // RestoreDatabase Restore a Database based on the request parameters you provide. func (client DatabaseClient) RestoreDatabase(ctx context.Context, request RestoreDatabaseRequest) (response RestoreDatabaseResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/actions/restore", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.restoreDatabase, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(RestoreDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RestoreDatabaseResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// restoreDatabase implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) restoreDatabase(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/actions/restore") + if err != nil { + return nil, err + } + + var response RestoreDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // SwitchoverDataGuardAssociation Performs a switchover to transition the primary database of a Data Guard association into a standby role. The // standby database associated with the `dataGuardAssociationId` assumes the primary database role. // A switchover guarantees no data loss. func (client DatabaseClient) SwitchoverDataGuardAssociation(ctx context.Context, request SwitchoverDataGuardAssociationRequest) (response SwitchoverDataGuardAssociationResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/switchover", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.switchoverDataGuardAssociation, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(SwitchoverDataGuardAssociationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SwitchoverDataGuardAssociationResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// switchoverDataGuardAssociation implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) switchoverDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/switchover") + if err != nil { + return nil, err + } + + var response SwitchoverDataGuardAssociationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // TerminateDbSystem Terminates a DB System and permanently deletes it and any databases running on it, and any storage volumes attached to it. The database data is local to the DB System and will be lost when the system is terminated. Oracle recommends that you back up any data in the DB System prior to terminating it. func (client DatabaseClient) TerminateDbSystem(ctx context.Context, request TerminateDbSystemRequest) (response TerminateDbSystemResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/dbSystems/{dbSystemId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.terminateDbSystem, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(TerminateDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TerminateDbSystemResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// terminateDbSystem implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) terminateDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dbSystems/{dbSystemId}") + if err != nil { + return nil, err + } + + var response TerminateDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateDatabase Update a Database based on the request parameters you provide. func (client DatabaseClient) UpdateDatabase(ctx context.Context, request UpdateDatabaseRequest) (response UpdateDatabaseResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/databases/{databaseId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDatabase, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDatabaseResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateDatabase implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) updateDatabase(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/databases/{databaseId}") + if err != nil { + return nil, err + } + + var response UpdateDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateDbHome Patches the specified dbHome. func (client DatabaseClient) UpdateDbHome(ctx context.Context, request UpdateDbHomeRequest) (response UpdateDbHomeResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/dbHomes/{dbHomeId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDbHome, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateDbHomeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDbHomeResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateDbHome implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) updateDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dbHomes/{dbHomeId}") + if err != nil { + return nil, err + } + + var response UpdateDbHomeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateDbSystem Updates the properties of a DB System, such as the CPU core count. func (client DatabaseClient) UpdateDbSystem(ctx context.Context, request UpdateDbSystemRequest) (response UpdateDbSystemResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/dbSystems/{dbSystemId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDbSystem, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDbSystemResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateDbSystem implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) updateDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dbSystems/{dbSystemId}") + if err != nil { + return nil, err + } + + var response UpdateDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go index 6191d850f..8028fb062 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go @@ -42,6 +42,16 @@ type DatabaseSummary struct { // Database workload type. DbWorkload *string `mandatory:"false" json:"dbWorkload"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Additional information about the current lifecycleState. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go index 208e50489..ae68f504f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go @@ -28,12 +28,30 @@ type DbNodeActionRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DbNodeActionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DbNodeActionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DbNodeActionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DbNodeActionResponse wrapper for the DbNodeAction operation type DbNodeActionResponse struct { @@ -55,6 +73,11 @@ func (response DbNodeActionResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response DbNodeActionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // DbNodeActionActionEnum Enum with underlying type: string type DbNodeActionActionEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system.go index 04085ad17..35b9f06af 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_system.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_system.go @@ -14,7 +14,7 @@ import ( // DbSystem The Database Service supports several types of DB Systems, ranging in size, price, and performance. For details about each type of system, see: // - Exadata DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/exaoverview.htm) -// - Bare Metal or VM DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm) +// - Bare Metal and Virtual Machine DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm) // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). // // For information about access control and compartments, see @@ -82,11 +82,21 @@ type DbSystem struct { // Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The type of redundancy configured for the DB System. // Normal is 2-way redundancy. // High is 3-way redundancy. DiskRedundancy DbSystemDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The OCID of the last patch history. This is updated as soon as a patch operation is started. LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go index 831411c16..6e8a2a200 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go @@ -19,12 +19,24 @@ import ( // see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). type DbSystemShapeSummary struct { - // The maximum number of CPU cores that can be enabled on the DB System. + // The maximum number of CPU cores that can be enabled on the DB System for this shape. AvailableCoreCount *int `mandatory:"true" json:"availableCoreCount"` // The name of the shape used for the DB System. Name *string `mandatory:"true" json:"name"` + // The discrete number by which the CPU core count for this shape can be increased or decreased. + CoreCountIncrement *int `mandatory:"false" json:"coreCountIncrement"` + + // The maximum number of database nodes available for this shape. + MaximumNodeCount *int `mandatory:"false" json:"maximumNodeCount"` + + // The minimum number of CPU cores that can be enabled on the DB System for this shape. + MinimumCoreCount *int `mandatory:"false" json:"minimumCoreCount"` + + // The minimum number of database nodes available for this shape. + MinimumNodeCount *int `mandatory:"false" json:"minimumNodeCount"` + // Deprecated. Use `name` instead of `shape`. Shape *string `mandatory:"false" json:"shape"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go index 7f8ba31a3..40cbce8e4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go @@ -14,7 +14,7 @@ import ( // DbSystemSummary The Database Service supports several types of DB Systems, ranging in size, price, and performance. For details about each type of system, see: // - Exadata DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/exaoverview.htm) -// - Bare Metal or VM DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm) +// - Bare Metal and Virtual Machine DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm) // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). // // For information about access control and compartments, see @@ -82,11 +82,21 @@ type DbSystemSummary struct { // Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The type of redundancy configured for the DB System. // Normal is 2-way redundancy. // High is 3-way redundancy. DiskRedundancy DbSystemSummaryDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The OCID of the last patch history. This is updated as soon as a patch operation is started. LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go index ff0446bbb..cb4728d60 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go @@ -18,12 +18,30 @@ type DeleteBackupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteBackupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteBackupResponse wrapper for the DeleteBackup operation type DeleteBackupResponse struct { @@ -38,3 +56,8 @@ type DeleteBackupResponse struct { func (response DeleteBackupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go index d50d313f0..eca56c68b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go @@ -21,12 +21,30 @@ type DeleteDbHomeRequest struct { // Whether to perform a final backup of the database or not. Default is false. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. PerformFinalBackup *bool `mandatory:"false" contributesTo:"query" name:"performFinalBackup"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteDbHomeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDbHomeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteDbHomeResponse wrapper for the DeleteDbHome operation type DeleteDbHomeResponse struct { @@ -41,3 +59,8 @@ type DeleteDbHomeResponse struct { func (response DeleteDbHomeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDbHomeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go index 265c73f00..56fd8a713 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go @@ -24,12 +24,30 @@ type FailoverDataGuardAssociationRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request FailoverDataGuardAssociationRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request FailoverDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request FailoverDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // FailoverDataGuardAssociationResponse wrapper for the FailoverDataGuardAssociation operation type FailoverDataGuardAssociationResponse struct { @@ -50,3 +68,8 @@ type FailoverDataGuardAssociationResponse struct { func (response FailoverDataGuardAssociationResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response FailoverDataGuardAssociationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go index 8a7ce1835..0eb197c54 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go @@ -13,12 +13,30 @@ type GetBackupRequest struct { // The backup OCID. BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBackupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBackupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBackupResponse wrapper for the GetBackup operation type GetBackupResponse struct { @@ -39,3 +57,8 @@ type GetBackupResponse struct { func (response GetBackupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go index 2b2f55456..81cbde2cb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go @@ -16,12 +16,30 @@ type GetDataGuardAssociationRequest struct { // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDataGuardAssociationRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDataGuardAssociationResponse wrapper for the GetDataGuardAssociation operation type GetDataGuardAssociationResponse struct { @@ -42,3 +60,8 @@ type GetDataGuardAssociationResponse struct { func (response GetDataGuardAssociationResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDataGuardAssociationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go index 8b3a5701b..709de26b3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go @@ -13,12 +13,30 @@ type GetDatabaseRequest struct { // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDatabaseRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDatabaseRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDatabaseResponse wrapper for the GetDatabase operation type GetDatabaseResponse struct { @@ -39,3 +57,8 @@ type GetDatabaseResponse struct { func (response GetDatabaseResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go index c129a3119..45afc6c5a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go @@ -16,12 +16,30 @@ type GetDbHomePatchHistoryEntryRequest struct { // The OCID of the patch history entry. PatchHistoryEntryId *string `mandatory:"true" contributesTo:"path" name:"patchHistoryEntryId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDbHomePatchHistoryEntryRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDbHomePatchHistoryEntryRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbHomePatchHistoryEntryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDbHomePatchHistoryEntryResponse wrapper for the GetDbHomePatchHistoryEntry operation type GetDbHomePatchHistoryEntryResponse struct { @@ -42,3 +60,8 @@ type GetDbHomePatchHistoryEntryResponse struct { func (response GetDbHomePatchHistoryEntryResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDbHomePatchHistoryEntryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go index 74b389688..3994d45f8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go @@ -16,12 +16,30 @@ type GetDbHomePatchRequest struct { // The OCID of the patch. PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDbHomePatchRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDbHomePatchRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbHomePatchRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDbHomePatchResponse wrapper for the GetDbHomePatch operation type GetDbHomePatchResponse struct { @@ -39,3 +57,8 @@ type GetDbHomePatchResponse struct { func (response GetDbHomePatchResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDbHomePatchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go index 795c4f4bc..6a11d10f4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go @@ -13,12 +13,30 @@ type GetDbHomeRequest struct { // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDbHomeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbHomeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDbHomeResponse wrapper for the GetDbHome operation type GetDbHomeResponse struct { @@ -39,3 +57,8 @@ type GetDbHomeResponse struct { func (response GetDbHomeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDbHomeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go index 3f5e1fc2a..bc925ccc0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go @@ -13,12 +13,30 @@ type GetDbNodeRequest struct { // The database node OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). DbNodeId *string `mandatory:"true" contributesTo:"path" name:"dbNodeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDbNodeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDbNodeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbNodeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDbNodeResponse wrapper for the GetDbNode operation type GetDbNodeResponse struct { @@ -39,3 +57,8 @@ type GetDbNodeResponse struct { func (response GetDbNodeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDbNodeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go index 4891a2df8..b158b3cda 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go @@ -16,12 +16,30 @@ type GetDbSystemPatchHistoryEntryRequest struct { // The OCID of the patch history entry. PatchHistoryEntryId *string `mandatory:"true" contributesTo:"path" name:"patchHistoryEntryId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDbSystemPatchHistoryEntryRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDbSystemPatchHistoryEntryRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbSystemPatchHistoryEntryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDbSystemPatchHistoryEntryResponse wrapper for the GetDbSystemPatchHistoryEntry operation type GetDbSystemPatchHistoryEntryResponse struct { @@ -42,3 +60,8 @@ type GetDbSystemPatchHistoryEntryResponse struct { func (response GetDbSystemPatchHistoryEntryResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDbSystemPatchHistoryEntryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go index 916b6aafc..fec5ae6d4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go @@ -16,12 +16,30 @@ type GetDbSystemPatchRequest struct { // The OCID of the patch. PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDbSystemPatchRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDbSystemPatchRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbSystemPatchRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDbSystemPatchResponse wrapper for the GetDbSystemPatch operation type GetDbSystemPatchResponse struct { @@ -39,3 +57,8 @@ type GetDbSystemPatchResponse struct { func (response GetDbSystemPatchResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDbSystemPatchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go index 9a1dc670f..75cfeb978 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go @@ -13,12 +13,30 @@ type GetDbSystemRequest struct { // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetDbSystemRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetDbSystemResponse wrapper for the GetDbSystem operation type GetDbSystemResponse struct { @@ -39,3 +57,8 @@ type GetDbSystemResponse struct { func (response GetDbSystemResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go new file mode 100644 index 000000000..90feddd34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go @@ -0,0 +1,245 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// LaunchDbSystemBase The representation of LaunchDbSystemBase +type LaunchDbSystemBase interface { + + // The Availability Domain where the DB System is located. + GetAvailabilityDomain() *string + + // The Oracle Cloud ID (OCID) of the compartment the DB System belongs in. + GetCompartmentId() *string + + // The number of CPU cores to enable. The valid values depend on the specified shape: + // - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36. + // - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72. + // - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84. + // - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168. + // - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336. + // For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used. + GetCpuCoreCount() *int + + // The host name for the DB System. The host name must begin with an alphabetic character and + // can contain a maximum of 30 alphanumeric characters, including hyphens (-). + // The maximum length of the combined hostname and domain is 63 characters. + // **Note:** The hostname must be unique within the subnet. If it is not unique, + // the DB System will fail to provision. + GetHostname() *string + + // The shape of the DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListDbSystemShapes operation. + GetShape() *string + + // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. + GetSshPublicKeys() []string + + // The OCID of the subnet the DB System is associated with. + // **Subnet Restrictions:** + // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 + // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 + // These subnets are used by the Oracle Clusterware private interconnect on the database instance. + // Specifying an overlapping subnet will cause the private interconnect to malfunction. + // This restriction applies to both the client subnet and backup subnet. + GetSubnetId() *string + + // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. + // **Subnet Restrictions:** See above subnetId's **Subnet Restriction**. + GetBackupSubnetId() *string + + // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + GetClusterName() *string + + // The percentage assigned to DATA storage (user data and database files). + // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). + // Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems. + GetDataStoragePercentage() *int + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} + + // The user-friendly name for the DB System. It does not have to be unique. + GetDisplayName() *string + + // A domain name used for the DB System. If the Oracle-provided Internet and VCN + // Resolver is enabled for the specified subnet, the domain name for the subnet is used + // (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + GetDomain() *string + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string + + // Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. + GetInitialDataStorageSizeInGB() *int + + // Number of nodes to launch for a VM-shape based RAC DB system. + GetNodeCount() *int +} + +type launchdbsystembase struct { + JsonData []byte + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + Hostname *string `mandatory:"true" json:"hostname"` + Shape *string `mandatory:"true" json:"shape"` + SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + SubnetId *string `mandatory:"true" json:"subnetId"` + BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` + ClusterName *string `mandatory:"false" json:"clusterName"` + DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DisplayName *string `mandatory:"false" json:"displayName"` + Domain *string `mandatory:"false" json:"domain"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + InitialDataStorageSizeInGB *int `mandatory:"false" json:"initialDataStorageSizeInGB"` + NodeCount *int `mandatory:"false" json:"nodeCount"` + Source string `json:"source"` +} + +// UnmarshalJSON unmarshals json +func (m *launchdbsystembase) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerlaunchdbsystembase launchdbsystembase + s := struct { + Model Unmarshalerlaunchdbsystembase + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.AvailabilityDomain = s.Model.AvailabilityDomain + m.CompartmentId = s.Model.CompartmentId + m.CpuCoreCount = s.Model.CpuCoreCount + m.Hostname = s.Model.Hostname + m.Shape = s.Model.Shape + m.SshPublicKeys = s.Model.SshPublicKeys + m.SubnetId = s.Model.SubnetId + m.BackupSubnetId = s.Model.BackupSubnetId + m.ClusterName = s.Model.ClusterName + m.DataStoragePercentage = s.Model.DataStoragePercentage + m.DefinedTags = s.Model.DefinedTags + m.DisplayName = s.Model.DisplayName + m.Domain = s.Model.Domain + m.FreeformTags = s.Model.FreeformTags + m.InitialDataStorageSizeInGB = s.Model.InitialDataStorageSizeInGB + m.NodeCount = s.Model.NodeCount + m.Source = s.Model.Source + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *launchdbsystembase) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Source { + case "NONE": + mm := LaunchDbSystemDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "DB_BACKUP": + mm := LaunchDbSystemFromBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//GetAvailabilityDomain returns AvailabilityDomain +func (m launchdbsystembase) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +//GetCompartmentId returns CompartmentId +func (m launchdbsystembase) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetCpuCoreCount returns CpuCoreCount +func (m launchdbsystembase) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +//GetHostname returns Hostname +func (m launchdbsystembase) GetHostname() *string { + return m.Hostname +} + +//GetShape returns Shape +func (m launchdbsystembase) GetShape() *string { + return m.Shape +} + +//GetSshPublicKeys returns SshPublicKeys +func (m launchdbsystembase) GetSshPublicKeys() []string { + return m.SshPublicKeys +} + +//GetSubnetId returns SubnetId +func (m launchdbsystembase) GetSubnetId() *string { + return m.SubnetId +} + +//GetBackupSubnetId returns BackupSubnetId +func (m launchdbsystembase) GetBackupSubnetId() *string { + return m.BackupSubnetId +} + +//GetClusterName returns ClusterName +func (m launchdbsystembase) GetClusterName() *string { + return m.ClusterName +} + +//GetDataStoragePercentage returns DataStoragePercentage +func (m launchdbsystembase) GetDataStoragePercentage() *int { + return m.DataStoragePercentage +} + +//GetDefinedTags returns DefinedTags +func (m launchdbsystembase) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetDisplayName returns DisplayName +func (m launchdbsystembase) GetDisplayName() *string { + return m.DisplayName +} + +//GetDomain returns Domain +func (m launchdbsystembase) GetDomain() *string { + return m.Domain +} + +//GetFreeformTags returns FreeformTags +func (m launchdbsystembase) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB +func (m launchdbsystembase) GetInitialDataStorageSizeInGB() *int { + return m.InitialDataStorageSizeInGB +} + +//GetNodeCount returns NodeCount +func (m launchdbsystembase) GetNodeCount() *int { + return m.NodeCount +} + +func (m launchdbsystembase) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go index 2ba66b6f7..bd27422ef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go @@ -9,6 +9,7 @@ package database import ( + "encoding/json" "github.com/oracle/oci-go-sdk/common" ) @@ -30,12 +31,6 @@ type LaunchDbSystemDetails struct { // For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used. CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` - // The Oracle Database Edition that applies to all the databases on the DB System. - // Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE. - DatabaseEdition LaunchDbSystemDetailsDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` - - DbHome *CreateDbHomeDetails `mandatory:"true" json:"dbHome"` - // The host name for the DB System. The host name must begin with an alphabetic character and // can contain a maximum of 30 alphanumeric characters, including hyphens (-). // The maximum length of the combined hostname and domain is 63 characters. @@ -58,6 +53,8 @@ type LaunchDbSystemDetails struct { // This restriction applies to both the client subnet and backup subnet. SubnetId *string `mandatory:"true" json:"subnetId"` + DbHome *CreateDbHomeDetails `mandatory:"true" json:"dbHome"` + // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. // **Subnet Restrictions:** See above subnetId's **Subnet Restriction**. BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` @@ -70,10 +67,10 @@ type LaunchDbSystemDetails struct { // Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems. DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` - // The type of redundancy configured for the DB System. - // Normal is 2-way redundancy, recommended for test and development systems. - // High is 3-way redundancy, recommended for production systems. - DiskRedundancy LaunchDbSystemDetailsDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` // The user-friendly name for the DB System. It does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` @@ -83,20 +80,128 @@ type LaunchDbSystemDetails struct { // (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. Domain *string `mandatory:"false" json:"domain"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. InitialDataStorageSizeInGB *int `mandatory:"false" json:"initialDataStorageSizeInGB"` - // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. - LicenseModel LaunchDbSystemDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` - // Number of nodes to launch for a VM-shape based RAC DB system. NodeCount *int `mandatory:"false" json:"nodeCount"` + + // The Oracle Database Edition that applies to all the databases on the DB System. + // Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE. + DatabaseEdition LaunchDbSystemDetailsDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` + + // The type of redundancy configured for the DB System. + // Normal is 2-way redundancy, recommended for test and development systems. + // High is 3-way redundancy, recommended for production systems. + DiskRedundancy LaunchDbSystemDetailsDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + + // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + LicenseModel LaunchDbSystemDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` +} + +//GetAvailabilityDomain returns AvailabilityDomain +func (m LaunchDbSystemDetails) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +//GetBackupSubnetId returns BackupSubnetId +func (m LaunchDbSystemDetails) GetBackupSubnetId() *string { + return m.BackupSubnetId +} + +//GetClusterName returns ClusterName +func (m LaunchDbSystemDetails) GetClusterName() *string { + return m.ClusterName +} + +//GetCompartmentId returns CompartmentId +func (m LaunchDbSystemDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetCpuCoreCount returns CpuCoreCount +func (m LaunchDbSystemDetails) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +//GetDataStoragePercentage returns DataStoragePercentage +func (m LaunchDbSystemDetails) GetDataStoragePercentage() *int { + return m.DataStoragePercentage +} + +//GetDefinedTags returns DefinedTags +func (m LaunchDbSystemDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetDisplayName returns DisplayName +func (m LaunchDbSystemDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDomain returns Domain +func (m LaunchDbSystemDetails) GetDomain() *string { + return m.Domain +} + +//GetFreeformTags returns FreeformTags +func (m LaunchDbSystemDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetHostname returns Hostname +func (m LaunchDbSystemDetails) GetHostname() *string { + return m.Hostname +} + +//GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB +func (m LaunchDbSystemDetails) GetInitialDataStorageSizeInGB() *int { + return m.InitialDataStorageSizeInGB +} + +//GetNodeCount returns NodeCount +func (m LaunchDbSystemDetails) GetNodeCount() *int { + return m.NodeCount +} + +//GetShape returns Shape +func (m LaunchDbSystemDetails) GetShape() *string { + return m.Shape +} + +//GetSshPublicKeys returns SshPublicKeys +func (m LaunchDbSystemDetails) GetSshPublicKeys() []string { + return m.SshPublicKeys +} + +//GetSubnetId returns SubnetId +func (m LaunchDbSystemDetails) GetSubnetId() *string { + return m.SubnetId } func (m LaunchDbSystemDetails) String() string { return common.PointerString(m) } +// MarshalJSON marshals to json representation +func (m LaunchDbSystemDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchDbSystemDetails LaunchDbSystemDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeLaunchDbSystemDetails + }{ + "NONE", + (MarshalTypeLaunchDbSystemDetails)(m), + } + + return json.Marshal(&s) +} + // LaunchDbSystemDetailsDatabaseEditionEnum Enum with underlying type: string type LaunchDbSystemDetailsDatabaseEditionEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go new file mode 100644 index 000000000..309a54dc0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go @@ -0,0 +1,276 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// LaunchDbSystemFromBackupDetails The representation of LaunchDbSystemFromBackupDetails +type LaunchDbSystemFromBackupDetails struct { + + // The Availability Domain where the DB System is located. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The Oracle Cloud ID (OCID) of the compartment the DB System belongs in. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The number of CPU cores to enable. The valid values depend on the specified shape: + // - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36. + // - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72. + // - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84. + // - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168. + // - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336. + // For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // The host name for the DB System. The host name must begin with an alphabetic character and + // can contain a maximum of 30 alphanumeric characters, including hyphens (-). + // The maximum length of the combined hostname and domain is 63 characters. + // **Note:** The hostname must be unique within the subnet. If it is not unique, + // the DB System will fail to provision. + Hostname *string `mandatory:"true" json:"hostname"` + + // The shape of the DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListDbSystemShapes operation. + Shape *string `mandatory:"true" json:"shape"` + + // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. + SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + + // The OCID of the subnet the DB System is associated with. + // **Subnet Restrictions:** + // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 + // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 + // These subnets are used by the Oracle Clusterware private interconnect on the database instance. + // Specifying an overlapping subnet will cause the private interconnect to malfunction. + // This restriction applies to both the client subnet and backup subnet. + SubnetId *string `mandatory:"true" json:"subnetId"` + + DbHome *CreateDbHomeFromBackupDetails `mandatory:"true" json:"dbHome"` + + // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. + // **Subnet Restrictions:** See above subnetId's **Subnet Restriction**. + BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` + + // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + ClusterName *string `mandatory:"false" json:"clusterName"` + + // The percentage assigned to DATA storage (user data and database files). + // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). + // Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems. + DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The user-friendly name for the DB System. It does not have to be unique. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A domain name used for the DB System. If the Oracle-provided Internet and VCN + // Resolver is enabled for the specified subnet, the domain name for the subnet is used + // (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + Domain *string `mandatory:"false" json:"domain"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. + InitialDataStorageSizeInGB *int `mandatory:"false" json:"initialDataStorageSizeInGB"` + + // Number of nodes to launch for a VM-shape based RAC DB system. + NodeCount *int `mandatory:"false" json:"nodeCount"` + + // The Oracle Database Edition that applies to all the databases on the DB System. + // Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE. + DatabaseEdition LaunchDbSystemFromBackupDetailsDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` + + // The type of redundancy configured for the DB System. + // Normal is 2-way redundancy, recommended for test and development systems. + // High is 3-way redundancy, recommended for production systems. + DiskRedundancy LaunchDbSystemFromBackupDetailsDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + + // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + LicenseModel LaunchDbSystemFromBackupDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` +} + +//GetAvailabilityDomain returns AvailabilityDomain +func (m LaunchDbSystemFromBackupDetails) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +//GetBackupSubnetId returns BackupSubnetId +func (m LaunchDbSystemFromBackupDetails) GetBackupSubnetId() *string { + return m.BackupSubnetId +} + +//GetClusterName returns ClusterName +func (m LaunchDbSystemFromBackupDetails) GetClusterName() *string { + return m.ClusterName +} + +//GetCompartmentId returns CompartmentId +func (m LaunchDbSystemFromBackupDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetCpuCoreCount returns CpuCoreCount +func (m LaunchDbSystemFromBackupDetails) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +//GetDataStoragePercentage returns DataStoragePercentage +func (m LaunchDbSystemFromBackupDetails) GetDataStoragePercentage() *int { + return m.DataStoragePercentage +} + +//GetDefinedTags returns DefinedTags +func (m LaunchDbSystemFromBackupDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetDisplayName returns DisplayName +func (m LaunchDbSystemFromBackupDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDomain returns Domain +func (m LaunchDbSystemFromBackupDetails) GetDomain() *string { + return m.Domain +} + +//GetFreeformTags returns FreeformTags +func (m LaunchDbSystemFromBackupDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetHostname returns Hostname +func (m LaunchDbSystemFromBackupDetails) GetHostname() *string { + return m.Hostname +} + +//GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB +func (m LaunchDbSystemFromBackupDetails) GetInitialDataStorageSizeInGB() *int { + return m.InitialDataStorageSizeInGB +} + +//GetNodeCount returns NodeCount +func (m LaunchDbSystemFromBackupDetails) GetNodeCount() *int { + return m.NodeCount +} + +//GetShape returns Shape +func (m LaunchDbSystemFromBackupDetails) GetShape() *string { + return m.Shape +} + +//GetSshPublicKeys returns SshPublicKeys +func (m LaunchDbSystemFromBackupDetails) GetSshPublicKeys() []string { + return m.SshPublicKeys +} + +//GetSubnetId returns SubnetId +func (m LaunchDbSystemFromBackupDetails) GetSubnetId() *string { + return m.SubnetId +} + +func (m LaunchDbSystemFromBackupDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m LaunchDbSystemFromBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchDbSystemFromBackupDetails LaunchDbSystemFromBackupDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeLaunchDbSystemFromBackupDetails + }{ + "DB_BACKUP", + (MarshalTypeLaunchDbSystemFromBackupDetails)(m), + } + + return json.Marshal(&s) +} + +// LaunchDbSystemFromBackupDetailsDatabaseEditionEnum Enum with underlying type: string +type LaunchDbSystemFromBackupDetailsDatabaseEditionEnum string + +// Set of constants representing the allowable values for LaunchDbSystemFromBackupDetailsDatabaseEdition +const ( + LaunchDbSystemFromBackupDetailsDatabaseEditionStandardEdition LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "STANDARD_EDITION" + LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEdition LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION" + LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionExtremePerformance LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionHighPerformance LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" +) + +var mappingLaunchDbSystemFromBackupDetailsDatabaseEdition = map[string]LaunchDbSystemFromBackupDetailsDatabaseEditionEnum{ + "STANDARD_EDITION": LaunchDbSystemFromBackupDetailsDatabaseEditionStandardEdition, + "ENTERPRISE_EDITION": LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEdition, + "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionExtremePerformance, + "ENTERPRISE_EDITION_HIGH_PERFORMANCE": LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionHighPerformance, +} + +// GetLaunchDbSystemFromBackupDetailsDatabaseEditionEnumValues Enumerates the set of values for LaunchDbSystemFromBackupDetailsDatabaseEdition +func GetLaunchDbSystemFromBackupDetailsDatabaseEditionEnumValues() []LaunchDbSystemFromBackupDetailsDatabaseEditionEnum { + values := make([]LaunchDbSystemFromBackupDetailsDatabaseEditionEnum, 0) + for _, v := range mappingLaunchDbSystemFromBackupDetailsDatabaseEdition { + values = append(values, v) + } + return values +} + +// LaunchDbSystemFromBackupDetailsDiskRedundancyEnum Enum with underlying type: string +type LaunchDbSystemFromBackupDetailsDiskRedundancyEnum string + +// Set of constants representing the allowable values for LaunchDbSystemFromBackupDetailsDiskRedundancy +const ( + LaunchDbSystemFromBackupDetailsDiskRedundancyHigh LaunchDbSystemFromBackupDetailsDiskRedundancyEnum = "HIGH" + LaunchDbSystemFromBackupDetailsDiskRedundancyNormal LaunchDbSystemFromBackupDetailsDiskRedundancyEnum = "NORMAL" +) + +var mappingLaunchDbSystemFromBackupDetailsDiskRedundancy = map[string]LaunchDbSystemFromBackupDetailsDiskRedundancyEnum{ + "HIGH": LaunchDbSystemFromBackupDetailsDiskRedundancyHigh, + "NORMAL": LaunchDbSystemFromBackupDetailsDiskRedundancyNormal, +} + +// GetLaunchDbSystemFromBackupDetailsDiskRedundancyEnumValues Enumerates the set of values for LaunchDbSystemFromBackupDetailsDiskRedundancy +func GetLaunchDbSystemFromBackupDetailsDiskRedundancyEnumValues() []LaunchDbSystemFromBackupDetailsDiskRedundancyEnum { + values := make([]LaunchDbSystemFromBackupDetailsDiskRedundancyEnum, 0) + for _, v := range mappingLaunchDbSystemFromBackupDetailsDiskRedundancy { + values = append(values, v) + } + return values +} + +// LaunchDbSystemFromBackupDetailsLicenseModelEnum Enum with underlying type: string +type LaunchDbSystemFromBackupDetailsLicenseModelEnum string + +// Set of constants representing the allowable values for LaunchDbSystemFromBackupDetailsLicenseModel +const ( + LaunchDbSystemFromBackupDetailsLicenseModelLicenseIncluded LaunchDbSystemFromBackupDetailsLicenseModelEnum = "LICENSE_INCLUDED" + LaunchDbSystemFromBackupDetailsLicenseModelBringYourOwnLicense LaunchDbSystemFromBackupDetailsLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" +) + +var mappingLaunchDbSystemFromBackupDetailsLicenseModel = map[string]LaunchDbSystemFromBackupDetailsLicenseModelEnum{ + "LICENSE_INCLUDED": LaunchDbSystemFromBackupDetailsLicenseModelLicenseIncluded, + "BRING_YOUR_OWN_LICENSE": LaunchDbSystemFromBackupDetailsLicenseModelBringYourOwnLicense, +} + +// GetLaunchDbSystemFromBackupDetailsLicenseModelEnumValues Enumerates the set of values for LaunchDbSystemFromBackupDetailsLicenseModel +func GetLaunchDbSystemFromBackupDetailsLicenseModelEnumValues() []LaunchDbSystemFromBackupDetailsLicenseModelEnum { + values := make([]LaunchDbSystemFromBackupDetailsLicenseModelEnum, 0) + for _, v := range mappingLaunchDbSystemFromBackupDetailsLicenseModel { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go index d1d6b45e6..2f09bfec7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go @@ -12,7 +12,7 @@ import ( type LaunchDbSystemRequest struct { // Request to launch a DB System. - LaunchDbSystemDetails `contributesTo:"body"` + LaunchDbSystemDetails LaunchDbSystemBase `contributesTo:"body"` // A token that uniquely identifies a request so it can be retried in case of a timeout or // server error without risk of executing that same action again. Retry tokens expire after 24 @@ -20,12 +20,30 @@ type LaunchDbSystemRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request LaunchDbSystemRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request LaunchDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request LaunchDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // LaunchDbSystemResponse wrapper for the LaunchDbSystem operation type LaunchDbSystemResponse struct { @@ -46,3 +64,8 @@ type LaunchDbSystemResponse struct { func (response LaunchDbSystemResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response LaunchDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go index 6bb089016..c323f1b34 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go @@ -22,19 +22,37 @@ type ListBackupsRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListBackupsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListBackupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListBackupsResponse wrapper for the ListBackups operation type ListBackupsResponse struct { // The underlying http response RawResponse *http.Response - // The []BackupSummary instance + // A list of []BackupSummary instances Items []BackupSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +69,8 @@ type ListBackupsResponse struct { func (response ListBackupsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go index 7f2f123d7..368f73320 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go @@ -19,19 +19,37 @@ type ListDataGuardAssociationsRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDataGuardAssociationsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDataGuardAssociationsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDataGuardAssociationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDataGuardAssociationsResponse wrapper for the ListDataGuardAssociations operation type ListDataGuardAssociationsResponse struct { // The underlying http response RawResponse *http.Response - // The []DataGuardAssociationSummary instance + // A list of []DataGuardAssociationSummary instances Items []DataGuardAssociationSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListDataGuardAssociationsResponse struct { func (response ListDataGuardAssociationsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDataGuardAssociationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go index 73e357018..2c8380774 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go @@ -22,19 +22,37 @@ type ListDatabasesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDatabasesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDatabasesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDatabasesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDatabasesResponse wrapper for the ListDatabases operation type ListDatabasesResponse struct { // The underlying http response RawResponse *http.Response - // The []DatabaseSummary instance + // A list of []DatabaseSummary instances Items []DatabaseSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +69,8 @@ type ListDatabasesResponse struct { func (response ListDatabasesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDatabasesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go index 841a4a809..c421ec669 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go @@ -19,19 +19,37 @@ type ListDbHomePatchHistoryEntriesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbHomePatchHistoryEntriesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbHomePatchHistoryEntriesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbHomePatchHistoryEntriesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbHomePatchHistoryEntriesResponse wrapper for the ListDbHomePatchHistoryEntries operation type ListDbHomePatchHistoryEntriesResponse struct { // The underlying http response RawResponse *http.Response - // The []PatchHistoryEntrySummary instance + // A list of []PatchHistoryEntrySummary instances Items []PatchHistoryEntrySummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListDbHomePatchHistoryEntriesResponse struct { func (response ListDbHomePatchHistoryEntriesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbHomePatchHistoryEntriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go index 5dd89d1a6..07e495530 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go @@ -19,19 +19,37 @@ type ListDbHomePatchesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbHomePatchesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbHomePatchesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbHomePatchesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbHomePatchesResponse wrapper for the ListDbHomePatches operation type ListDbHomePatchesResponse struct { // The underlying http response RawResponse *http.Response - // The []PatchSummary instance + // A list of []PatchSummary instances Items []PatchSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListDbHomePatchesResponse struct { func (response ListDbHomePatchesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbHomePatchesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go index 363b60972..be6132b91 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go @@ -22,19 +22,37 @@ type ListDbHomesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbHomesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbHomesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbHomesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbHomesResponse wrapper for the ListDbHomes operation type ListDbHomesResponse struct { // The underlying http response RawResponse *http.Response - // The []DbHomeSummary instance + // A list of []DbHomeSummary instances Items []DbHomeSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +69,8 @@ type ListDbHomesResponse struct { func (response ListDbHomesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbHomesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go index ae02ae583..845ebad3a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go @@ -22,19 +22,37 @@ type ListDbNodesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbNodesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbNodesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbNodesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbNodesResponse wrapper for the ListDbNodes operation type ListDbNodesResponse struct { // The underlying http response RawResponse *http.Response - // The []DbNodeSummary instance + // A list of []DbNodeSummary instances Items []DbNodeSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +69,8 @@ type ListDbNodesResponse struct { func (response ListDbNodesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbNodesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go index 2a4c1aba1..8717d5a67 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go @@ -19,19 +19,37 @@ type ListDbSystemPatchHistoryEntriesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbSystemPatchHistoryEntriesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbSystemPatchHistoryEntriesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbSystemPatchHistoryEntriesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbSystemPatchHistoryEntriesResponse wrapper for the ListDbSystemPatchHistoryEntries operation type ListDbSystemPatchHistoryEntriesResponse struct { // The underlying http response RawResponse *http.Response - // The []PatchHistoryEntrySummary instance + // A list of []PatchHistoryEntrySummary instances Items []PatchHistoryEntrySummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListDbSystemPatchHistoryEntriesResponse struct { func (response ListDbSystemPatchHistoryEntriesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbSystemPatchHistoryEntriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go index 46ae8fc10..82feefa79 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go @@ -19,19 +19,37 @@ type ListDbSystemPatchesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbSystemPatchesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbSystemPatchesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbSystemPatchesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbSystemPatchesResponse wrapper for the ListDbSystemPatches operation type ListDbSystemPatchesResponse struct { // The underlying http response RawResponse *http.Response - // The []PatchSummary instance + // A list of []PatchSummary instances Items []PatchSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +66,8 @@ type ListDbSystemPatchesResponse struct { func (response ListDbSystemPatchesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbSystemPatchesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go index 8f3d8b470..8cb139fec 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go @@ -22,19 +22,37 @@ type ListDbSystemShapesRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbSystemShapesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbSystemShapesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbSystemShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbSystemShapesResponse wrapper for the ListDbSystemShapes operation type ListDbSystemShapesResponse struct { // The underlying http response RawResponse *http.Response - // The []DbSystemShapeSummary instance + // A list of []DbSystemShapeSummary instances Items []DbSystemShapeSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +69,8 @@ type ListDbSystemShapesResponse struct { func (response ListDbSystemShapesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbSystemShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go index 96a4693e5..707094a96 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go @@ -19,19 +19,40 @@ type ListDbSystemsRequest struct { // The pagination token to continue listing from. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the backup. Specify a backupId to list only the DB Systems that support creating a database using this backup in this compartment. + BackupId *string `mandatory:"false" contributesTo:"query" name:"backupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbSystemsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbSystemsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbSystemsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbSystemsResponse wrapper for the ListDbSystems operation type ListDbSystemsResponse struct { // The underlying http response RawResponse *http.Response - // The []DbSystemSummary instance + // A list of []DbSystemSummary instances Items []DbSystemSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -48,3 +69,8 @@ type ListDbSystemsResponse struct { func (response ListDbSystemsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbSystemsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go index e6a77b7bb..256a04642 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go @@ -22,19 +22,40 @@ type ListDbVersionsRequest struct { // If provided, filters the results to the set of database versions which are supported for the given shape. DbSystemShape *string `mandatory:"false" contributesTo:"query" name:"dbSystemShape"` + + // The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system. + DbSystemId *string `mandatory:"false" contributesTo:"query" name:"dbSystemId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListDbVersionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListDbVersionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbVersionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListDbVersionsResponse wrapper for the ListDbVersions operation type ListDbVersionsResponse struct { // The underlying http response RawResponse *http.Response - // The []DbVersionSummary instance + // A list of []DbVersionSummary instances Items []DbVersionSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -51,3 +72,8 @@ type ListDbVersionsResponse struct { func (response ListDbVersionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListDbVersionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go index 994fdb3c2..95f6d1a11 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go @@ -24,12 +24,30 @@ type ReinstateDataGuardAssociationRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ReinstateDataGuardAssociationRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ReinstateDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ReinstateDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ReinstateDataGuardAssociationResponse wrapper for the ReinstateDataGuardAssociation operation type ReinstateDataGuardAssociationResponse struct { @@ -50,3 +68,8 @@ type ReinstateDataGuardAssociationResponse struct { func (response ReinstateDataGuardAssociationResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ReinstateDataGuardAssociationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go index 19873c923..b4c69a81c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go @@ -21,12 +21,30 @@ type RestoreDatabaseRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request RestoreDatabaseRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request RestoreDatabaseRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RestoreDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // RestoreDatabaseResponse wrapper for the RestoreDatabase operation type RestoreDatabaseResponse struct { @@ -47,3 +65,8 @@ type RestoreDatabaseResponse struct { func (response RestoreDatabaseResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response RestoreDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go index 0e3024715..95e8f7f7b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go @@ -24,12 +24,30 @@ type SwitchoverDataGuardAssociationRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request SwitchoverDataGuardAssociationRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request SwitchoverDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SwitchoverDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // SwitchoverDataGuardAssociationResponse wrapper for the SwitchoverDataGuardAssociation operation type SwitchoverDataGuardAssociationResponse struct { @@ -50,3 +68,8 @@ type SwitchoverDataGuardAssociationResponse struct { func (response SwitchoverDataGuardAssociationResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response SwitchoverDataGuardAssociationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go index 991b68b0f..a3c274ad5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go @@ -18,12 +18,30 @@ type TerminateDbSystemRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request TerminateDbSystemRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request TerminateDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TerminateDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // TerminateDbSystemResponse wrapper for the TerminateDbSystem operation type TerminateDbSystemResponse struct { @@ -38,3 +56,8 @@ type TerminateDbSystemResponse struct { func (response TerminateDbSystemResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response TerminateDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go index 2d436d6d6..9eaa6801c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go @@ -15,6 +15,16 @@ import ( // UpdateDatabaseDetails The representation of UpdateDatabaseDetails type UpdateDatabaseDetails struct { DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateDatabaseDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go index c43867603..78c147af4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go @@ -21,12 +21,30 @@ type UpdateDatabaseRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateDatabaseRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateDatabaseRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateDatabaseResponse wrapper for the UpdateDatabase operation type UpdateDatabaseResponse struct { @@ -47,3 +65,8 @@ type UpdateDatabaseResponse struct { func (response UpdateDatabaseResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go index b02cd0fb8..586d3ef93 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go @@ -21,12 +21,30 @@ type UpdateDbHomeRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateDbHomeRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDbHomeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateDbHomeResponse wrapper for the UpdateDbHome operation type UpdateDbHomeResponse struct { @@ -47,3 +65,8 @@ type UpdateDbHomeResponse struct { func (response UpdateDbHomeResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDbHomeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go index eb03d5d10..b7c400d83 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go @@ -21,6 +21,16 @@ type UpdateDbSystemDetails struct { // Size, in GBs, to which the currently attached storage needs to be scaled up to for VM based DB system. This must be greater than current storage size. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. SshPublicKeys []string `mandatory:"false" json:"sshPublicKeys"` diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go index d9cd0493e..80fdec7a2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go @@ -21,12 +21,30 @@ type UpdateDbSystemRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateDbSystemRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateDbSystemResponse wrapper for the UpdateDbSystem operation type UpdateDbSystemResponse struct { @@ -47,3 +65,8 @@ type UpdateDbSystemResponse struct { func (response UpdateDbSystemResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go new file mode 100644 index 000000000..38353f29b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateZoneDetails The body for defining a new zone. +type CreateZoneDetails struct { + + // The name of the zone. + Name *string `mandatory:"true" json:"name"` + + // The type of the zone. Must be either `PRIMARY` or `SECONDARY`. + ZoneType CreateZoneDetailsZoneTypeEnum `mandatory:"true" json:"zoneType"` + + // The OCID of the compartment containing the zone. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // External master servers for the zone. + ExternalMasters []ExternalMaster `mandatory:"false" json:"externalMasters"` +} + +func (m CreateZoneDetails) String() string { + return common.PointerString(m) +} + +// CreateZoneDetailsZoneTypeEnum Enum with underlying type: string +type CreateZoneDetailsZoneTypeEnum string + +// Set of constants representing the allowable values for CreateZoneDetailsZoneType +const ( + CreateZoneDetailsZoneTypePrimary CreateZoneDetailsZoneTypeEnum = "PRIMARY" + CreateZoneDetailsZoneTypeSecondary CreateZoneDetailsZoneTypeEnum = "SECONDARY" +) + +var mappingCreateZoneDetailsZoneType = map[string]CreateZoneDetailsZoneTypeEnum{ + "PRIMARY": CreateZoneDetailsZoneTypePrimary, + "SECONDARY": CreateZoneDetailsZoneTypeSecondary, +} + +// GetCreateZoneDetailsZoneTypeEnumValues Enumerates the set of values for CreateZoneDetailsZoneType +func GetCreateZoneDetailsZoneTypeEnumValues() []CreateZoneDetailsZoneTypeEnum { + values := make([]CreateZoneDetailsZoneTypeEnum, 0) + for _, v := range mappingCreateZoneDetailsZoneType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go new file mode 100644 index 000000000..480f46e93 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateZoneRequest wrapper for the CreateZone operation +type CreateZoneRequest struct { + + // Details for creating a new zone. + CreateZoneDetails `contributesTo:"body"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateZoneRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateZoneRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateZoneRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateZoneResponse wrapper for the CreateZone operation +type CreateZoneResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Zone instance + Zone `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to + // contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the zone, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response CreateZoneResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateZoneResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go new file mode 100644 index 000000000..4f96cfc1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteDomainRecordsRequest wrapper for the DeleteDomainRecords operation +type DeleteDomainRecordsRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDomainRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteDomainRecordsResponse wrapper for the DeleteDomainRecords operation +type DeleteDomainRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDomainRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDomainRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go new file mode 100644 index 000000000..4f9a4f243 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteRRSetRequest wrapper for the DeleteRRSet operation +type DeleteRRSetRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // The type of the target RRSet within the target zone. + Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRRSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRRSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteRRSetResponse wrapper for the DeleteRRSet operation +type DeleteRRSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRRSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRRSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go new file mode 100644 index 000000000..6583fcc9f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteZoneRequest wrapper for the DeleteZone operation +type DeleteZoneRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteZoneRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteZoneRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteZoneRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteZoneResponse wrapper for the DeleteZone operation +type DeleteZoneResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteZoneResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteZoneResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go b/vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go new file mode 100644 index 000000000..b1b124cc2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go @@ -0,0 +1,707 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//DnsClient a client for Dns +type DnsClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewDnsClientWithConfigurationProvider Creates a new default Dns client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewDnsClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client DnsClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = DnsClient{BaseClient: baseClient} + client.BasePath = "20180115" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *DnsClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "dns", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *DnsClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *DnsClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateZone Creates a new zone in the specified compartment. The `compartmentId` +// query parameter is required if the `Content-Type` header for the +// request is `text/dns`. +func (client DnsClient) CreateZone(ctx context.Context, request CreateZoneRequest) (response CreateZoneResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createZone, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateZoneResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateZoneResponse") + } + return +} + +// createZone implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) createZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/zones") + if err != nil { + return nil, err + } + + var response CreateZoneResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDomainRecords Deletes all records at the specified zone and domain. +func (client DnsClient) DeleteDomainRecords(ctx context.Context, request DeleteDomainRecordsRequest) (response DeleteDomainRecordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDomainRecords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteDomainRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDomainRecordsResponse") + } + return +} + +// deleteDomainRecords implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) deleteDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/zones/{zoneNameOrId}/records/{domain}") + if err != nil { + return nil, err + } + + var response DeleteDomainRecordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRRSet Deletes all records in the specified RRSet. +func (client DnsClient) DeleteRRSet(ctx context.Context, request DeleteRRSetRequest) (response DeleteRRSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRRSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteRRSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRRSetResponse") + } + return +} + +// deleteRRSet implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) deleteRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") + if err != nil { + return nil, err + } + + var response DeleteRRSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteZone Deletes the specified zone. A `204` response indicates that zone has been +// successfully deleted. +func (client DnsClient) DeleteZone(ctx context.Context, request DeleteZoneRequest) (response DeleteZoneResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteZone, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteZoneResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteZoneResponse") + } + return +} + +// deleteZone implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) deleteZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/zones/{zoneNameOrId}") + if err != nil { + return nil, err + } + + var response DeleteZoneResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDomainRecords Gets a list of all records at the specified zone and domain. +// The results are sorted by `rtype` in alphabetical order by default. You +// can optionally filter and/or sort the results using the listed parameters. +func (client DnsClient) GetDomainRecords(ctx context.Context, request GetDomainRecordsRequest) (response GetDomainRecordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDomainRecords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetDomainRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDomainRecordsResponse") + } + return +} + +// getDomainRecords implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) getDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}/records/{domain}") + if err != nil { + return nil, err + } + + var response GetDomainRecordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRRSet Gets a list of all records in the specified RRSet. The results are +// sorted by `recordHash` by default. +func (client DnsClient) GetRRSet(ctx context.Context, request GetRRSetRequest) (response GetRRSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getRRSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetRRSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRRSetResponse") + } + return +} + +// getRRSet implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) getRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") + if err != nil { + return nil, err + } + + var response GetRRSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetZone Gets information about the specified zone, including its creation date, +// zone type, and serial. +func (client DnsClient) GetZone(ctx context.Context, request GetZoneRequest) (response GetZoneResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getZone, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetZoneResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetZoneResponse") + } + return +} + +// getZone implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) getZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}") + if err != nil { + return nil, err + } + + var response GetZoneResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetZoneRecords Gets all records in the specified zone. The results are +// sorted by `domain` in alphabetical order by default. For more +// information about records, please see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). +func (client DnsClient) GetZoneRecords(ctx context.Context, request GetZoneRecordsRequest) (response GetZoneRecordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getZoneRecords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetZoneRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetZoneRecordsResponse") + } + return +} + +// getZoneRecords implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) getZoneRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}/records") + if err != nil { + return nil, err + } + + var response GetZoneRecordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListZones Gets a list of all zones in the specified compartment. The collection +// can be filtered by name, time created, and zone type. +func (client DnsClient) ListZones(ctx context.Context, request ListZonesRequest) (response ListZonesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listZones, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListZonesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListZonesResponse") + } + return +} + +// listZones implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) listZones(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones") + if err != nil { + return nil, err + } + + var response ListZonesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PatchDomainRecords Replaces records in the specified zone at a domain. You can update one record or all records for the specified zone depending on the changes provided in the request body. You can also add or remove records using this function. +func (client DnsClient) PatchDomainRecords(ctx context.Context, request PatchDomainRecordsRequest) (response PatchDomainRecordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.patchDomainRecords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(PatchDomainRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchDomainRecordsResponse") + } + return +} + +// patchDomainRecords implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) patchDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/zones/{zoneNameOrId}/records/{domain}") + if err != nil { + return nil, err + } + + var response PatchDomainRecordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PatchRRSet Updates records in the specified RRSet. +func (client DnsClient) PatchRRSet(ctx context.Context, request PatchRRSetRequest) (response PatchRRSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.patchRRSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(PatchRRSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchRRSetResponse") + } + return +} + +// patchRRSet implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) patchRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") + if err != nil { + return nil, err + } + + var response PatchRRSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PatchZoneRecords Updates a collection of records in the specified zone. You can update +// one record or all records for the specified zone depending on the +// changes provided in the request body. You can also add or remove records +// using this function. +func (client DnsClient) PatchZoneRecords(ctx context.Context, request PatchZoneRecordsRequest) (response PatchZoneRecordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.patchZoneRecords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(PatchZoneRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchZoneRecordsResponse") + } + return +} + +// patchZoneRecords implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) patchZoneRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/zones/{zoneNameOrId}/records") + if err != nil { + return nil, err + } + + var response PatchZoneRecordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDomainRecords Replaces records in the specified zone at a domain with the records +// specified in the request body. If a specified record does not exist, +// it will be created. If the record exists, then it will be updated to +// represent the record in the body of the request. If a record in the zone +// does not exist in the request body, the record will be removed from the +// zone. +func (client DnsClient) UpdateDomainRecords(ctx context.Context, request UpdateDomainRecordsRequest) (response UpdateDomainRecordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDomainRecords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateDomainRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDomainRecordsResponse") + } + return +} + +// updateDomainRecords implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) updateDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}/records/{domain}") + if err != nil { + return nil, err + } + + var response UpdateDomainRecordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateRRSet Replaces records in the specified RRSet. +func (client DnsClient) UpdateRRSet(ctx context.Context, request UpdateRRSetRequest) (response UpdateRRSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRRSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateRRSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRRSetResponse") + } + return +} + +// updateRRSet implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) updateRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") + if err != nil { + return nil, err + } + + var response UpdateRRSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateZone Updates the specified secondary zone with your new external master +// server information. For more information about secondary zone, see +// Manage DNS Service Zone (https://docs.us-phoenix-1.oraclecloud.com/Content/DNS/Tasks/managingdnszones.htm). +func (client DnsClient) UpdateZone(ctx context.Context, request UpdateZoneRequest) (response UpdateZoneResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateZone, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateZoneResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateZoneResponse") + } + return +} + +// updateZone implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) updateZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}") + if err != nil { + return nil, err + } + + var response UpdateZoneResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateZoneRecords Replaces records in the specified zone with the records specified in the +// request body. If a specified record does not exist, it will be created. +// If the record exists, then it will be updated to represent the record in +// the body of the request. If a record in the zone does not exist in the +// request body, the record will be removed from the zone. +func (client DnsClient) UpdateZoneRecords(ctx context.Context, request UpdateZoneRecordsRequest) (response UpdateZoneRecordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateZoneRecords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateZoneRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateZoneRecordsResponse") + } + return +} + +// updateZoneRecords implements the OCIOperation interface (enables retrying operations) +func (client DnsClient) updateZoneRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}/records") + if err != nil { + return nil, err + } + + var response UpdateZoneRecordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/external_master.go b/vendor/github.com/oracle/oci-go-sdk/dns/external_master.go new file mode 100644 index 000000000..0d17dd9b7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/external_master.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ExternalMaster An external master name server used as the source of zone data. +type ExternalMaster struct { + + // The server's IP address (IPv4 or IPv6). + Address *string `mandatory:"true" json:"address"` + + // The server's port. + Port *int `mandatory:"false" json:"port"` + + Tsig *Tsig `mandatory:"false" json:"tsig"` +} + +func (m ExternalMaster) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go new file mode 100644 index 000000000..3adaf85e1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go @@ -0,0 +1,159 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDomainRecordsRequest wrapper for the GetDomainRecords operation +type GetDomainRecordsRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // The `If-None-Match` header field makes the request method conditional on + // the absence of any current representation of the target resource, when + // the field-value is `*`, or having a selected representation with an + // entity-tag that does not match any of those listed in the field-value. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` + + // The `If-Modified-Since` header field makes a GET or HEAD request method + // conditional on the selected representation's modification date being more + // recent than the date provided in the field-value. Transfer of the + // selected representation's data is avoided if that data has not changed. + IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` + + // The maximum number of items to return in a page of the collection. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The version of the zone for which data is requested. + ZoneVersion *string `mandatory:"false" contributesTo:"query" name:"zoneVersion"` + + // Search by record type. + // Will match any record whose type (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4) (case-insensitive) equals the provided value. + Rtype *string `mandatory:"false" contributesTo:"query" name:"rtype"` + + // The field by which to sort records. + SortBy GetDomainRecordsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The order to sort the resources. + SortOrder GetDomainRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDomainRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetDomainRecordsResponse wrapper for the GetDomainRecords operation +type GetDomainRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RecordCollection instances + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response GetDomainRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDomainRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetDomainRecordsSortByEnum Enum with underlying type: string +type GetDomainRecordsSortByEnum string + +// Set of constants representing the allowable values for GetDomainRecordsSortBy +const ( + GetDomainRecordsSortByRtype GetDomainRecordsSortByEnum = "rtype" + GetDomainRecordsSortByTtl GetDomainRecordsSortByEnum = "ttl" +) + +var mappingGetDomainRecordsSortBy = map[string]GetDomainRecordsSortByEnum{ + "rtype": GetDomainRecordsSortByRtype, + "ttl": GetDomainRecordsSortByTtl, +} + +// GetGetDomainRecordsSortByEnumValues Enumerates the set of values for GetDomainRecordsSortBy +func GetGetDomainRecordsSortByEnumValues() []GetDomainRecordsSortByEnum { + values := make([]GetDomainRecordsSortByEnum, 0) + for _, v := range mappingGetDomainRecordsSortBy { + values = append(values, v) + } + return values +} + +// GetDomainRecordsSortOrderEnum Enum with underlying type: string +type GetDomainRecordsSortOrderEnum string + +// Set of constants representing the allowable values for GetDomainRecordsSortOrder +const ( + GetDomainRecordsSortOrderAsc GetDomainRecordsSortOrderEnum = "ASC" + GetDomainRecordsSortOrderDesc GetDomainRecordsSortOrderEnum = "DESC" +) + +var mappingGetDomainRecordsSortOrder = map[string]GetDomainRecordsSortOrderEnum{ + "ASC": GetDomainRecordsSortOrderAsc, + "DESC": GetDomainRecordsSortOrderDesc, +} + +// GetGetDomainRecordsSortOrderEnumValues Enumerates the set of values for GetDomainRecordsSortOrder +func GetGetDomainRecordsSortOrderEnumValues() []GetDomainRecordsSortOrderEnum { + values := make([]GetDomainRecordsSortOrderEnum, 0) + for _, v := range mappingGetDomainRecordsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go new file mode 100644 index 000000000..acad3eb31 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetRRSetRequest wrapper for the GetRRSet operation +type GetRRSetRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // The type of the target RRSet within the target zone. + Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` + + // The `If-None-Match` header field makes the request method conditional on + // the absence of any current representation of the target resource, when + // the field-value is `*`, or having a selected representation with an + // entity-tag that does not match any of those listed in the field-value. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` + + // The `If-Modified-Since` header field makes a GET or HEAD request method + // conditional on the selected representation's modification date being more + // recent than the date provided in the field-value. Transfer of the + // selected representation's data is avoided if that data has not changed. + IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` + + // The maximum number of items to return in a page of the collection. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The version of the zone for which data is requested. + ZoneVersion *string `mandatory:"false" contributesTo:"query" name:"zoneVersion"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRRSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRRSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetRRSetResponse wrapper for the GetRRSet operation +type GetRRSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RrSet instances + RrSet `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response GetRRSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRRSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go new file mode 100644 index 000000000..7aa915300 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go @@ -0,0 +1,166 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetZoneRecordsRequest wrapper for the GetZoneRecords operation +type GetZoneRecordsRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The `If-None-Match` header field makes the request method conditional on + // the absence of any current representation of the target resource, when + // the field-value is `*`, or having a selected representation with an + // entity-tag that does not match any of those listed in the field-value. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` + + // The `If-Modified-Since` header field makes a GET or HEAD request method + // conditional on the selected representation's modification date being more + // recent than the date provided in the field-value. Transfer of the + // selected representation's data is avoided if that data has not changed. + IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` + + // The maximum number of items to return in a page of the collection. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The version of the zone for which data is requested. + ZoneVersion *string `mandatory:"false" contributesTo:"query" name:"zoneVersion"` + + // Search by domain. + // Will match any record whose domain (case-insensitive) equals the provided value. + Domain *string `mandatory:"false" contributesTo:"query" name:"domain"` + + // Search by domain. + // Will match any record whose domain (case-insensitive) contains the provided value. + DomainContains *string `mandatory:"false" contributesTo:"query" name:"domainContains"` + + // Search by record type. + // Will match any record whose type (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4) (case-insensitive) equals the provided value. + Rtype *string `mandatory:"false" contributesTo:"query" name:"rtype"` + + // The field by which to sort records. + SortBy GetZoneRecordsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The order to sort the resources. + SortOrder GetZoneRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetZoneRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetZoneRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetZoneRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetZoneRecordsResponse wrapper for the GetZoneRecords operation +type GetZoneRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RecordCollection instances + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response GetZoneRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetZoneRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetZoneRecordsSortByEnum Enum with underlying type: string +type GetZoneRecordsSortByEnum string + +// Set of constants representing the allowable values for GetZoneRecordsSortBy +const ( + GetZoneRecordsSortByDomain GetZoneRecordsSortByEnum = "domain" + GetZoneRecordsSortByRtype GetZoneRecordsSortByEnum = "rtype" + GetZoneRecordsSortByTtl GetZoneRecordsSortByEnum = "ttl" +) + +var mappingGetZoneRecordsSortBy = map[string]GetZoneRecordsSortByEnum{ + "domain": GetZoneRecordsSortByDomain, + "rtype": GetZoneRecordsSortByRtype, + "ttl": GetZoneRecordsSortByTtl, +} + +// GetGetZoneRecordsSortByEnumValues Enumerates the set of values for GetZoneRecordsSortBy +func GetGetZoneRecordsSortByEnumValues() []GetZoneRecordsSortByEnum { + values := make([]GetZoneRecordsSortByEnum, 0) + for _, v := range mappingGetZoneRecordsSortBy { + values = append(values, v) + } + return values +} + +// GetZoneRecordsSortOrderEnum Enum with underlying type: string +type GetZoneRecordsSortOrderEnum string + +// Set of constants representing the allowable values for GetZoneRecordsSortOrder +const ( + GetZoneRecordsSortOrderAsc GetZoneRecordsSortOrderEnum = "ASC" + GetZoneRecordsSortOrderDesc GetZoneRecordsSortOrderEnum = "DESC" +) + +var mappingGetZoneRecordsSortOrder = map[string]GetZoneRecordsSortOrderEnum{ + "ASC": GetZoneRecordsSortOrderAsc, + "DESC": GetZoneRecordsSortOrderDesc, +} + +// GetGetZoneRecordsSortOrderEnumValues Enumerates the set of values for GetZoneRecordsSortOrder +func GetGetZoneRecordsSortOrderEnumValues() []GetZoneRecordsSortOrderEnum { + values := make([]GetZoneRecordsSortOrderEnum, 0) + for _, v := range mappingGetZoneRecordsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go new file mode 100644 index 000000000..2ba1b7c89 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetZoneRequest wrapper for the GetZone operation +type GetZoneRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The `If-None-Match` header field makes the request method conditional on + // the absence of any current representation of the target resource, when + // the field-value is `*`, or having a selected representation with an + // entity-tag that does not match any of those listed in the field-value. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` + + // The `If-Modified-Since` header field makes a GET or HEAD request method + // conditional on the selected representation's modification date being more + // recent than the date provided in the field-value. Transfer of the + // selected representation's data is avoided if that data has not changed. + IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetZoneRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetZoneRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetZoneRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetZoneResponse wrapper for the GetZone operation +type GetZoneResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Zone instance + Zone `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to + // contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the zone, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response GetZoneResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetZoneResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go new file mode 100644 index 000000000..79b68258a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go @@ -0,0 +1,206 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListZonesRequest wrapper for the ListZones operation +type ListZonesRequest struct { + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a page of the collection. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A case-sensitive filter for zone names. + // Will match any zone with a name that equals the provided value. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // Search by zone name. + // Will match any zone whose name (case-insensitive) contains the provided value. + NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"` + + // Search by zone type, `PRIMARY` or `SECONDARY`. + // Will match any zone whose type equals the provided value. + ZoneType ListZonesZoneTypeEnum `mandatory:"false" contributesTo:"query" name:"zoneType" omitEmpty:"true"` + + // An RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) timestamp that states + // all returned resources were created on or after the indicated time. + TimeCreatedGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedGreaterThanOrEqualTo"` + + // An RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) timestamp that states + // all returned resources were created before the indicated time. + TimeCreatedLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedLessThan"` + + // The field by which to sort zones. + SortBy ListZonesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The order to sort the resources. + SortOrder ListZonesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The state of a resource. + LifecycleState ListZonesLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListZonesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListZonesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListZonesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListZonesResponse wrapper for the ListZones operation +type ListZonesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ZoneSummary instances + Items []ZoneSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need to + // contact Oracle about a particular request, please provide the request + // ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListZonesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListZonesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListZonesZoneTypeEnum Enum with underlying type: string +type ListZonesZoneTypeEnum string + +// Set of constants representing the allowable values for ListZonesZoneType +const ( + ListZonesZoneTypePrimary ListZonesZoneTypeEnum = "PRIMARY" + ListZonesZoneTypeSecondary ListZonesZoneTypeEnum = "SECONDARY" +) + +var mappingListZonesZoneType = map[string]ListZonesZoneTypeEnum{ + "PRIMARY": ListZonesZoneTypePrimary, + "SECONDARY": ListZonesZoneTypeSecondary, +} + +// GetListZonesZoneTypeEnumValues Enumerates the set of values for ListZonesZoneType +func GetListZonesZoneTypeEnumValues() []ListZonesZoneTypeEnum { + values := make([]ListZonesZoneTypeEnum, 0) + for _, v := range mappingListZonesZoneType { + values = append(values, v) + } + return values +} + +// ListZonesSortByEnum Enum with underlying type: string +type ListZonesSortByEnum string + +// Set of constants representing the allowable values for ListZonesSortBy +const ( + ListZonesSortByName ListZonesSortByEnum = "name" + ListZonesSortByZonetype ListZonesSortByEnum = "zoneType" + ListZonesSortByTimecreated ListZonesSortByEnum = "timeCreated" +) + +var mappingListZonesSortBy = map[string]ListZonesSortByEnum{ + "name": ListZonesSortByName, + "zoneType": ListZonesSortByZonetype, + "timeCreated": ListZonesSortByTimecreated, +} + +// GetListZonesSortByEnumValues Enumerates the set of values for ListZonesSortBy +func GetListZonesSortByEnumValues() []ListZonesSortByEnum { + values := make([]ListZonesSortByEnum, 0) + for _, v := range mappingListZonesSortBy { + values = append(values, v) + } + return values +} + +// ListZonesSortOrderEnum Enum with underlying type: string +type ListZonesSortOrderEnum string + +// Set of constants representing the allowable values for ListZonesSortOrder +const ( + ListZonesSortOrderAsc ListZonesSortOrderEnum = "ASC" + ListZonesSortOrderDesc ListZonesSortOrderEnum = "DESC" +) + +var mappingListZonesSortOrder = map[string]ListZonesSortOrderEnum{ + "ASC": ListZonesSortOrderAsc, + "DESC": ListZonesSortOrderDesc, +} + +// GetListZonesSortOrderEnumValues Enumerates the set of values for ListZonesSortOrder +func GetListZonesSortOrderEnumValues() []ListZonesSortOrderEnum { + values := make([]ListZonesSortOrderEnum, 0) + for _, v := range mappingListZonesSortOrder { + values = append(values, v) + } + return values +} + +// ListZonesLifecycleStateEnum Enum with underlying type: string +type ListZonesLifecycleStateEnum string + +// Set of constants representing the allowable values for ListZonesLifecycleState +const ( + ListZonesLifecycleStateActive ListZonesLifecycleStateEnum = "ACTIVE" + ListZonesLifecycleStateCreating ListZonesLifecycleStateEnum = "CREATING" + ListZonesLifecycleStateDeleted ListZonesLifecycleStateEnum = "DELETED" + ListZonesLifecycleStateDeleting ListZonesLifecycleStateEnum = "DELETING" + ListZonesLifecycleStateFailed ListZonesLifecycleStateEnum = "FAILED" +) + +var mappingListZonesLifecycleState = map[string]ListZonesLifecycleStateEnum{ + "ACTIVE": ListZonesLifecycleStateActive, + "CREATING": ListZonesLifecycleStateCreating, + "DELETED": ListZonesLifecycleStateDeleted, + "DELETING": ListZonesLifecycleStateDeleting, + "FAILED": ListZonesLifecycleStateFailed, +} + +// GetListZonesLifecycleStateEnumValues Enumerates the set of values for ListZonesLifecycleState +func GetListZonesLifecycleStateEnumValues() []ListZonesLifecycleStateEnum { + values := make([]ListZonesLifecycleStateEnum, 0) + for _, v := range mappingListZonesLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go new file mode 100644 index 000000000..5ef165776 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PatchDomainRecordsDetails The representation of PatchDomainRecordsDetails +type PatchDomainRecordsDetails struct { + Items []RecordOperation `mandatory:"false" json:"items"` +} + +func (m PatchDomainRecordsDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go new file mode 100644 index 000000000..d6bff184e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// PatchDomainRecordsRequest wrapper for the PatchDomainRecords operation +type PatchDomainRecordsRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // Operations describing how to modify the collection of records. + PatchDomainRecordsDetails `contributesTo:"body"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchDomainRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// PatchDomainRecordsResponse wrapper for the PatchDomainRecords operation +type PatchDomainRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RecordCollection instance + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response PatchDomainRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchDomainRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go new file mode 100644 index 000000000..833af05cf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// PatchRRSetRequest wrapper for the PatchRRSet operation +type PatchRRSetRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // The type of the target RRSet within the target zone. + Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` + + // Operations describing how to modify the collection of records. + PatchRrSetDetails `contributesTo:"body"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchRRSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchRRSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// PatchRRSetResponse wrapper for the PatchRRSet operation +type PatchRRSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RecordCollection instance + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response PatchRRSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchRRSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go new file mode 100644 index 000000000..d070e86da --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PatchRrSetDetails The representation of PatchRrSetDetails +type PatchRrSetDetails struct { + Items []RecordOperation `mandatory:"false" json:"items"` +} + +func (m PatchRrSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go new file mode 100644 index 000000000..b72c1fe5a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PatchZoneRecordsDetails The representation of PatchZoneRecordsDetails +type PatchZoneRecordsDetails struct { + Items []RecordOperation `mandatory:"false" json:"items"` +} + +func (m PatchZoneRecordsDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go new file mode 100644 index 000000000..27fd5659f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// PatchZoneRecordsRequest wrapper for the PatchZoneRecords operation +type PatchZoneRecordsRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The operations describing how to modify the collection of records. + PatchZoneRecordsDetails `contributesTo:"body"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchZoneRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchZoneRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchZoneRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// PatchZoneRecordsResponse wrapper for the PatchZoneRecords operation +type PatchZoneRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RecordCollection instance + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response PatchZoneRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchZoneRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record.go b/vendor/github.com/oracle/oci-go-sdk/dns/record.go new file mode 100644 index 000000000..b96e8d834 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/record.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Record A DNS resource record. For more information about DNS records, see RFC 1034 (https://tools.ietf.org/html/rfc1034#section-3.6). +type Record struct { + + // The fully qualified domain name where the record can be located. + Domain *string `mandatory:"false" json:"domain"` + + // A unique identifier for the record within its zone. + RecordHash *string `mandatory:"false" json:"recordHash"` + + // A Boolean flag indicating whether or not parts of the record + // are unable to be explicitly managed. + IsProtected *bool `mandatory:"false" json:"isProtected"` + + // The record's data, as whitespace-delimited tokens in + // type-specific presentation format. + Rdata *string `mandatory:"false" json:"rdata"` + + // The latest version of the record's zone in which its RRSet differs + // from the preceding version. + RrsetVersion *string `mandatory:"false" json:"rrsetVersion"` + + // The canonical name for the record's type, such as A or CNAME. For more + // information, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). + Rtype *string `mandatory:"false" json:"rtype"` + + // The Time To Live for the record, in seconds. + Ttl *int `mandatory:"false" json:"ttl"` +} + +func (m Record) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go b/vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go new file mode 100644 index 000000000..a030cea64 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RecordCollection A collection of DNS resource records. +type RecordCollection struct { + Items []Record `mandatory:"false" json:"items"` +} + +func (m RecordCollection) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/record_details.go new file mode 100644 index 000000000..b9da9dace --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/record_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RecordDetails A DNS resource record. For more information about records, see RFC 1034 (https://tools.ietf.org/html/rfc1034#section-3.6). +type RecordDetails struct { + + // The fully qualified domain name where the record can be located. + Domain *string `mandatory:"true" json:"domain"` + + // The record's data, as whitespace-delimited tokens in + // type-specific presentation format. + Rdata *string `mandatory:"true" json:"rdata"` + + // The canonical name for the record's type, such as A or CNAME. For more + // information, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). + Rtype *string `mandatory:"true" json:"rtype"` + + // The Time To Live for the record, in seconds. + Ttl *int `mandatory:"true" json:"ttl"` + + // A unique identifier for the record within its zone. + RecordHash *string `mandatory:"false" json:"recordHash"` + + // A Boolean flag indicating whether or not parts of the record + // are unable to be explicitly managed. + IsProtected *bool `mandatory:"false" json:"isProtected"` + + // The latest version of the record's zone in which its RRSet differs + // from the preceding version. + RrsetVersion *string `mandatory:"false" json:"rrsetVersion"` +} + +func (m RecordDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go b/vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go new file mode 100644 index 000000000..3e597d7fa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RecordOperation An extension of the existing record resource, describing either a +// precondition, an add, or a remove. Preconditions check all fields, +// including read-only data like `recordHash` and `rrsetVersion`. +type RecordOperation struct { + + // The fully qualified domain name where the record can be located. + Domain *string `mandatory:"false" json:"domain"` + + // A unique identifier for the record within its zone. + RecordHash *string `mandatory:"false" json:"recordHash"` + + // A Boolean flag indicating whether or not parts of the record + // are unable to be explicitly managed. + IsProtected *bool `mandatory:"false" json:"isProtected"` + + // The record's data, as whitespace-delimited tokens in + // type-specific presentation format. + Rdata *string `mandatory:"false" json:"rdata"` + + // The latest version of the record's zone in which its RRSet differs + // from the preceding version. + RrsetVersion *string `mandatory:"false" json:"rrsetVersion"` + + // The canonical name for the record's type, such as A or CNAME. For more + // information, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). + Rtype *string `mandatory:"false" json:"rtype"` + + // The Time To Live for the record, in seconds. + Ttl *int `mandatory:"false" json:"ttl"` + + // A description of how a record relates to a PATCH operation. + // - `REQUIRE` indicates a precondition that record data **must** already exist. + // - `PROHIBIT` indicates a precondition that record data **must not** already exist. + // - `ADD` indicates that record data **must** exist after successful application. + // - `REMOVE` indicates that record data **must not** exist after successful application. + // **Note:** `ADD` and `REMOVE` operations can succeed even if + // they require no changes when applied, such as when the described + // records are already present or absent. + // **Note:** `ADD` and `REMOVE` operations can describe changes for + // more than one record. + // **Example:** `{ "domain": "www.example.com", "rtype": "AAAA", "ttl": 60 }` + // specifies a new TTL for every record in the www.example.com AAAA RRSet. + Operation RecordOperationOperationEnum `mandatory:"false" json:"operation,omitempty"` +} + +func (m RecordOperation) String() string { + return common.PointerString(m) +} + +// RecordOperationOperationEnum Enum with underlying type: string +type RecordOperationOperationEnum string + +// Set of constants representing the allowable values for RecordOperationOperation +const ( + RecordOperationOperationRequire RecordOperationOperationEnum = "REQUIRE" + RecordOperationOperationProhibit RecordOperationOperationEnum = "PROHIBIT" + RecordOperationOperationAdd RecordOperationOperationEnum = "ADD" + RecordOperationOperationRemove RecordOperationOperationEnum = "REMOVE" +) + +var mappingRecordOperationOperation = map[string]RecordOperationOperationEnum{ + "REQUIRE": RecordOperationOperationRequire, + "PROHIBIT": RecordOperationOperationProhibit, + "ADD": RecordOperationOperationAdd, + "REMOVE": RecordOperationOperationRemove, +} + +// GetRecordOperationOperationEnumValues Enumerates the set of values for RecordOperationOperation +func GetRecordOperationOperationEnumValues() []RecordOperationOperationEnum { + values := make([]RecordOperationOperationEnum, 0) + for _, v := range mappingRecordOperationOperation { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go b/vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go new file mode 100644 index 000000000..127516b1f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go @@ -0,0 +1,23 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RrSet A collection of DNS records of the same domain and type. For more +// information about record types, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). +type RrSet struct { + Items []Record `mandatory:"false" json:"items"` +} + +func (m RrSet) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go new file mode 100644 index 000000000..c55060d0a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go @@ -0,0 +1,21 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SortOrder The order to sort the resources. +type SortOrder struct { +} + +func (m SortOrder) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/tsig.go b/vendor/github.com/oracle/oci-go-sdk/dns/tsig.go new file mode 100644 index 000000000..3215bcb47 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/tsig.go @@ -0,0 +1,32 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Tsig A TSIG (https://tools.ietf.org/html/rfc2845) key. +type Tsig struct { + + // A domain name identifying the key for a given pair of hosts. + Name *string `mandatory:"true" json:"name"` + + // A base64 string encoding the binary shared secret. + Secret *string `mandatory:"true" json:"secret"` + + // TSIG Algorithms are encoded as domain names, but most consist of only one + // non-empty label, which is not required to be explicitly absolute. For a + // full list of TSIG algorithms, see Secret Key Transaction Authentication for DNS (TSIG) Algorithm Names (http://www.iana.org/assignments/tsig-algorithm-names/tsig-algorithm-names.xhtml#tsig-algorithm-names-1) + Algorithm *string `mandatory:"true" json:"algorithm"` +} + +func (m Tsig) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go new file mode 100644 index 000000000..528013635 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateDomainRecordsDetails The representation of UpdateDomainRecordsDetails +type UpdateDomainRecordsDetails struct { + Items []RecordDetails `mandatory:"false" json:"items"` +} + +func (m UpdateDomainRecordsDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go new file mode 100644 index 000000000..3b34094ff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDomainRecordsRequest wrapper for the UpdateDomainRecords operation +type UpdateDomainRecordsRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // A full list of records for the domain. + UpdateDomainRecordsDetails `contributesTo:"body"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDomainRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateDomainRecordsResponse wrapper for the UpdateDomainRecords operation +type UpdateDomainRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RecordCollection instance + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateDomainRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDomainRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go new file mode 100644 index 000000000..b236b3e9e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateRRSetRequest wrapper for the UpdateRRSet operation +type UpdateRRSetRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // The target fully-qualified domain name (FQDN) within the target zone. + Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` + + // The type of the target RRSet within the target zone. + Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` + + // A full list of records for the RRSet. + UpdateRrSetDetails `contributesTo:"body"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRRSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRRSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateRRSetResponse wrapper for the UpdateRRSet operation +type UpdateRRSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RecordCollection instance + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateRRSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRRSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go new file mode 100644 index 000000000..0c35e7532 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateRrSetDetails The representation of UpdateRrSetDetails +type UpdateRrSetDetails struct { + Items []RecordDetails `mandatory:"false" json:"items"` +} + +func (m UpdateRrSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go new file mode 100644 index 000000000..bf2434192 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateZoneDetails The body for updating a zone. +type UpdateZoneDetails struct { + + // External master servers for the zone. + ExternalMasters []ExternalMaster `mandatory:"false" json:"externalMasters"` +} + +func (m UpdateZoneDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go new file mode 100644 index 000000000..cd1d8bb4e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateZoneRecordsDetails The representation of UpdateZoneRecordsDetails +type UpdateZoneRecordsDetails struct { + Items []RecordDetails `mandatory:"false" json:"items"` +} + +func (m UpdateZoneRecordsDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go new file mode 100644 index 000000000..fffece0e7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateZoneRecordsRequest wrapper for the UpdateZoneRecords operation +type UpdateZoneRecordsRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // A full list of records for the zone. + UpdateZoneRecordsDetails `contributesTo:"body"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateZoneRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateZoneRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateZoneRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateZoneRecordsResponse wrapper for the UpdateZoneRecords operation +type UpdateZoneRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RecordCollection instance + RecordCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if + // this header appears in the response, then a partial list might have + // been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items that match the query. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide + // the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the record collection, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateZoneRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateZoneRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go new file mode 100644 index 000000000..d691af0be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateZoneRequest wrapper for the UpdateZone operation +type UpdateZoneRequest struct { + + // The name or OCID of the target zone. + ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` + + // New data for the zone. + UpdateZoneDetails `contributesTo:"body"` + + // The `If-Match` header field makes the request method conditional on the + // existence of at least one current representation of the target resource, + // when the field-value is `*`, or having a current representation of the + // target resource that has an entity-tag matching a member of the list of + // entity-tags provided in the field-value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` + + // The `If-Unmodified-Since` header field makes the request method + // conditional on the selected representation's last modification date being + // earlier than or equal to the date provided in the field-value. This + // field accomplishes the same purpose as If-Match for cases where the user + // agent does not have an entity-tag for the representation. + IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` + + // The OCID of the compartment the resource belongs to. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateZoneRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateZoneRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateZoneRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateZoneResponse wrapper for the UpdateZone operation +type UpdateZoneResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Zone instance + Zone `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to + // contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current version of the zone, ending with a + // representation-specific suffix. This value may be used in If-Match + // and If-None-Match headers for later requests of the same resource. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateZoneResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateZoneResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/zone.go b/vendor/github.com/oracle/oci-go-sdk/dns/zone.go new file mode 100644 index 000000000..53e1efaae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/zone.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Zone A DNS zone. +type Zone struct { + + // The name of the zone. + Name *string `mandatory:"false" json:"name"` + + // The type of the zone. Must be either `PRIMARY` or `SECONDARY`. + ZoneType ZoneZoneTypeEnum `mandatory:"false" json:"zoneType,omitempty"` + + // The OCID of the compartment containing the zone. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // External master servers for the zone. + ExternalMasters []ExternalMaster `mandatory:"false" json:"externalMasters"` + + // The canonical absolute URL of the resource. + Self *string `mandatory:"false" json:"self"` + + // The OCID of the zone. + Id *string `mandatory:"false" json:"id"` + + // The date and time the image was created in "YYYY-MM-ddThh:mmZ" format + // with a Z offset, as defined by RFC 3339. + // **Example:** `2016-07-22T17:23:59:60Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Version is the never-repeating, totally-orderable, version of the + // zone, from which the serial field of the zone's SOA record is + // derived. + Version *string `mandatory:"false" json:"version"` + + // The current serial of the zone. As seen in the zone's SOA record. + Serial *int `mandatory:"false" json:"serial"` + + // The current state of the zone resource. + LifecycleState ZoneLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m Zone) String() string { + return common.PointerString(m) +} + +// ZoneZoneTypeEnum Enum with underlying type: string +type ZoneZoneTypeEnum string + +// Set of constants representing the allowable values for ZoneZoneType +const ( + ZoneZoneTypePrimary ZoneZoneTypeEnum = "PRIMARY" + ZoneZoneTypeSecondary ZoneZoneTypeEnum = "SECONDARY" +) + +var mappingZoneZoneType = map[string]ZoneZoneTypeEnum{ + "PRIMARY": ZoneZoneTypePrimary, + "SECONDARY": ZoneZoneTypeSecondary, +} + +// GetZoneZoneTypeEnumValues Enumerates the set of values for ZoneZoneType +func GetZoneZoneTypeEnumValues() []ZoneZoneTypeEnum { + values := make([]ZoneZoneTypeEnum, 0) + for _, v := range mappingZoneZoneType { + values = append(values, v) + } + return values +} + +// ZoneLifecycleStateEnum Enum with underlying type: string +type ZoneLifecycleStateEnum string + +// Set of constants representing the allowable values for ZoneLifecycleState +const ( + ZoneLifecycleStateActive ZoneLifecycleStateEnum = "ACTIVE" + ZoneLifecycleStateCreating ZoneLifecycleStateEnum = "CREATING" + ZoneLifecycleStateDeleted ZoneLifecycleStateEnum = "DELETED" + ZoneLifecycleStateDeleting ZoneLifecycleStateEnum = "DELETING" + ZoneLifecycleStateFailed ZoneLifecycleStateEnum = "FAILED" +) + +var mappingZoneLifecycleState = map[string]ZoneLifecycleStateEnum{ + "ACTIVE": ZoneLifecycleStateActive, + "CREATING": ZoneLifecycleStateCreating, + "DELETED": ZoneLifecycleStateDeleted, + "DELETING": ZoneLifecycleStateDeleting, + "FAILED": ZoneLifecycleStateFailed, +} + +// GetZoneLifecycleStateEnumValues Enumerates the set of values for ZoneLifecycleState +func GetZoneLifecycleStateEnumValues() []ZoneLifecycleStateEnum { + values := make([]ZoneLifecycleStateEnum, 0) + for _, v := range mappingZoneLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go b/vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go new file mode 100644 index 000000000..ea2994d16 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Public DNS Service +// +// API for managing DNS zones, records, and policies. +// + +package dns + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ZoneSummary A DNS zone. +type ZoneSummary struct { + + // The name of the zone. + Name *string `mandatory:"false" json:"name"` + + // The type of the zone. Must be either `PRIMARY` or `SECONDARY`. + ZoneType ZoneSummaryZoneTypeEnum `mandatory:"false" json:"zoneType,omitempty"` + + // The OCID of the compartment containing the zone. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The canonical absolute URL of the resource. + Self *string `mandatory:"false" json:"self"` + + // The OCID of the zone. + Id *string `mandatory:"false" json:"id"` + + // The date and time the image was created in "YYYY-MM-ddThh:mmZ" format + // with a Z offset, as defined by RFC 3339. + // **Example:** `2016-07-22T17:23:59:60Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Version is the never-repeating, totally-orderable, version of the + // zone, from which the serial field of the zone's SOA record is + // derived. + Version *string `mandatory:"false" json:"version"` + + // The current serial of the zone. As seen in the zone's SOA record. + Serial *int `mandatory:"false" json:"serial"` +} + +func (m ZoneSummary) String() string { + return common.PointerString(m) +} + +// ZoneSummaryZoneTypeEnum Enum with underlying type: string +type ZoneSummaryZoneTypeEnum string + +// Set of constants representing the allowable values for ZoneSummaryZoneType +const ( + ZoneSummaryZoneTypePrimary ZoneSummaryZoneTypeEnum = "PRIMARY" + ZoneSummaryZoneTypeSecondary ZoneSummaryZoneTypeEnum = "SECONDARY" +) + +var mappingZoneSummaryZoneType = map[string]ZoneSummaryZoneTypeEnum{ + "PRIMARY": ZoneSummaryZoneTypePrimary, + "SECONDARY": ZoneSummaryZoneTypeSecondary, +} + +// GetZoneSummaryZoneTypeEnumValues Enumerates the set of values for ZoneSummaryZoneType +func GetZoneSummaryZoneTypeEnumValues() []ZoneSummaryZoneTypeEnum { + values := make([]ZoneSummaryZoneTypeEnum, 0) + for _, v := range mappingZoneSummaryZoneType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go b/vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go new file mode 100644 index 000000000..fb9fa90a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Email Delivery Service API +// +// API spec for managing OCI Email Delivery services. +// + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSenderDetails The details needed for creating a sender. +type CreateSenderDetails struct { + + // The OCID of the compartment that contains the sender. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The email address of the sender. + EmailAddress *string `mandatory:"false" json:"emailAddress"` +} + +func (m CreateSenderDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go new file mode 100644 index 000000000..f605d5973 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateSenderRequest wrapper for the CreateSender operation +type CreateSenderRequest struct { + + // Create a sender. + CreateSenderDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSenderRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSenderRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSenderRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateSenderResponse wrapper for the CreateSender operation +type CreateSenderResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Sender instance + Sender `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide the + // request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateSenderResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSenderResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go b/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go new file mode 100644 index 000000000..5e9358f84 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Email Delivery Service API +// +// API spec for managing OCI Email Delivery services. +// + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSuppressionDetails The details needed for creating a single suppression. +type CreateSuppressionDetails struct { + + // The OCID of the compartment to contain the suppression. Since + // suppressions are at the customer level, this must be the tenancy + // OCID. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The recipient email address of the suppression. + EmailAddress *string `mandatory:"false" json:"emailAddress"` +} + +func (m CreateSuppressionDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go new file mode 100644 index 000000000..727bfbe43 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateSuppressionRequest wrapper for the CreateSuppression operation +type CreateSuppressionRequest struct { + + // Adds a single email address to the suppression list for a compartment's tenancy. + CreateSuppressionDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSuppressionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSuppressionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSuppressionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateSuppressionResponse wrapper for the CreateSuppression operation +type CreateSuppressionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Suppression instance + Suppression `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateSuppressionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSuppressionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go new file mode 100644 index 000000000..a4bbf3289 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteSenderRequest wrapper for the DeleteSender operation +type DeleteSenderRequest struct { + + // The unique OCID of the sender. + SenderId *string `mandatory:"true" contributesTo:"path" name:"senderId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSenderRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSenderRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSenderRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteSenderResponse wrapper for the DeleteSender operation +type DeleteSenderResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to + // contact Oracle about a particular request, please provide the request + // ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSenderResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSenderResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go new file mode 100644 index 000000000..78df3bc75 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteSuppressionRequest wrapper for the DeleteSuppression operation +type DeleteSuppressionRequest struct { + + // The unique OCID of the suppression. + SuppressionId *string `mandatory:"true" contributesTo:"path" name:"suppressionId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSuppressionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSuppressionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSuppressionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteSuppressionResponse wrapper for the DeleteSuppression operation +type DeleteSuppressionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to + // contact Oracle about a particular request, please provide the request + // ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSuppressionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSuppressionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/email_client.go b/vendor/github.com/oracle/oci-go-sdk/email/email_client.go new file mode 100644 index 000000000..2d6a402fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/email_client.go @@ -0,0 +1,376 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Email Delivery Service API +// +// API spec for managing OCI Email Delivery services. +// + +package email + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//EmailClient a client for Email +type EmailClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewEmailClientWithConfigurationProvider Creates a new default Email client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewEmailClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client EmailClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = EmailClient{BaseClient: baseClient} + client.BasePath = "20170907" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *EmailClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "email", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *EmailClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *EmailClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateSender Creates a sender for a tenancy in a given compartment. +func (client EmailClient) CreateSender(ctx context.Context, request CreateSenderRequest) (response CreateSenderResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createSender, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateSenderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSenderResponse") + } + return +} + +// createSender implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) createSender(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/senders") + if err != nil { + return nil, err + } + + var response CreateSenderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSuppression Adds recipient email addresses to the suppression list for a tenancy. +func (client EmailClient) CreateSuppression(ctx context.Context, request CreateSuppressionRequest) (response CreateSuppressionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createSuppression, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateSuppressionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSuppressionResponse") + } + return +} + +// createSuppression implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) createSuppression(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/suppressions") + if err != nil { + return nil, err + } + + var response CreateSuppressionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSender Deletes an approved sender for a tenancy in a given compartment for a +// provided `senderId`. +func (client EmailClient) DeleteSender(ctx context.Context, request DeleteSenderRequest) (response DeleteSenderResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSender, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteSenderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSenderResponse") + } + return +} + +// deleteSender implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) deleteSender(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/senders/{senderId}") + if err != nil { + return nil, err + } + + var response DeleteSenderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSuppression Removes a suppressed recipient email address from the suppression list +// for a tenancy in a given compartment for a provided `suppressionId`. +func (client EmailClient) DeleteSuppression(ctx context.Context, request DeleteSuppressionRequest) (response DeleteSuppressionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSuppression, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteSuppressionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSuppressionResponse") + } + return +} + +// deleteSuppression implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) deleteSuppression(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/suppressions/{suppressionId}") + if err != nil { + return nil, err + } + + var response DeleteSuppressionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSender Gets an approved sender for a given `senderId`. +func (client EmailClient) GetSender(ctx context.Context, request GetSenderRequest) (response GetSenderResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSender, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetSenderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSenderResponse") + } + return +} + +// getSender implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) getSender(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/senders/{senderId}") + if err != nil { + return nil, err + } + + var response GetSenderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSuppression Gets the details of a suppressed recipient email address for a given +// `suppressionId`. Each suppression is given a unique OCID. +func (client EmailClient) GetSuppression(ctx context.Context, request GetSuppressionRequest) (response GetSuppressionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSuppression, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetSuppressionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSuppressionResponse") + } + return +} + +// getSuppression implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) getSuppression(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/suppressions/{suppressionId}") + if err != nil { + return nil, err + } + + var response GetSuppressionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSenders Gets a collection of approved sender email addresses and sender IDs. +func (client EmailClient) ListSenders(ctx context.Context, request ListSendersRequest) (response ListSendersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSenders, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListSendersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSendersResponse") + } + return +} + +// listSenders implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) listSenders(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/senders") + if err != nil { + return nil, err + } + + var response ListSendersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSuppressions Gets a list of suppressed recipient email addresses for a user. The +// `compartmentId` for suppressions must be a tenancy OCID. The returned list +// is sorted by creation time in descending order. +func (client EmailClient) ListSuppressions(ctx context.Context, request ListSuppressionsRequest) (response ListSuppressionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSuppressions, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListSuppressionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSuppressionsResponse") + } + return +} + +// listSuppressions implements the OCIOperation interface (enables retrying operations) +func (client EmailClient) listSuppressions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/suppressions") + if err != nil { + return nil, err + } + + var response ListSuppressionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go new file mode 100644 index 000000000..68d6f5df7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetSenderRequest wrapper for the GetSender operation +type GetSenderRequest struct { + + // The unique OCID of the sender. + SenderId *string `mandatory:"true" contributesTo:"path" name:"senderId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSenderRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSenderRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSenderRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetSenderResponse wrapper for the GetSender operation +type GetSenderResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Sender instance + Sender `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide the + // request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSenderResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSenderResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go new file mode 100644 index 000000000..4dc05f477 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetSuppressionRequest wrapper for the GetSuppression operation +type GetSuppressionRequest struct { + + // The unique OCID of the suppression. + SuppressionId *string `mandatory:"true" contributesTo:"path" name:"suppressionId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSuppressionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSuppressionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSuppressionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetSuppressionResponse wrapper for the GetSuppression operation +type GetSuppressionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Suppression instance + Suppression `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSuppressionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSuppressionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go new file mode 100644 index 000000000..64321b648 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go @@ -0,0 +1,140 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListSendersRequest wrapper for the ListSenders operation +type ListSendersRequest struct { + + // The OCID for the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The current state of a sender. + LifecycleState SenderLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // The email address of the approved sender. + EmailAddress *string `mandatory:"false" contributesTo:"query" name:"emailAddress"` + + // The value of the `opc-next-page` response header from the previous + // GET request. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated GET request. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. The `TIMECREATED` value returns the list in in + // descending order by default. The `EMAILADDRESS` value returns the list in + // ascending order by default. Use the `SortOrderQueryParam` to change the + // direction of the returned list of items. + SortBy ListSendersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending or descending order. + SortOrder ListSendersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSendersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSendersRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSendersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListSendersResponse wrapper for the ListSenders operation +type ListSendersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []SenderSummary instances + Items []SenderSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide the + // request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. If this header appears in the + // response, then a partial list might have been returned. Include + // this value for the `page` parameter in subsequent GET + // requests to return the next batch of items. + // of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // The total number of items returned from the request. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response ListSendersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSendersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSendersSortByEnum Enum with underlying type: string +type ListSendersSortByEnum string + +// Set of constants representing the allowable values for ListSendersSortBy +const ( + ListSendersSortByTimecreated ListSendersSortByEnum = "TIMECREATED" + ListSendersSortByEmailaddress ListSendersSortByEnum = "EMAILADDRESS" +) + +var mappingListSendersSortBy = map[string]ListSendersSortByEnum{ + "TIMECREATED": ListSendersSortByTimecreated, + "EMAILADDRESS": ListSendersSortByEmailaddress, +} + +// GetListSendersSortByEnumValues Enumerates the set of values for ListSendersSortBy +func GetListSendersSortByEnumValues() []ListSendersSortByEnum { + values := make([]ListSendersSortByEnum, 0) + for _, v := range mappingListSendersSortBy { + values = append(values, v) + } + return values +} + +// ListSendersSortOrderEnum Enum with underlying type: string +type ListSendersSortOrderEnum string + +// Set of constants representing the allowable values for ListSendersSortOrder +const ( + ListSendersSortOrderAsc ListSendersSortOrderEnum = "ASC" + ListSendersSortOrderDesc ListSendersSortOrderEnum = "DESC" +) + +var mappingListSendersSortOrder = map[string]ListSendersSortOrderEnum{ + "ASC": ListSendersSortOrderAsc, + "DESC": ListSendersSortOrderDesc, +} + +// GetListSendersSortOrderEnumValues Enumerates the set of values for ListSendersSortOrder +func GetListSendersSortOrderEnumValues() []ListSendersSortOrderEnum { + values := make([]ListSendersSortOrderEnum, 0) + for _, v := range mappingListSendersSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go new file mode 100644 index 000000000..1670e9760 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go @@ -0,0 +1,151 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListSuppressionsRequest wrapper for the ListSuppressions operation +type ListSuppressionsRequest struct { + + // The OCID for the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The email address of the suppression. + EmailAddress *string `mandatory:"false" contributesTo:"query" name:"emailAddress"` + + // Search for suppressions that were created within a specific date range, + // using this parameter to specify the earliest creation date for the + // returned list (inclusive). Specifying this parameter without the + // corresponding `timeCreatedLessThan` parameter will retrieve suppressions created from the + // given `timeCreatedGreaterThanOrEqualTo` to the current time, in "YYYY-MM-ddThh:mmZ" format with a + // Z offset, as defined by RFC 3339. + // **Example:** 2016-12-19T16:39:57.600Z + TimeCreatedGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedGreaterThanOrEqualTo"` + + // Search for suppressions that were created within a specific date range, + // using this parameter to specify the latest creation date for the returned + // list (exclusive). Specifying this parameter without the corresponding + // `timeCreatedGreaterThanOrEqualTo` parameter will retrieve all suppressions created before the + // specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + // defined by RFC 3339. + // **Example:** 2016-12-19T16:39:57.600Z + TimeCreatedLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedLessThan"` + + // The value of the `opc-next-page` response header from the previous + // GET request. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated GET request. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. The `TIMECREATED` value returns the list in in + // descending order by default. The `EMAILADDRESS` value returns the list in + // ascending order by default. Use the `SortOrderQueryParam` to change the + // direction of the returned list of items. + SortBy ListSuppressionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending or descending order. + SortOrder ListSuppressionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSuppressionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSuppressionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSuppressionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListSuppressionsResponse wrapper for the ListSuppressions operation +type ListSuppressionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []SuppressionSummary instances + Items []SuppressionSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need + // to contact Oracle about a particular request, please provide the + // request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. If this header appears in the + // response, then a partial list might have been returned. Include + // this value for the `page` parameter in subsequent GET + // requests to return the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSuppressionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSuppressionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSuppressionsSortByEnum Enum with underlying type: string +type ListSuppressionsSortByEnum string + +// Set of constants representing the allowable values for ListSuppressionsSortBy +const ( + ListSuppressionsSortByTimecreated ListSuppressionsSortByEnum = "TIMECREATED" + ListSuppressionsSortByEmailaddress ListSuppressionsSortByEnum = "EMAILADDRESS" +) + +var mappingListSuppressionsSortBy = map[string]ListSuppressionsSortByEnum{ + "TIMECREATED": ListSuppressionsSortByTimecreated, + "EMAILADDRESS": ListSuppressionsSortByEmailaddress, +} + +// GetListSuppressionsSortByEnumValues Enumerates the set of values for ListSuppressionsSortBy +func GetListSuppressionsSortByEnumValues() []ListSuppressionsSortByEnum { + values := make([]ListSuppressionsSortByEnum, 0) + for _, v := range mappingListSuppressionsSortBy { + values = append(values, v) + } + return values +} + +// ListSuppressionsSortOrderEnum Enum with underlying type: string +type ListSuppressionsSortOrderEnum string + +// Set of constants representing the allowable values for ListSuppressionsSortOrder +const ( + ListSuppressionsSortOrderAsc ListSuppressionsSortOrderEnum = "ASC" + ListSuppressionsSortOrderDesc ListSuppressionsSortOrderEnum = "DESC" +) + +var mappingListSuppressionsSortOrder = map[string]ListSuppressionsSortOrderEnum{ + "ASC": ListSuppressionsSortOrderAsc, + "DESC": ListSuppressionsSortOrderDesc, +} + +// GetListSuppressionsSortOrderEnumValues Enumerates the set of values for ListSuppressionsSortOrder +func GetListSuppressionsSortOrderEnumValues() []ListSuppressionsSortOrderEnum { + values := make([]ListSuppressionsSortOrderEnum, 0) + for _, v := range mappingListSuppressionsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/sender.go b/vendor/github.com/oracle/oci-go-sdk/email/sender.go new file mode 100644 index 000000000..19b3ff8a2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/sender.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Email Delivery Service API +// +// API spec for managing OCI Email Delivery services. +// + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Sender The full information representing an approved sender. +type Sender struct { + + // Email address of the sender. + EmailAddress *string `mandatory:"false" json:"emailAddress"` + + // The unique OCID of the sender. + Id *string `mandatory:"false" json:"id"` + + // Value of the SPF field. For more information about SPF, please see + // SPF Authentication (https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/emaildeliveryoverview.htm#spf). + IsSpf *bool `mandatory:"false" json:"isSpf"` + + // The sender's current lifecycle state. + LifecycleState SenderLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" + // format with a Z offset, as defined by RFC 3339. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m Sender) String() string { + return common.PointerString(m) +} + +// SenderLifecycleStateEnum Enum with underlying type: string +type SenderLifecycleStateEnum string + +// Set of constants representing the allowable values for SenderLifecycleState +const ( + SenderLifecycleStateCreating SenderLifecycleStateEnum = "CREATING" + SenderLifecycleStateActive SenderLifecycleStateEnum = "ACTIVE" + SenderLifecycleStateDeleting SenderLifecycleStateEnum = "DELETING" + SenderLifecycleStateDeleted SenderLifecycleStateEnum = "DELETED" +) + +var mappingSenderLifecycleState = map[string]SenderLifecycleStateEnum{ + "CREATING": SenderLifecycleStateCreating, + "ACTIVE": SenderLifecycleStateActive, + "DELETING": SenderLifecycleStateDeleting, + "DELETED": SenderLifecycleStateDeleted, +} + +// GetSenderLifecycleStateEnumValues Enumerates the set of values for SenderLifecycleState +func GetSenderLifecycleStateEnumValues() []SenderLifecycleStateEnum { + values := make([]SenderLifecycleStateEnum, 0) + for _, v := range mappingSenderLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go b/vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go new file mode 100644 index 000000000..2d5600131 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Email Delivery Service API +// +// API spec for managing OCI Email Delivery services. +// + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SenderSummary The email addresses and `senderId` representing an approved sender. +type SenderSummary struct { + + // The email address of the sender. + EmailAddress *string `mandatory:"false" json:"emailAddress"` + + // The unique ID of the sender. + Id *string `mandatory:"false" json:"id"` + + // The current status of the approved sender. + LifecycleState SenderSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Date time the approved sender was added, in "YYYY-MM-ddThh:mmZ" + // format with a Z offset, as defined by RFC 3339. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m SenderSummary) String() string { + return common.PointerString(m) +} + +// SenderSummaryLifecycleStateEnum Enum with underlying type: string +type SenderSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for SenderSummaryLifecycleState +const ( + SenderSummaryLifecycleStateCreating SenderSummaryLifecycleStateEnum = "CREATING" + SenderSummaryLifecycleStateActive SenderSummaryLifecycleStateEnum = "ACTIVE" + SenderSummaryLifecycleStateDeleting SenderSummaryLifecycleStateEnum = "DELETING" + SenderSummaryLifecycleStateDeleted SenderSummaryLifecycleStateEnum = "DELETED" +) + +var mappingSenderSummaryLifecycleState = map[string]SenderSummaryLifecycleStateEnum{ + "CREATING": SenderSummaryLifecycleStateCreating, + "ACTIVE": SenderSummaryLifecycleStateActive, + "DELETING": SenderSummaryLifecycleStateDeleting, + "DELETED": SenderSummaryLifecycleStateDeleted, +} + +// GetSenderSummaryLifecycleStateEnumValues Enumerates the set of values for SenderSummaryLifecycleState +func GetSenderSummaryLifecycleStateEnumValues() []SenderSummaryLifecycleStateEnum { + values := make([]SenderSummaryLifecycleStateEnum, 0) + for _, v := range mappingSenderSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/suppression.go b/vendor/github.com/oracle/oci-go-sdk/email/suppression.go new file mode 100644 index 000000000..86c1571af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/suppression.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Email Delivery Service API +// +// API spec for managing OCI Email Delivery services. +// + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Suppression The full information representing an email suppression. +type Suppression struct { + + // Email address of the suppression. + EmailAddress *string `mandatory:"false" json:"emailAddress"` + + // The unique ID of the suppression. + Id *string `mandatory:"false" json:"id"` + + // The reason that the email address was suppressed. For more information on the types of bounces, see Suppresion List (https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/emaildeliveryoverview.htm#suppressionlist). + Reason SuppressionReasonEnum `mandatory:"false" json:"reason,omitempty"` + + // The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" + // format with a Z offset, as defined by RFC 3339. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m Suppression) String() string { + return common.PointerString(m) +} + +// SuppressionReasonEnum Enum with underlying type: string +type SuppressionReasonEnum string + +// Set of constants representing the allowable values for SuppressionReason +const ( + SuppressionReasonUnknown SuppressionReasonEnum = "UNKNOWN" + SuppressionReasonHardbounce SuppressionReasonEnum = "HARDBOUNCE" + SuppressionReasonComplaint SuppressionReasonEnum = "COMPLAINT" + SuppressionReasonManual SuppressionReasonEnum = "MANUAL" + SuppressionReasonSoftbounce SuppressionReasonEnum = "SOFTBOUNCE" + SuppressionReasonUnsubscribe SuppressionReasonEnum = "UNSUBSCRIBE" +) + +var mappingSuppressionReason = map[string]SuppressionReasonEnum{ + "UNKNOWN": SuppressionReasonUnknown, + "HARDBOUNCE": SuppressionReasonHardbounce, + "COMPLAINT": SuppressionReasonComplaint, + "MANUAL": SuppressionReasonManual, + "SOFTBOUNCE": SuppressionReasonSoftbounce, + "UNSUBSCRIBE": SuppressionReasonUnsubscribe, +} + +// GetSuppressionReasonEnumValues Enumerates the set of values for SuppressionReason +func GetSuppressionReasonEnumValues() []SuppressionReasonEnum { + values := make([]SuppressionReasonEnum, 0) + for _, v := range mappingSuppressionReason { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go b/vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go new file mode 100644 index 000000000..46bdf1856 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Email Delivery Service API +// +// API spec for managing OCI Email Delivery services. +// + +package email + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SuppressionSummary The full information representing a suppression. +type SuppressionSummary struct { + + // The email address of the suppression. + EmailAddress *string `mandatory:"false" json:"emailAddress"` + + // The unique OCID of the suppression. + Id *string `mandatory:"false" json:"id"` + + // The reason that the email address was suppressed. + Reason SuppressionSummaryReasonEnum `mandatory:"false" json:"reason,omitempty"` + + // The date and time a recipient's email address was added to the + // suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + // defined by RFC 3339. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m SuppressionSummary) String() string { + return common.PointerString(m) +} + +// SuppressionSummaryReasonEnum Enum with underlying type: string +type SuppressionSummaryReasonEnum string + +// Set of constants representing the allowable values for SuppressionSummaryReason +const ( + SuppressionSummaryReasonUnknown SuppressionSummaryReasonEnum = "UNKNOWN" + SuppressionSummaryReasonHardbounce SuppressionSummaryReasonEnum = "HARDBOUNCE" + SuppressionSummaryReasonComplaint SuppressionSummaryReasonEnum = "COMPLAINT" + SuppressionSummaryReasonManual SuppressionSummaryReasonEnum = "MANUAL" + SuppressionSummaryReasonSoftbounce SuppressionSummaryReasonEnum = "SOFTBOUNCE" + SuppressionSummaryReasonUnsubscribe SuppressionSummaryReasonEnum = "UNSUBSCRIBE" +) + +var mappingSuppressionSummaryReason = map[string]SuppressionSummaryReasonEnum{ + "UNKNOWN": SuppressionSummaryReasonUnknown, + "HARDBOUNCE": SuppressionSummaryReasonHardbounce, + "COMPLAINT": SuppressionSummaryReasonComplaint, + "MANUAL": SuppressionSummaryReasonManual, + "SOFTBOUNCE": SuppressionSummaryReasonSoftbounce, + "UNSUBSCRIBE": SuppressionSummaryReasonUnsubscribe, +} + +// GetSuppressionSummaryReasonEnumValues Enumerates the set of values for SuppressionSummaryReason +func GetSuppressionSummaryReasonEnumValues() []SuppressionSummaryReasonEnum { + values := make([]SuppressionSummaryReasonEnum, 0) + for _, v := range mappingSuppressionSummaryReason { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go b/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go index 4f8b123f0..dfc3a2863 100644 --- a/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go +++ b/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go @@ -9,8 +9,6 @@ import ( "os" "github.com/oracle/oci-go-sdk/common" - - "github.com/subosito/gotenv" ) var ( @@ -19,12 +17,9 @@ var ( rootCompartmentID string ) -// ParseAgrs parse shared variables from environment variables, other samples should define their own +// ParseEnvironmentVariables parse shared variables from environment variables, other samples should define their own // viariables and call this function to initialize shared variables -func ParseAgrs() { - err := gotenv.Load(".env.sample") - LogIfError(err) - +func ParseEnvironmentVariables() { availabilityDomain = os.Getenv("OCI_AVAILABILITY_DOMAIN") compartmentID = os.Getenv("OCI_COMPARTMENT_ID") rootCompartmentID = os.Getenv("OCI_ROOT_COMPARTMENT_ID") diff --git a/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go b/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go index 71317387d..d4233d63e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go +++ b/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go @@ -8,14 +8,17 @@ package helpers import ( "fmt" "log" + "math" "math/rand" "reflect" "strings" "time" + + "github.com/oracle/oci-go-sdk/common" ) -// LogIfError is equivalent to Println() followed by a call to os.Exit(1) if error is not nil -func LogIfError(err error) { +// FatalIfError is equivalent to Println() followed by a call to os.Exit(1) if error is not nil +func FatalIfError(err error) { if err != nil { log.Fatalln(err.Error()) } @@ -99,6 +102,45 @@ func CheckLifecycleState(lifecycleState string) func(interface{}) (bool, error) } } +// GetRequestMetadataWithDefaultRetryPolicy returns a requestMetadata with default retry policy +// which will do retry for non-200 status code return back from service +// Notes: not all non-200 status code should do retry, this should be based on specific operation +// such as delete operation followed with get operation will retrun 404 if resource already been +// deleted +func GetRequestMetadataWithDefaultRetryPolicy() common.RequestMetadata { + return common.RequestMetadata{ + RetryPolicy: getDefaultRetryPolicy(), + } +} + +// GetRequestMetadataWithCustomizedRetryPolicy returns a requestMetadata which will do the retry based on +// input function (retry until the function return false) +func GetRequestMetadataWithCustomizedRetryPolicy(fn func(r common.OCIOperationResponse) bool) common.RequestMetadata { + return common.RequestMetadata{ + RetryPolicy: getExponentialBackoffRetryPolicy(uint(20), fn), + } +} + +func getDefaultRetryPolicy() *common.RetryPolicy { + // how many times to do the retry + attempts := uint(10) + + // retry for all non-200 status code + retryOnAllNon200ResponseCodes := func(r common.OCIOperationResponse) bool { + return !(r.Error == nil && 199 < r.Response.HTTPResponse().StatusCode && r.Response.HTTPResponse().StatusCode < 300) + } + return getExponentialBackoffRetryPolicy(attempts, retryOnAllNon200ResponseCodes) +} + +func getExponentialBackoffRetryPolicy(n uint, fn func(r common.OCIOperationResponse) bool) *common.RetryPolicy { + // the duration between each retry operation, you might want to waite longer each time the retry fails + exponentialBackoff := func(r common.OCIOperationResponse) time.Duration { + return time.Duration(math.Pow(float64(2), float64(r.AttemptNumber-1))) * time.Second + } + policy := common.NewRetryPolicy(n, fn, exponentialBackoff) + return &policy +} + // GetRandomString returns a random string with length equals to n func GetRandomString(n int) string { letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go new file mode 100644 index 000000000..56642c4e9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go @@ -0,0 +1,32 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateExportDetails The representation of CreateExportDetails +type CreateExportDetails struct { + + // The OCID of this export's export set. + ExportSetId *string `mandatory:"true" json:"exportSetId"` + + // The OCID of this export's file system. + FileSystemId *string `mandatory:"true" json:"fileSystemId"` + + // Path used to access the associated file system. + // Avoid entering confidential information. + // Example: `/mediafiles` + Path *string `mandatory:"true" json:"path"` +} + +func (m CreateExportDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go new file mode 100644 index 000000000..e706a07ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateExportRequest wrapper for the CreateExport operation +type CreateExportRequest struct { + + // Details for creating a new export. + CreateExportDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateExportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateExportRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateExportRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateExportResponse wrapper for the CreateExport operation +type CreateExportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Export instance + Export `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateExportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateExportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go new file mode 100644 index 000000000..5b4b3bff2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateFileSystemDetails The representation of CreateFileSystemDetails +type CreateFileSystemDetails struct { + + // The availability domain to create the file system in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment to create the file system in. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My file system` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CreateFileSystemDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go new file mode 100644 index 000000000..eaec3e794 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateFileSystemRequest wrapper for the CreateFileSystem operation +type CreateFileSystemRequest struct { + + // Details for creating a new file system. + CreateFileSystemDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateFileSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateFileSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateFileSystemResponse wrapper for the CreateFileSystem operation +type CreateFileSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FileSystem instance + FileSystem `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateFileSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateFileSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go new file mode 100644 index 000000000..0f7501d74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateMountTargetDetails The representation of CreateMountTargetDetails +type CreateMountTargetDetails struct { + + // The availability domain in which to create the mount target. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment in which to create the mount target. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the subnet in which to create the mount target. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My mount target` + DisplayName *string `mandatory:"false" json:"displayName"` + + // The hostname for the mount target's IP address, used for + // DNS resolution. The value is the hostname portion of the private IP + // address's fully qualified domain name (FQDN). For example, + // `files-1` in the FQDN `files-1.subnet123.vcn1.oraclevcn.com`. + // Must be unique across all VNICs in the subnet and comply + // with RFC 952 (https://tools.ietf.org/html/rfc952) + // and RFC 1123 (https://tools.ietf.org/html/rfc1123). + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `files-1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // A private IP address of your choice. Must be an available IP address within + // the subnet's CIDR. If you don't specify a value, Oracle automatically + // assigns a private IP address from the subnet. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" json:"ipAddress"` +} + +func (m CreateMountTargetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go new file mode 100644 index 000000000..e7a4bf447 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateMountTargetRequest wrapper for the CreateMountTarget operation +type CreateMountTargetRequest struct { + + // Details for creating a new mount target. + CreateMountTargetDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateMountTargetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateMountTargetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateMountTargetResponse wrapper for the CreateMountTarget operation +type CreateMountTargetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MountTarget instance + MountTarget `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateMountTargetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateMountTargetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go new file mode 100644 index 000000000..77736e0d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSnapshotDetails The representation of CreateSnapshotDetails +type CreateSnapshotDetails struct { + + // The OCID of this export's file system. + FileSystemId *string `mandatory:"true" json:"fileSystemId"` + + // Name of the snapshot. This value is immutable. It must also be unique with respect + // to all other non-DELETED snapshots on the associated file + // system. + // Avoid entering confidential information. + // Example: `Sunday` + Name *string `mandatory:"true" json:"name"` +} + +func (m CreateSnapshotDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go new file mode 100644 index 000000000..8e80b17be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateSnapshotRequest wrapper for the CreateSnapshot operation +type CreateSnapshotRequest struct { + + // Details for creating a new snapshot. + CreateSnapshotDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSnapshotRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSnapshotRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSnapshotRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateSnapshotResponse wrapper for the CreateSnapshot operation +type CreateSnapshotResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Snapshot instance + Snapshot `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateSnapshotResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSnapshotResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go new file mode 100644 index 000000000..bc97b114e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteExportRequest wrapper for the DeleteExport operation +type DeleteExportRequest struct { + + // The OCID of the export. + ExportId *string `mandatory:"true" contributesTo:"path" name:"exportId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteExportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteExportRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteExportRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteExportResponse wrapper for the DeleteExport operation +type DeleteExportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteExportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteExportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go new file mode 100644 index 000000000..2306c1bc0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteFileSystemRequest wrapper for the DeleteFileSystem operation +type DeleteFileSystemRequest struct { + + // The OCID of the file system. + FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteFileSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteFileSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteFileSystemResponse wrapper for the DeleteFileSystem operation +type DeleteFileSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteFileSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteFileSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go new file mode 100644 index 000000000..fe9cb467d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteMountTargetRequest wrapper for the DeleteMountTarget operation +type DeleteMountTargetRequest struct { + + // The OCID of the mount target. + MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteMountTargetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteMountTargetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteMountTargetResponse wrapper for the DeleteMountTarget operation +type DeleteMountTargetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteMountTargetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteMountTargetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go new file mode 100644 index 000000000..ffc9eec18 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteSnapshotRequest wrapper for the DeleteSnapshot operation +type DeleteSnapshotRequest struct { + + // The OCID of the snapshot. + SnapshotId *string `mandatory:"true" contributesTo:"path" name:"snapshotId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSnapshotRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSnapshotRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSnapshotRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteSnapshotResponse wrapper for the DeleteSnapshot operation +type DeleteSnapshotResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSnapshotResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSnapshotResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export.go new file mode 100644 index 000000000..f0065824b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/export.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Export A file system and the path that you can use to mount it. Each export +// resource belongs to exactly one export set. +// The export's path attribute is not a path in the +// referenced file system, but the value used by clients for the path +// component of the remotetarget argument when mounting the file +// system. +// The path must start with a slash (/) followed by a sequence of zero or more +// slash-separated path elements. For any two export resources associated with +// the same export set, except those in a 'DELETED' state, the path element +// sequence for the first export resource can't contain the +// complete path element sequence of the second export resource. +// +// For example, the following are acceptable: +// * /example and /path +// * /example1 and /example2 +// * /example and /example1 +// The following examples are not acceptable: +// * /example and /example/path +// * / and /example +// Paths may not end in a slash (/). No path element can be a period (.) +// or two periods in sequence (..). All path elements must be 255 bytes or less. +// No two non-'DELETED' export resources in the same export set can +// reference the same file system. +type Export struct { + + // The OCID of this export's export set. + ExportSetId *string `mandatory:"true" json:"exportSetId"` + + // The OCID of this export's file system. + FileSystemId *string `mandatory:"true" json:"fileSystemId"` + + // The OCID of this export. + Id *string `mandatory:"true" json:"id"` + + // The current state of this export. + LifecycleState ExportLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Path used to access the associated file system. + // Avoid entering confidential information. + // Example: `/accounting` + Path *string `mandatory:"true" json:"path"` + + // The date and time the export was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m Export) String() string { + return common.PointerString(m) +} + +// ExportLifecycleStateEnum Enum with underlying type: string +type ExportLifecycleStateEnum string + +// Set of constants representing the allowable values for ExportLifecycleState +const ( + ExportLifecycleStateCreating ExportLifecycleStateEnum = "CREATING" + ExportLifecycleStateActive ExportLifecycleStateEnum = "ACTIVE" + ExportLifecycleStateDeleting ExportLifecycleStateEnum = "DELETING" + ExportLifecycleStateDeleted ExportLifecycleStateEnum = "DELETED" +) + +var mappingExportLifecycleState = map[string]ExportLifecycleStateEnum{ + "CREATING": ExportLifecycleStateCreating, + "ACTIVE": ExportLifecycleStateActive, + "DELETING": ExportLifecycleStateDeleting, + "DELETED": ExportLifecycleStateDeleted, +} + +// GetExportLifecycleStateEnumValues Enumerates the set of values for ExportLifecycleState +func GetExportLifecycleStateEnumValues() []ExportLifecycleStateEnum { + values := make([]ExportLifecycleStateEnum, 0) + for _, v := range mappingExportLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go new file mode 100644 index 000000000..ed4ad87b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ExportSet A set of file systems to export through one or more mount +// targets. Composed of zero or more export resources. +type ExportSet struct { + + // The OCID of the compartment that contains the export set. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My export set` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the export set. + Id *string `mandatory:"true" json:"id"` + + // The current state of the export set. + LifecycleState ExportSetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the export set was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the virtual cloud network (VCN) the export set is in. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The availability domain the export set is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // Controls the maximum `tbytes`, `fbytes`, and `abytes`, + // values reported by `NFS FSSTAT` calls through any associated + // mount targets. This is an advanced feature. For most + // applications, use the default value. The + // `tbytes` value reported by `FSSTAT` will be + // `maxFsStatBytes`. The value of `fbytes` and `abytes` will be + // `maxFsStatBytes` minus the metered size of the file + // system. If the metered size is larger than `maxFsStatBytes`, + // then `fbytes` and `abytes` will both be '0'. + MaxFsStatBytes *int `mandatory:"false" json:"maxFsStatBytes"` + + // Controls the maximum `ffiles`, `ffiles`, and `afiles` + // values reported by `NFS FSSTAT` calls through any associated + // mount targets. This is an advanced feature. For most + // applications, use the default value. The + // `tfiles` value reported by `FSSTAT` will be + // `maxFsStatFiles`. The value of `ffiles` and `afiles` will be + // `maxFsStatFiles` minus the metered size of the file + // system. If the metered size is larger than `maxFsStatFiles`, + // then `ffiles` and `afiles` will both be '0'. + MaxFsStatFiles *int `mandatory:"false" json:"maxFsStatFiles"` +} + +func (m ExportSet) String() string { + return common.PointerString(m) +} + +// ExportSetLifecycleStateEnum Enum with underlying type: string +type ExportSetLifecycleStateEnum string + +// Set of constants representing the allowable values for ExportSetLifecycleState +const ( + ExportSetLifecycleStateCreating ExportSetLifecycleStateEnum = "CREATING" + ExportSetLifecycleStateActive ExportSetLifecycleStateEnum = "ACTIVE" + ExportSetLifecycleStateDeleting ExportSetLifecycleStateEnum = "DELETING" + ExportSetLifecycleStateDeleted ExportSetLifecycleStateEnum = "DELETED" +) + +var mappingExportSetLifecycleState = map[string]ExportSetLifecycleStateEnum{ + "CREATING": ExportSetLifecycleStateCreating, + "ACTIVE": ExportSetLifecycleStateActive, + "DELETING": ExportSetLifecycleStateDeleting, + "DELETED": ExportSetLifecycleStateDeleted, +} + +// GetExportSetLifecycleStateEnumValues Enumerates the set of values for ExportSetLifecycleState +func GetExportSetLifecycleStateEnumValues() []ExportSetLifecycleStateEnum { + values := make([]ExportSetLifecycleStateEnum, 0) + for _, v := range mappingExportSetLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go new file mode 100644 index 000000000..d9bca9a3d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ExportSetSummary Summary information for an export set. +type ExportSetSummary struct { + + // The OCID of the compartment that contains the export set. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My export set` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the export set. + Id *string `mandatory:"true" json:"id"` + + // The current state of the export set. + LifecycleState ExportSetSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the export set was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the virtual cloud network (VCN) the export set is in. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The availability domain the export set is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` +} + +func (m ExportSetSummary) String() string { + return common.PointerString(m) +} + +// ExportSetSummaryLifecycleStateEnum Enum with underlying type: string +type ExportSetSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for ExportSetSummaryLifecycleState +const ( + ExportSetSummaryLifecycleStateCreating ExportSetSummaryLifecycleStateEnum = "CREATING" + ExportSetSummaryLifecycleStateActive ExportSetSummaryLifecycleStateEnum = "ACTIVE" + ExportSetSummaryLifecycleStateDeleting ExportSetSummaryLifecycleStateEnum = "DELETING" + ExportSetSummaryLifecycleStateDeleted ExportSetSummaryLifecycleStateEnum = "DELETED" +) + +var mappingExportSetSummaryLifecycleState = map[string]ExportSetSummaryLifecycleStateEnum{ + "CREATING": ExportSetSummaryLifecycleStateCreating, + "ACTIVE": ExportSetSummaryLifecycleStateActive, + "DELETING": ExportSetSummaryLifecycleStateDeleting, + "DELETED": ExportSetSummaryLifecycleStateDeleted, +} + +// GetExportSetSummaryLifecycleStateEnumValues Enumerates the set of values for ExportSetSummaryLifecycleState +func GetExportSetSummaryLifecycleStateEnumValues() []ExportSetSummaryLifecycleStateEnum { + values := make([]ExportSetSummaryLifecycleStateEnum, 0) + for _, v := range mappingExportSetSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go new file mode 100644 index 000000000..fb2515619 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ExportSummary Summary information for an export. +type ExportSummary struct { + + // The OCID of this export's export set. + ExportSetId *string `mandatory:"true" json:"exportSetId"` + + // The OCID of this export's file system. + FileSystemId *string `mandatory:"true" json:"fileSystemId"` + + // The OCID of this export. + Id *string `mandatory:"true" json:"id"` + + // The current state of this export. + LifecycleState ExportSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Path used to access the associated file system. + // Avoid entering confidential information. + // Example: `/mediafiles` + Path *string `mandatory:"true" json:"path"` + + // The date and time the export was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m ExportSummary) String() string { + return common.PointerString(m) +} + +// ExportSummaryLifecycleStateEnum Enum with underlying type: string +type ExportSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for ExportSummaryLifecycleState +const ( + ExportSummaryLifecycleStateCreating ExportSummaryLifecycleStateEnum = "CREATING" + ExportSummaryLifecycleStateActive ExportSummaryLifecycleStateEnum = "ACTIVE" + ExportSummaryLifecycleStateDeleting ExportSummaryLifecycleStateEnum = "DELETING" + ExportSummaryLifecycleStateDeleted ExportSummaryLifecycleStateEnum = "DELETED" +) + +var mappingExportSummaryLifecycleState = map[string]ExportSummaryLifecycleStateEnum{ + "CREATING": ExportSummaryLifecycleStateCreating, + "ACTIVE": ExportSummaryLifecycleStateActive, + "DELETING": ExportSummaryLifecycleStateDeleting, + "DELETED": ExportSummaryLifecycleStateDeleted, +} + +// GetExportSummaryLifecycleStateEnumValues Enumerates the set of values for ExportSummaryLifecycleState +func GetExportSummaryLifecycleStateEnumValues() []ExportSummaryLifecycleStateEnum { + values := make([]ExportSummaryLifecycleStateEnum, 0) + for _, v := range mappingExportSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go new file mode 100644 index 000000000..93d4547a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// FileSystem An NFS file system. To allow access to a file system, add it +// to an export set and associate the export set with a mount +// target. The same file system can be in multiple export sets and +// associated with multiple mount targets. +// To use any of the API operations, you must be authorized in an +// IAM policy. If you're not authorized, talk to an +// administrator. If you're an administrator who needs to write +// policies to give users access, see Getting Started with +// Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type FileSystem struct { + + // The number of bytes consumed by the file system, including + // any snapshots. This number reflects the metered size of the file + // system and is updated asynchronously with respect to + // updates to the file system. + MeteredBytes *int `mandatory:"true" json:"meteredBytes"` + + // The OCID of the compartment that contains the file system. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My file system` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the file system. + Id *string `mandatory:"true" json:"id"` + + // The current state of the file system. + LifecycleState FileSystemLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the file system was created, expressed in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The availability domain the file system is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` +} + +func (m FileSystem) String() string { + return common.PointerString(m) +} + +// FileSystemLifecycleStateEnum Enum with underlying type: string +type FileSystemLifecycleStateEnum string + +// Set of constants representing the allowable values for FileSystemLifecycleState +const ( + FileSystemLifecycleStateCreating FileSystemLifecycleStateEnum = "CREATING" + FileSystemLifecycleStateActive FileSystemLifecycleStateEnum = "ACTIVE" + FileSystemLifecycleStateDeleting FileSystemLifecycleStateEnum = "DELETING" + FileSystemLifecycleStateDeleted FileSystemLifecycleStateEnum = "DELETED" +) + +var mappingFileSystemLifecycleState = map[string]FileSystemLifecycleStateEnum{ + "CREATING": FileSystemLifecycleStateCreating, + "ACTIVE": FileSystemLifecycleStateActive, + "DELETING": FileSystemLifecycleStateDeleting, + "DELETED": FileSystemLifecycleStateDeleted, +} + +// GetFileSystemLifecycleStateEnumValues Enumerates the set of values for FileSystemLifecycleState +func GetFileSystemLifecycleStateEnumValues() []FileSystemLifecycleStateEnum { + values := make([]FileSystemLifecycleStateEnum, 0) + for _, v := range mappingFileSystemLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go new file mode 100644 index 000000000..e4f36b816 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// FileSystemSummary Summary information for a file system. +type FileSystemSummary struct { + + // The number of bytes consumed by the file system, including + // any snapshots. This number reflects the metered size of the file + // system and is updated asynchronously with respect to + // updates to the file system. + MeteredBytes *int `mandatory:"true" json:"meteredBytes"` + + // The OCID of the compartment that contains the file system. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My file system` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the file system. + Id *string `mandatory:"true" json:"id"` + + // The current state of the file system. + LifecycleState FileSystemSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the file system was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The availability domain the file system is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` +} + +func (m FileSystemSummary) String() string { + return common.PointerString(m) +} + +// FileSystemSummaryLifecycleStateEnum Enum with underlying type: string +type FileSystemSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for FileSystemSummaryLifecycleState +const ( + FileSystemSummaryLifecycleStateCreating FileSystemSummaryLifecycleStateEnum = "CREATING" + FileSystemSummaryLifecycleStateActive FileSystemSummaryLifecycleStateEnum = "ACTIVE" + FileSystemSummaryLifecycleStateDeleting FileSystemSummaryLifecycleStateEnum = "DELETING" + FileSystemSummaryLifecycleStateDeleted FileSystemSummaryLifecycleStateEnum = "DELETED" +) + +var mappingFileSystemSummaryLifecycleState = map[string]FileSystemSummaryLifecycleStateEnum{ + "CREATING": FileSystemSummaryLifecycleStateCreating, + "ACTIVE": FileSystemSummaryLifecycleStateActive, + "DELETING": FileSystemSummaryLifecycleStateDeleting, + "DELETED": FileSystemSummaryLifecycleStateDeleted, +} + +// GetFileSystemSummaryLifecycleStateEnumValues Enumerates the set of values for FileSystemSummaryLifecycleState +func GetFileSystemSummaryLifecycleStateEnumValues() []FileSystemSummaryLifecycleStateEnum { + values := make([]FileSystemSummaryLifecycleStateEnum, 0) + for _, v := range mappingFileSystemSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go new file mode 100644 index 000000000..4439b13e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go @@ -0,0 +1,934 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//FileStorageClient a client for FileStorage +type FileStorageClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewFileStorageClientWithConfigurationProvider Creates a new default FileStorage client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewFileStorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FileStorageClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = FileStorageClient{BaseClient: baseClient} + client.BasePath = "20171215" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *FileStorageClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "filestorage", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *FileStorageClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *FileStorageClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateExport Creates a new export in the specified export set, path, and +// file system. +func (client FileStorageClient) CreateExport(ctx context.Context, request CreateExportRequest) (response CreateExportResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createExport, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateExportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateExportResponse") + } + return +} + +// createExport implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createExport(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/exports") + if err != nil { + return nil, err + } + + var response CreateExportResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateFileSystem Creates a new file system in the specified compartment and +// availability domain. Instances can mount file systems in +// another availability domain, but doing so might increase +// latency when compared to mounting instances in the same +// availability domain. +// After you create a file system, you can associate it with a mount +// target. Instances can then mount the file system by connecting to the +// mount target's IP address. You can associate a file system with +// more than one mount target at a time. +// For information about access control and compartments, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about availability domains, see Regions and +// Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the +// `ListAvailabilityDomains` operation in the Identity and Access +// Management Service API. +// All Oracle Cloud Infrastructure resources, including +// file systems, get an Oracle-assigned, unique ID called an Oracle +// Cloud Identifier (OCID). When you create a resource, you can +// find its OCID in the response. You can also retrieve a +// resource's OCID by using a List API operation on that resource +// type or by viewing the resource in the Console. +func (client FileStorageClient) CreateFileSystem(ctx context.Context, request CreateFileSystemRequest) (response CreateFileSystemResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createFileSystem, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateFileSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateFileSystemResponse") + } + return +} + +// createFileSystem implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems") + if err != nil { + return nil, err + } + + var response CreateFileSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMountTarget Creates a new mount target in the specified compartment and +// subnet. You can associate a file system with a mount +// target only when they exist in the same availability domain. Instances +// can connect to mount targets in another availablity domain, but +// you might see higher latency than with instances in the same +// availability domain as the mount target. +// Mount targets have one or more private IP addresses that you can +// provide as the host portion of remote target parameters in +// client mount commands. These private IP addresses are listed +// in the privateIpIds property of the mount target and are highly available. Mount +// targets also consume additional IP addresses in their subnet. +// Do not use /30 or smaller subnets for mount target creation because they +// do not have sufficient available IP addresses. +// Allow at least three IP addresses for each mount target. +// For information about access control and compartments, see +// Overview of the IAM +// Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about availability domains, see Regions and +// Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the +// `ListAvailabilityDomains` operation in the Identity and Access +// Management Service API. +// All Oracle Cloud Infrastructure Services resources, including +// mount targets, get an Oracle-assigned, unique ID called an +// Oracle Cloud Identifier (OCID). When you create a resource, +// you can find its OCID in the response. You can also retrieve a +// resource's OCID by using a List API operation on that resource +// type, or by viewing the resource in the Console. +func (client FileStorageClient) CreateMountTarget(ctx context.Context, request CreateMountTargetRequest) (response CreateMountTargetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createMountTarget, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateMountTargetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMountTargetResponse") + } + return +} + +// createMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets") + if err != nil { + return nil, err + } + + var response CreateMountTargetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSnapshot Creates a new snapshot of the specified file system. You +// can access the snapshot at `.snapshot/`. +func (client FileStorageClient) CreateSnapshot(ctx context.Context, request CreateSnapshotRequest) (response CreateSnapshotResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createSnapshot, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateSnapshotResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSnapshotResponse") + } + return +} + +// createSnapshot implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createSnapshot(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/snapshots") + if err != nil { + return nil, err + } + + var response CreateSnapshotResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteExport Deletes the specified export. +func (client FileStorageClient) DeleteExport(ctx context.Context, request DeleteExportRequest) (response DeleteExportResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteExport, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteExportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteExportResponse") + } + return +} + +// deleteExport implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteExport(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/exports/{exportId}") + if err != nil { + return nil, err + } + + var response DeleteExportResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteFileSystem Deletes the specified file system. Before you delete the file system, +// verify that no remaining export resources still reference it. Deleting a +// file system also deletes all of its snapshots. +func (client FileStorageClient) DeleteFileSystem(ctx context.Context, request DeleteFileSystemRequest) (response DeleteFileSystemResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteFileSystem, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteFileSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteFileSystemResponse") + } + return +} + +// deleteFileSystem implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fileSystems/{fileSystemId}") + if err != nil { + return nil, err + } + + var response DeleteFileSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMountTarget Deletes the specified mount target. This operation also deletes the +// mount target's VNICs. +func (client FileStorageClient) DeleteMountTarget(ctx context.Context, request DeleteMountTargetRequest) (response DeleteMountTargetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteMountTarget, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteMountTargetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMountTargetResponse") + } + return +} + +// deleteMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/mountTargets/{mountTargetId}") + if err != nil { + return nil, err + } + + var response DeleteMountTargetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSnapshot Deletes the specified snapshot. +func (client FileStorageClient) DeleteSnapshot(ctx context.Context, request DeleteSnapshotRequest) (response DeleteSnapshotResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSnapshot, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteSnapshotResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSnapshotResponse") + } + return +} + +// deleteSnapshot implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteSnapshot(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/snapshots/{snapshotId}") + if err != nil { + return nil, err + } + + var response DeleteSnapshotResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExport Gets the specified export's information. +func (client FileStorageClient) GetExport(ctx context.Context, request GetExportRequest) (response GetExportResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getExport, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetExportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExportResponse") + } + return +} + +// getExport implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getExport(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports/{exportId}") + if err != nil { + return nil, err + } + + var response GetExportResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExportSet Gets the specified export set's information. +func (client FileStorageClient) GetExportSet(ctx context.Context, request GetExportSetRequest) (response GetExportSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getExportSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetExportSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExportSetResponse") + } + return +} + +// getExportSet implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getExportSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets/{exportSetId}") + if err != nil { + return nil, err + } + + var response GetExportSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFileSystem Gets the specified file system's information. +func (client FileStorageClient) GetFileSystem(ctx context.Context, request GetFileSystemRequest) (response GetFileSystemResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getFileSystem, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetFileSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFileSystemResponse") + } + return +} + +// getFileSystem implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems/{fileSystemId}") + if err != nil { + return nil, err + } + + var response GetFileSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMountTarget Gets the specified mount target's information. +func (client FileStorageClient) GetMountTarget(ctx context.Context, request GetMountTargetRequest) (response GetMountTargetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getMountTarget, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetMountTargetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMountTargetResponse") + } + return +} + +// getMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets/{mountTargetId}") + if err != nil { + return nil, err + } + + var response GetMountTargetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSnapshot Gets the specified snapshot's information. +func (client FileStorageClient) GetSnapshot(ctx context.Context, request GetSnapshotRequest) (response GetSnapshotResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSnapshot, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetSnapshotResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSnapshotResponse") + } + return +} + +// getSnapshot implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getSnapshot(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots/{snapshotId}") + if err != nil { + return nil, err + } + + var response GetSnapshotResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListExportSets Lists the export set resources in the specified compartment. +func (client FileStorageClient) ListExportSets(ctx context.Context, request ListExportSetsRequest) (response ListExportSetsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listExportSets, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListExportSetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListExportSetsResponse") + } + return +} + +// listExportSets implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listExportSets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets") + if err != nil { + return nil, err + } + + var response ListExportSetsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListExports Lists export resources by compartment, file system, or export +// set. You must specify an export set ID, a file system ID, and +// / or a compartment ID. +func (client FileStorageClient) ListExports(ctx context.Context, request ListExportsRequest) (response ListExportsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listExports, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListExportsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListExportsResponse") + } + return +} + +// listExports implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listExports(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports") + if err != nil { + return nil, err + } + + var response ListExportsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFileSystems Lists the file system resources in the specified compartment. +func (client FileStorageClient) ListFileSystems(ctx context.Context, request ListFileSystemsRequest) (response ListFileSystemsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listFileSystems, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListFileSystemsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFileSystemsResponse") + } + return +} + +// listFileSystems implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listFileSystems(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems") + if err != nil { + return nil, err + } + + var response ListFileSystemsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListMountTargets Lists the mount target resources in the specified compartment. +func (client FileStorageClient) ListMountTargets(ctx context.Context, request ListMountTargetsRequest) (response ListMountTargetsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listMountTargets, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListMountTargetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMountTargetsResponse") + } + return +} + +// listMountTargets implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listMountTargets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets") + if err != nil { + return nil, err + } + + var response ListMountTargetsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSnapshots Lists snapshots of the specified file system. +func (client FileStorageClient) ListSnapshots(ctx context.Context, request ListSnapshotsRequest) (response ListSnapshotsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSnapshots, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListSnapshotsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSnapshotsResponse") + } + return +} + +// listSnapshots implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listSnapshots(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots") + if err != nil { + return nil, err + } + + var response ListSnapshotsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateExportSet Updates the specified export set's information. +func (client FileStorageClient) UpdateExportSet(ctx context.Context, request UpdateExportSetRequest) (response UpdateExportSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateExportSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateExportSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateExportSetResponse") + } + return +} + +// updateExportSet implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) updateExportSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/exportSets/{exportSetId}") + if err != nil { + return nil, err + } + + var response UpdateExportSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateFileSystem Updates the specified file system's information. +// You can use this operation to rename a file system. +func (client FileStorageClient) UpdateFileSystem(ctx context.Context, request UpdateFileSystemRequest) (response UpdateFileSystemResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateFileSystem, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateFileSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateFileSystemResponse") + } + return +} + +// updateFileSystem implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) updateFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fileSystems/{fileSystemId}") + if err != nil { + return nil, err + } + + var response UpdateFileSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateMountTarget Updates the specified mount target's information. +func (client FileStorageClient) UpdateMountTarget(ctx context.Context, request UpdateMountTargetRequest) (response UpdateMountTargetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateMountTarget, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateMountTargetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateMountTargetResponse") + } + return +} + +// updateMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) updateMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/mountTargets/{mountTargetId}") + if err != nil { + return nil, err + } + + var response UpdateMountTargetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go new file mode 100644 index 000000000..f5facbfd0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetExportRequest wrapper for the GetExport operation +type GetExportRequest struct { + + // The OCID of the export. + ExportId *string `mandatory:"true" contributesTo:"path" name:"exportId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetExportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExportRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExportRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetExportResponse wrapper for the GetExport operation +type GetExportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Export instance + Export `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetExportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go new file mode 100644 index 000000000..38d4b73b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetExportSetRequest wrapper for the GetExportSet operation +type GetExportSetRequest struct { + + // The OCID of the export set. + ExportSetId *string `mandatory:"true" contributesTo:"path" name:"exportSetId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetExportSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExportSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExportSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetExportSetResponse wrapper for the GetExportSet operation +type GetExportSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportSet instance + ExportSet `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetExportSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExportSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go new file mode 100644 index 000000000..2c0007c34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetFileSystemRequest wrapper for the GetFileSystem operation +type GetFileSystemRequest struct { + + // The OCID of the file system. + FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetFileSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFileSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetFileSystemResponse wrapper for the GetFileSystem operation +type GetFileSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FileSystem instance + FileSystem `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFileSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFileSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go new file mode 100644 index 000000000..5ad050f3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetMountTargetRequest wrapper for the GetMountTarget operation +type GetMountTargetRequest struct { + + // The OCID of the mount target. + MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetMountTargetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetMountTargetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetMountTargetResponse wrapper for the GetMountTarget operation +type GetMountTargetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MountTarget instance + MountTarget `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetMountTargetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetMountTargetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go new file mode 100644 index 000000000..87c4d5cbc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetSnapshotRequest wrapper for the GetSnapshot operation +type GetSnapshotRequest struct { + + // The OCID of the snapshot. + SnapshotId *string `mandatory:"true" contributesTo:"path" name:"snapshotId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSnapshotRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSnapshotRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSnapshotRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetSnapshotResponse wrapper for the GetSnapshot operation +type GetSnapshotResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Snapshot instance + Snapshot `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSnapshotResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSnapshotResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go new file mode 100644 index 000000000..c95801ca3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go @@ -0,0 +1,177 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListExportSetsRequest wrapper for the ListExportSets operation +type ListExportSetsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Example: `My resource` + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Filter results by the specified lifecycle state. Must be a valid + // state for the resource type. + LifecycleState ListExportSetsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Filter results by OCID. Must be an OCID of the correct type for + // the resouce type. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The field to sort by. You can provide either value, but not both. + // By default, when you sort by time created, results are shown + // in descending order. When you sort by display name, results are + // shown in ascending order. + SortBy ListExportSetsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc', where 'asc' is + // ascending and 'desc' is descending. + SortOrder ListExportSetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListExportSetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListExportSetsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListExportSetsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListExportSetsResponse wrapper for the ListExportSets operation +type ListExportSetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ExportSetSummary instances + Items []ExportSetSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through + // a list, if this header appears in the response, then a + // partial list might have been returned. Include this + // value as the `page` parameter for the subsequent GET + // request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListExportSetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListExportSetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListExportSetsLifecycleStateEnum Enum with underlying type: string +type ListExportSetsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListExportSetsLifecycleState +const ( + ListExportSetsLifecycleStateCreating ListExportSetsLifecycleStateEnum = "CREATING" + ListExportSetsLifecycleStateActive ListExportSetsLifecycleStateEnum = "ACTIVE" + ListExportSetsLifecycleStateDeleting ListExportSetsLifecycleStateEnum = "DELETING" + ListExportSetsLifecycleStateDeleted ListExportSetsLifecycleStateEnum = "DELETED" + ListExportSetsLifecycleStateFailed ListExportSetsLifecycleStateEnum = "FAILED" +) + +var mappingListExportSetsLifecycleState = map[string]ListExportSetsLifecycleStateEnum{ + "CREATING": ListExportSetsLifecycleStateCreating, + "ACTIVE": ListExportSetsLifecycleStateActive, + "DELETING": ListExportSetsLifecycleStateDeleting, + "DELETED": ListExportSetsLifecycleStateDeleted, + "FAILED": ListExportSetsLifecycleStateFailed, +} + +// GetListExportSetsLifecycleStateEnumValues Enumerates the set of values for ListExportSetsLifecycleState +func GetListExportSetsLifecycleStateEnumValues() []ListExportSetsLifecycleStateEnum { + values := make([]ListExportSetsLifecycleStateEnum, 0) + for _, v := range mappingListExportSetsLifecycleState { + values = append(values, v) + } + return values +} + +// ListExportSetsSortByEnum Enum with underlying type: string +type ListExportSetsSortByEnum string + +// Set of constants representing the allowable values for ListExportSetsSortBy +const ( + ListExportSetsSortByTimecreated ListExportSetsSortByEnum = "TIMECREATED" + ListExportSetsSortByDisplayname ListExportSetsSortByEnum = "DISPLAYNAME" +) + +var mappingListExportSetsSortBy = map[string]ListExportSetsSortByEnum{ + "TIMECREATED": ListExportSetsSortByTimecreated, + "DISPLAYNAME": ListExportSetsSortByDisplayname, +} + +// GetListExportSetsSortByEnumValues Enumerates the set of values for ListExportSetsSortBy +func GetListExportSetsSortByEnumValues() []ListExportSetsSortByEnum { + values := make([]ListExportSetsSortByEnum, 0) + for _, v := range mappingListExportSetsSortBy { + values = append(values, v) + } + return values +} + +// ListExportSetsSortOrderEnum Enum with underlying type: string +type ListExportSetsSortOrderEnum string + +// Set of constants representing the allowable values for ListExportSetsSortOrder +const ( + ListExportSetsSortOrderAsc ListExportSetsSortOrderEnum = "ASC" + ListExportSetsSortOrderDesc ListExportSetsSortOrderEnum = "DESC" +) + +var mappingListExportSetsSortOrder = map[string]ListExportSetsSortOrderEnum{ + "ASC": ListExportSetsSortOrderAsc, + "DESC": ListExportSetsSortOrderDesc, +} + +// GetListExportSetsSortOrderEnumValues Enumerates the set of values for ListExportSetsSortOrder +func GetListExportSetsSortOrderEnumValues() []ListExportSetsSortOrderEnum { + values := make([]ListExportSetsSortOrderEnum, 0) + for _, v := range mappingListExportSetsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go new file mode 100644 index 000000000..681e3c23a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListExportsRequest wrapper for the ListExports operation +type ListExportsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the export set. + ExportSetId *string `mandatory:"false" contributesTo:"query" name:"exportSetId"` + + // The OCID of the file system. + FileSystemId *string `mandatory:"false" contributesTo:"query" name:"fileSystemId"` + + // Filter results by the specified lifecycle state. Must be a valid + // state for the resource type. + LifecycleState ListExportsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Filter results by OCID. Must be an OCID of the correct type for + // the resouce type. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The field to sort by. You can provide either value, but not both. + // By default, when you sort by time created, results are shown + // in descending order. When you sort by path, results are + // shown in ascending alphanumeric order. + SortBy ListExportsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc', where 'asc' is + // ascending and 'desc' is descending. + SortOrder ListExportsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListExportsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListExportsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListExportsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListExportsResponse wrapper for the ListExports operation +type ListExportsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ExportSummary instances + Items []ExportSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through + // a list, if this header appears in the response, then a + // partial list might have been returned. Include this + // value as the `page` parameter for the subsequent GET + // request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListExportsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListExportsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListExportsLifecycleStateEnum Enum with underlying type: string +type ListExportsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListExportsLifecycleState +const ( + ListExportsLifecycleStateCreating ListExportsLifecycleStateEnum = "CREATING" + ListExportsLifecycleStateActive ListExportsLifecycleStateEnum = "ACTIVE" + ListExportsLifecycleStateDeleting ListExportsLifecycleStateEnum = "DELETING" + ListExportsLifecycleStateDeleted ListExportsLifecycleStateEnum = "DELETED" + ListExportsLifecycleStateFailed ListExportsLifecycleStateEnum = "FAILED" +) + +var mappingListExportsLifecycleState = map[string]ListExportsLifecycleStateEnum{ + "CREATING": ListExportsLifecycleStateCreating, + "ACTIVE": ListExportsLifecycleStateActive, + "DELETING": ListExportsLifecycleStateDeleting, + "DELETED": ListExportsLifecycleStateDeleted, + "FAILED": ListExportsLifecycleStateFailed, +} + +// GetListExportsLifecycleStateEnumValues Enumerates the set of values for ListExportsLifecycleState +func GetListExportsLifecycleStateEnumValues() []ListExportsLifecycleStateEnum { + values := make([]ListExportsLifecycleStateEnum, 0) + for _, v := range mappingListExportsLifecycleState { + values = append(values, v) + } + return values +} + +// ListExportsSortByEnum Enum with underlying type: string +type ListExportsSortByEnum string + +// Set of constants representing the allowable values for ListExportsSortBy +const ( + ListExportsSortByTimecreated ListExportsSortByEnum = "TIMECREATED" + ListExportsSortByPath ListExportsSortByEnum = "PATH" +) + +var mappingListExportsSortBy = map[string]ListExportsSortByEnum{ + "TIMECREATED": ListExportsSortByTimecreated, + "PATH": ListExportsSortByPath, +} + +// GetListExportsSortByEnumValues Enumerates the set of values for ListExportsSortBy +func GetListExportsSortByEnumValues() []ListExportsSortByEnum { + values := make([]ListExportsSortByEnum, 0) + for _, v := range mappingListExportsSortBy { + values = append(values, v) + } + return values +} + +// ListExportsSortOrderEnum Enum with underlying type: string +type ListExportsSortOrderEnum string + +// Set of constants representing the allowable values for ListExportsSortOrder +const ( + ListExportsSortOrderAsc ListExportsSortOrderEnum = "ASC" + ListExportsSortOrderDesc ListExportsSortOrderEnum = "DESC" +) + +var mappingListExportsSortOrder = map[string]ListExportsSortOrderEnum{ + "ASC": ListExportsSortOrderAsc, + "DESC": ListExportsSortOrderDesc, +} + +// GetListExportsSortOrderEnumValues Enumerates the set of values for ListExportsSortOrder +func GetListExportsSortOrderEnumValues() []ListExportsSortOrderEnum { + values := make([]ListExportsSortOrderEnum, 0) + for _, v := range mappingListExportsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go new file mode 100644 index 000000000..058e91c02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go @@ -0,0 +1,177 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListFileSystemsRequest wrapper for the ListFileSystems operation +type ListFileSystemsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Example: `My resource` + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Filter results by the specified lifecycle state. Must be a valid + // state for the resource type. + LifecycleState ListFileSystemsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Filter results by OCID. Must be an OCID of the correct type for + // the resouce type. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The field to sort by. You can provide either value, but not both. + // By default, when you sort by time created, results are shown + // in descending order. When you sort by display name, results are + // shown in ascending order. + SortBy ListFileSystemsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc', where 'asc' is + // ascending and 'desc' is descending. + SortOrder ListFileSystemsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListFileSystemsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFileSystemsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFileSystemsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListFileSystemsResponse wrapper for the ListFileSystems operation +type ListFileSystemsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []FileSystemSummary instances + Items []FileSystemSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through + // a list, if this header appears in the response, then a + // partial list might have been returned. Include this + // value as the `page` parameter for the subsequent GET + // request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListFileSystemsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFileSystemsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListFileSystemsLifecycleStateEnum Enum with underlying type: string +type ListFileSystemsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListFileSystemsLifecycleState +const ( + ListFileSystemsLifecycleStateCreating ListFileSystemsLifecycleStateEnum = "CREATING" + ListFileSystemsLifecycleStateActive ListFileSystemsLifecycleStateEnum = "ACTIVE" + ListFileSystemsLifecycleStateDeleting ListFileSystemsLifecycleStateEnum = "DELETING" + ListFileSystemsLifecycleStateDeleted ListFileSystemsLifecycleStateEnum = "DELETED" + ListFileSystemsLifecycleStateFailed ListFileSystemsLifecycleStateEnum = "FAILED" +) + +var mappingListFileSystemsLifecycleState = map[string]ListFileSystemsLifecycleStateEnum{ + "CREATING": ListFileSystemsLifecycleStateCreating, + "ACTIVE": ListFileSystemsLifecycleStateActive, + "DELETING": ListFileSystemsLifecycleStateDeleting, + "DELETED": ListFileSystemsLifecycleStateDeleted, + "FAILED": ListFileSystemsLifecycleStateFailed, +} + +// GetListFileSystemsLifecycleStateEnumValues Enumerates the set of values for ListFileSystemsLifecycleState +func GetListFileSystemsLifecycleStateEnumValues() []ListFileSystemsLifecycleStateEnum { + values := make([]ListFileSystemsLifecycleStateEnum, 0) + for _, v := range mappingListFileSystemsLifecycleState { + values = append(values, v) + } + return values +} + +// ListFileSystemsSortByEnum Enum with underlying type: string +type ListFileSystemsSortByEnum string + +// Set of constants representing the allowable values for ListFileSystemsSortBy +const ( + ListFileSystemsSortByTimecreated ListFileSystemsSortByEnum = "TIMECREATED" + ListFileSystemsSortByDisplayname ListFileSystemsSortByEnum = "DISPLAYNAME" +) + +var mappingListFileSystemsSortBy = map[string]ListFileSystemsSortByEnum{ + "TIMECREATED": ListFileSystemsSortByTimecreated, + "DISPLAYNAME": ListFileSystemsSortByDisplayname, +} + +// GetListFileSystemsSortByEnumValues Enumerates the set of values for ListFileSystemsSortBy +func GetListFileSystemsSortByEnumValues() []ListFileSystemsSortByEnum { + values := make([]ListFileSystemsSortByEnum, 0) + for _, v := range mappingListFileSystemsSortBy { + values = append(values, v) + } + return values +} + +// ListFileSystemsSortOrderEnum Enum with underlying type: string +type ListFileSystemsSortOrderEnum string + +// Set of constants representing the allowable values for ListFileSystemsSortOrder +const ( + ListFileSystemsSortOrderAsc ListFileSystemsSortOrderEnum = "ASC" + ListFileSystemsSortOrderDesc ListFileSystemsSortOrderEnum = "DESC" +) + +var mappingListFileSystemsSortOrder = map[string]ListFileSystemsSortOrderEnum{ + "ASC": ListFileSystemsSortOrderAsc, + "DESC": ListFileSystemsSortOrderDesc, +} + +// GetListFileSystemsSortOrderEnumValues Enumerates the set of values for ListFileSystemsSortOrder +func GetListFileSystemsSortOrderEnumValues() []ListFileSystemsSortOrderEnum { + values := make([]ListFileSystemsSortOrderEnum, 0) + for _, v := range mappingListFileSystemsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go new file mode 100644 index 000000000..b92471345 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go @@ -0,0 +1,180 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListMountTargetsRequest wrapper for the ListMountTargets operation +type ListMountTargetsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Example: `My resource` + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The OCID of the export set. + ExportSetId *string `mandatory:"false" contributesTo:"query" name:"exportSetId"` + + // Filter results by the specified lifecycle state. Must be a valid + // state for the resource type. + LifecycleState ListMountTargetsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Filter results by OCID. Must be an OCID of the correct type for + // the resouce type. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The field to sort by. You can choose either value, but not both. + // By default, when you sort by time created, results are shown + // in descending order. When you sort by display name, results are + // shown in ascending order. + SortBy ListMountTargetsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc', where 'asc' is + // ascending and 'desc' is descending. + SortOrder ListMountTargetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListMountTargetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMountTargetsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMountTargetsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListMountTargetsResponse wrapper for the ListMountTargets operation +type ListMountTargetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []MountTargetSummary instances + Items []MountTargetSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through + // a list, if this header appears in the response, then a + // partial list might have been returned. Include this + // value as the `page` parameter for the subsequent GET + // request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListMountTargetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMountTargetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListMountTargetsLifecycleStateEnum Enum with underlying type: string +type ListMountTargetsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListMountTargetsLifecycleState +const ( + ListMountTargetsLifecycleStateCreating ListMountTargetsLifecycleStateEnum = "CREATING" + ListMountTargetsLifecycleStateActive ListMountTargetsLifecycleStateEnum = "ACTIVE" + ListMountTargetsLifecycleStateDeleting ListMountTargetsLifecycleStateEnum = "DELETING" + ListMountTargetsLifecycleStateDeleted ListMountTargetsLifecycleStateEnum = "DELETED" + ListMountTargetsLifecycleStateFailed ListMountTargetsLifecycleStateEnum = "FAILED" +) + +var mappingListMountTargetsLifecycleState = map[string]ListMountTargetsLifecycleStateEnum{ + "CREATING": ListMountTargetsLifecycleStateCreating, + "ACTIVE": ListMountTargetsLifecycleStateActive, + "DELETING": ListMountTargetsLifecycleStateDeleting, + "DELETED": ListMountTargetsLifecycleStateDeleted, + "FAILED": ListMountTargetsLifecycleStateFailed, +} + +// GetListMountTargetsLifecycleStateEnumValues Enumerates the set of values for ListMountTargetsLifecycleState +func GetListMountTargetsLifecycleStateEnumValues() []ListMountTargetsLifecycleStateEnum { + values := make([]ListMountTargetsLifecycleStateEnum, 0) + for _, v := range mappingListMountTargetsLifecycleState { + values = append(values, v) + } + return values +} + +// ListMountTargetsSortByEnum Enum with underlying type: string +type ListMountTargetsSortByEnum string + +// Set of constants representing the allowable values for ListMountTargetsSortBy +const ( + ListMountTargetsSortByTimecreated ListMountTargetsSortByEnum = "TIMECREATED" + ListMountTargetsSortByDisplayname ListMountTargetsSortByEnum = "DISPLAYNAME" +) + +var mappingListMountTargetsSortBy = map[string]ListMountTargetsSortByEnum{ + "TIMECREATED": ListMountTargetsSortByTimecreated, + "DISPLAYNAME": ListMountTargetsSortByDisplayname, +} + +// GetListMountTargetsSortByEnumValues Enumerates the set of values for ListMountTargetsSortBy +func GetListMountTargetsSortByEnumValues() []ListMountTargetsSortByEnum { + values := make([]ListMountTargetsSortByEnum, 0) + for _, v := range mappingListMountTargetsSortBy { + values = append(values, v) + } + return values +} + +// ListMountTargetsSortOrderEnum Enum with underlying type: string +type ListMountTargetsSortOrderEnum string + +// Set of constants representing the allowable values for ListMountTargetsSortOrder +const ( + ListMountTargetsSortOrderAsc ListMountTargetsSortOrderEnum = "ASC" + ListMountTargetsSortOrderDesc ListMountTargetsSortOrderEnum = "DESC" +) + +var mappingListMountTargetsSortOrder = map[string]ListMountTargetsSortOrderEnum{ + "ASC": ListMountTargetsSortOrderAsc, + "DESC": ListMountTargetsSortOrderDesc, +} + +// GetListMountTargetsSortOrderEnumValues Enumerates the set of values for ListMountTargetsSortOrder +func GetListMountTargetsSortOrderEnumValues() []ListMountTargetsSortOrderEnum { + values := make([]ListMountTargetsSortOrderEnum, 0) + for _, v := range mappingListMountTargetsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go new file mode 100644 index 000000000..a7458495d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go @@ -0,0 +1,140 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListSnapshotsRequest wrapper for the ListSnapshots operation +type ListSnapshotsRequest struct { + + // The OCID of the file system. + FileSystemId *string `mandatory:"true" contributesTo:"query" name:"fileSystemId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Filter results by the specified lifecycle state. Must be a valid + // state for the resource type. + LifecycleState ListSnapshotsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Filter results by OCID. Must be an OCID of the correct type for + // the resouce type. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The sort order to use, either 'asc' or 'desc', where 'asc' is + // ascending and 'desc' is descending. + SortOrder ListSnapshotsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSnapshotsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSnapshotsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSnapshotsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListSnapshotsResponse wrapper for the ListSnapshots operation +type ListSnapshotsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []SnapshotSummary instances + Items []SnapshotSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through + // a list, if this header appears in the response, then a + // partial list might have been returned. Include this + // value as the `page` parameter for the subsequent GET + // request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListSnapshotsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSnapshotsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSnapshotsLifecycleStateEnum Enum with underlying type: string +type ListSnapshotsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListSnapshotsLifecycleState +const ( + ListSnapshotsLifecycleStateCreating ListSnapshotsLifecycleStateEnum = "CREATING" + ListSnapshotsLifecycleStateActive ListSnapshotsLifecycleStateEnum = "ACTIVE" + ListSnapshotsLifecycleStateDeleting ListSnapshotsLifecycleStateEnum = "DELETING" + ListSnapshotsLifecycleStateDeleted ListSnapshotsLifecycleStateEnum = "DELETED" + ListSnapshotsLifecycleStateFailed ListSnapshotsLifecycleStateEnum = "FAILED" +) + +var mappingListSnapshotsLifecycleState = map[string]ListSnapshotsLifecycleStateEnum{ + "CREATING": ListSnapshotsLifecycleStateCreating, + "ACTIVE": ListSnapshotsLifecycleStateActive, + "DELETING": ListSnapshotsLifecycleStateDeleting, + "DELETED": ListSnapshotsLifecycleStateDeleted, + "FAILED": ListSnapshotsLifecycleStateFailed, +} + +// GetListSnapshotsLifecycleStateEnumValues Enumerates the set of values for ListSnapshotsLifecycleState +func GetListSnapshotsLifecycleStateEnumValues() []ListSnapshotsLifecycleStateEnum { + values := make([]ListSnapshotsLifecycleStateEnum, 0) + for _, v := range mappingListSnapshotsLifecycleState { + values = append(values, v) + } + return values +} + +// ListSnapshotsSortOrderEnum Enum with underlying type: string +type ListSnapshotsSortOrderEnum string + +// Set of constants representing the allowable values for ListSnapshotsSortOrder +const ( + ListSnapshotsSortOrderAsc ListSnapshotsSortOrderEnum = "ASC" + ListSnapshotsSortOrderDesc ListSnapshotsSortOrderEnum = "DESC" +) + +var mappingListSnapshotsSortOrder = map[string]ListSnapshotsSortOrderEnum{ + "ASC": ListSnapshotsSortOrderAsc, + "DESC": ListSnapshotsSortOrderDesc, +} + +// GetListSnapshotsSortOrderEnumValues Enumerates the set of values for ListSnapshotsSortOrder +func GetListSnapshotsSortOrderEnumValues() []ListSnapshotsSortOrderEnum { + values := make([]ListSnapshotsSortOrderEnum, 0) + for _, v := range mappingListSnapshotsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go new file mode 100644 index 000000000..09868aef9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// MountTarget Provides access to a collection of file systems through one or more VNICs on a +// specified subnet. The set of file systems is controlled through the +// referenced export set. +type MountTarget struct { + + // The OCID of the compartment that contains the mount target. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My mount target` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the mount target. + Id *string `mandatory:"true" json:"id"` + + // Additional information about the current 'lifecycleState'. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The current state of the mount target. + LifecycleState MountTargetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCIDs of the private IP addresses associated with this mount target. + PrivateIpIds []string `mandatory:"true" json:"privateIpIds"` + + // The OCID of the subnet the mount target is in. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The date and time the mount target was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The availability domain the mount target is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the associated export set. Controls what file + // systems will be exported through Network File System (NFS) protocol on this + // mount target. + ExportSetId *string `mandatory:"false" json:"exportSetId"` +} + +func (m MountTarget) String() string { + return common.PointerString(m) +} + +// MountTargetLifecycleStateEnum Enum with underlying type: string +type MountTargetLifecycleStateEnum string + +// Set of constants representing the allowable values for MountTargetLifecycleState +const ( + MountTargetLifecycleStateCreating MountTargetLifecycleStateEnum = "CREATING" + MountTargetLifecycleStateActive MountTargetLifecycleStateEnum = "ACTIVE" + MountTargetLifecycleStateDeleting MountTargetLifecycleStateEnum = "DELETING" + MountTargetLifecycleStateDeleted MountTargetLifecycleStateEnum = "DELETED" + MountTargetLifecycleStateFailed MountTargetLifecycleStateEnum = "FAILED" +) + +var mappingMountTargetLifecycleState = map[string]MountTargetLifecycleStateEnum{ + "CREATING": MountTargetLifecycleStateCreating, + "ACTIVE": MountTargetLifecycleStateActive, + "DELETING": MountTargetLifecycleStateDeleting, + "DELETED": MountTargetLifecycleStateDeleted, + "FAILED": MountTargetLifecycleStateFailed, +} + +// GetMountTargetLifecycleStateEnumValues Enumerates the set of values for MountTargetLifecycleState +func GetMountTargetLifecycleStateEnumValues() []MountTargetLifecycleStateEnum { + values := make([]MountTargetLifecycleStateEnum, 0) + for _, v := range mappingMountTargetLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go new file mode 100644 index 000000000..b0b0e238c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// MountTargetSummary Summary information for the specified mount target. +type MountTargetSummary struct { + + // The OCID of the compartment that contains the mount target. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My mount target` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the mount target. + Id *string `mandatory:"true" json:"id"` + + // The current state of the mount target. + LifecycleState MountTargetSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCIDs of the private IP addresses associated with this mount target. + PrivateIpIds []string `mandatory:"true" json:"privateIpIds"` + + // The OCID of the subnet the mount target is in. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The date and time the mount target was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The availability domain the mount target is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the associated export set. Controls what file + // systems will be exported using Network File System (NFS) protocol on + // this mount target. + ExportSetId *string `mandatory:"false" json:"exportSetId"` +} + +func (m MountTargetSummary) String() string { + return common.PointerString(m) +} + +// MountTargetSummaryLifecycleStateEnum Enum with underlying type: string +type MountTargetSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for MountTargetSummaryLifecycleState +const ( + MountTargetSummaryLifecycleStateCreating MountTargetSummaryLifecycleStateEnum = "CREATING" + MountTargetSummaryLifecycleStateActive MountTargetSummaryLifecycleStateEnum = "ACTIVE" + MountTargetSummaryLifecycleStateDeleting MountTargetSummaryLifecycleStateEnum = "DELETING" + MountTargetSummaryLifecycleStateDeleted MountTargetSummaryLifecycleStateEnum = "DELETED" + MountTargetSummaryLifecycleStateFailed MountTargetSummaryLifecycleStateEnum = "FAILED" +) + +var mappingMountTargetSummaryLifecycleState = map[string]MountTargetSummaryLifecycleStateEnum{ + "CREATING": MountTargetSummaryLifecycleStateCreating, + "ACTIVE": MountTargetSummaryLifecycleStateActive, + "DELETING": MountTargetSummaryLifecycleStateDeleting, + "DELETED": MountTargetSummaryLifecycleStateDeleted, + "FAILED": MountTargetSummaryLifecycleStateFailed, +} + +// GetMountTargetSummaryLifecycleStateEnumValues Enumerates the set of values for MountTargetSummaryLifecycleState +func GetMountTargetSummaryLifecycleStateEnumValues() []MountTargetSummaryLifecycleStateEnum { + values := make([]MountTargetSummaryLifecycleStateEnum, 0) + for _, v := range mappingMountTargetSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go new file mode 100644 index 000000000..715d97cdd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Snapshot A point-in-time snapshot of a specified file system. +type Snapshot struct { + + // The OCID of the file system from which the snapshot + // was created. + FileSystemId *string `mandatory:"true" json:"fileSystemId"` + + // The OCID of the snapshot. + Id *string `mandatory:"true" json:"id"` + + // The current state of the snapshot. + LifecycleState SnapshotLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Name of the snapshot. This value is immutable. + // Avoid entering confidential information. + // Example: `Sunday` + Name *string `mandatory:"true" json:"name"` + + // The date and time the snapshot was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m Snapshot) String() string { + return common.PointerString(m) +} + +// SnapshotLifecycleStateEnum Enum with underlying type: string +type SnapshotLifecycleStateEnum string + +// Set of constants representing the allowable values for SnapshotLifecycleState +const ( + SnapshotLifecycleStateCreating SnapshotLifecycleStateEnum = "CREATING" + SnapshotLifecycleStateActive SnapshotLifecycleStateEnum = "ACTIVE" + SnapshotLifecycleStateDeleting SnapshotLifecycleStateEnum = "DELETING" + SnapshotLifecycleStateDeleted SnapshotLifecycleStateEnum = "DELETED" +) + +var mappingSnapshotLifecycleState = map[string]SnapshotLifecycleStateEnum{ + "CREATING": SnapshotLifecycleStateCreating, + "ACTIVE": SnapshotLifecycleStateActive, + "DELETING": SnapshotLifecycleStateDeleting, + "DELETED": SnapshotLifecycleStateDeleted, +} + +// GetSnapshotLifecycleStateEnumValues Enumerates the set of values for SnapshotLifecycleState +func GetSnapshotLifecycleStateEnumValues() []SnapshotLifecycleStateEnum { + values := make([]SnapshotLifecycleStateEnum, 0) + for _, v := range mappingSnapshotLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go new file mode 100644 index 000000000..ccf8b719f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SnapshotSummary Summary information for a snapshot. +type SnapshotSummary struct { + + // The OCID of the file system from which the + // snapshot was created. + FileSystemId *string `mandatory:"true" json:"fileSystemId"` + + // The OCID of the snapshot. + Id *string `mandatory:"true" json:"id"` + + // The current state of the snapshot. + LifecycleState SnapshotSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Name of the snapshot. This value is immutable. + // Avoid entering confidential information. + // Example: `Sunday` + Name *string `mandatory:"true" json:"name"` + + // The date and time the snapshot was created, expressed + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m SnapshotSummary) String() string { + return common.PointerString(m) +} + +// SnapshotSummaryLifecycleStateEnum Enum with underlying type: string +type SnapshotSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for SnapshotSummaryLifecycleState +const ( + SnapshotSummaryLifecycleStateCreating SnapshotSummaryLifecycleStateEnum = "CREATING" + SnapshotSummaryLifecycleStateActive SnapshotSummaryLifecycleStateEnum = "ACTIVE" + SnapshotSummaryLifecycleStateDeleting SnapshotSummaryLifecycleStateEnum = "DELETING" + SnapshotSummaryLifecycleStateDeleted SnapshotSummaryLifecycleStateEnum = "DELETED" +) + +var mappingSnapshotSummaryLifecycleState = map[string]SnapshotSummaryLifecycleStateEnum{ + "CREATING": SnapshotSummaryLifecycleStateCreating, + "ACTIVE": SnapshotSummaryLifecycleStateActive, + "DELETING": SnapshotSummaryLifecycleStateDeleting, + "DELETED": SnapshotSummaryLifecycleStateDeleted, +} + +// GetSnapshotSummaryLifecycleStateEnumValues Enumerates the set of values for SnapshotSummaryLifecycleState +func GetSnapshotSummaryLifecycleStateEnumValues() []SnapshotSummaryLifecycleStateEnum { + values := make([]SnapshotSummaryLifecycleStateEnum, 0) + for _, v := range mappingSnapshotSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go new file mode 100644 index 000000000..ceb3c7447 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateExportSetDetails The representation of UpdateExportSetDetails +type UpdateExportSetDetails struct { + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My export set` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Controls the maximum `tbytes`, `fbytes`, and `abytes` + // values reported by `NFS FSSTAT` calls through any associated + // mount targets. This is an advanced feature. For most + // applications, use the default value. The + // `tbytes` value reported by `FSSTAT` will be + // `maxFsStatBytes`. The value of `fbytes` and `abytes` will be + // `maxFsStatBytes` minus the metered size of the file + // system. If the metered size is larger than `maxFsStatBytes`, + // then `fbytes` and `abytes` will both be '0'. + MaxFsStatBytes *int `mandatory:"false" json:"maxFsStatBytes"` + + // Controls the maximum `ffiles`, `ffiles`, and `afiles` + // values reported by `NFS FSSTAT` calls through any associated + // mount targets. This is an advanced feature. For most + // applications, use the default value. The + // `tfiles` value reported by `FSSTAT` will be + // `maxFsStatFiles`. The value of `ffiles` and `afiles` will be + // `maxFsStatFiles` minus the metered size of the file + // system. If the metered size is larger than `maxFsStatFiles`, + // then `ffiles` and `afiles` will both be '0'. + MaxFsStatFiles *int `mandatory:"false" json:"maxFsStatFiles"` +} + +func (m UpdateExportSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go new file mode 100644 index 000000000..eada6e465 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateExportSetRequest wrapper for the UpdateExportSet operation +type UpdateExportSetRequest struct { + + // The OCID of the export set. + ExportSetId *string `mandatory:"true" contributesTo:"path" name:"exportSetId"` + + // Details object for updating an export set. + UpdateExportSetDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateExportSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateExportSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateExportSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateExportSetResponse wrapper for the UpdateExportSet operation +type UpdateExportSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportSet instance + ExportSet `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateExportSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateExportSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go new file mode 100644 index 000000000..6237eecea --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateFileSystemDetails The representation of UpdateFileSystemDetails +type UpdateFileSystemDetails struct { + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My file system` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateFileSystemDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go new file mode 100644 index 000000000..e2408be34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateFileSystemRequest wrapper for the UpdateFileSystem operation +type UpdateFileSystemRequest struct { + + // The OCID of the file system. + FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` + + // Details object for updating a file system. + UpdateFileSystemDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateFileSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateFileSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateFileSystemResponse wrapper for the UpdateFileSystem operation +type UpdateFileSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FileSystem instance + FileSystem `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateFileSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateFileSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go new file mode 100644 index 000000000..2639430fd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// File Storage Service API +// +// The API for the File Storage Service. +// + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateMountTargetDetails The representation of UpdateMountTargetDetails +type UpdateMountTargetDetails struct { + + // A user-friendly name. Does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My mount target` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateMountTargetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go new file mode 100644 index 000000000..669d793ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateMountTargetRequest wrapper for the UpdateMountTarget operation +type UpdateMountTargetRequest struct { + + // The OCID of the mount target. + MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` + + // Details object for updating a mount target. + UpdateMountTargetDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateMountTargetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateMountTargetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateMountTargetResponse wrapper for the UpdateMountTarget operation +type UpdateMountTargetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MountTarget instance + MountTarget `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateMountTargetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateMountTargetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go index 34b121dd0..f45f98bf6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go @@ -20,12 +20,30 @@ type AddUserToGroupRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request AddUserToGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request AddUserToGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddUserToGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // AddUserToGroupResponse wrapper for the AddUserToGroup operation type AddUserToGroupResponse struct { @@ -46,3 +64,8 @@ type AddUserToGroupResponse struct { func (response AddUserToGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response AddUserToGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go b/vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go new file mode 100644 index 000000000..25237aefa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// AuthToken An `AuthToken` is an Oracle-generated token string that you can use to authenticate with third-party APIs +// that do not support Oracle Cloud Infrastructure's signature-based authentication. For example, use an `AuthToken` +// to authenticate with a Swift client with the Object Storage Service. +// The auth token is associated with the user's Console login. Auth tokens never expire. A user can have up to two +// auth tokens at a time. +// **Note:** The token is always an Oracle-generated string; you can't change it to a string of your choice. +// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). +type AuthToken struct { + + // The auth token. The value is available only in the response for `CreateAuthToken`, and not + // for `ListAuthTokens` or `UpdateAuthToken`. + Token *string `mandatory:"false" json:"token"` + + // The OCID of the auth token. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the user the auth token belongs to. + UserId *string `mandatory:"false" json:"userId"` + + // The description you assign to the auth token. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // Date and time the `AuthToken` object was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Date and time when this auth token will expire, in the format defined by RFC3339. + // Null if it never expires. + // Example: `2016-08-25T21:10:29.600Z` + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The token's current state. After creating an auth token, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState AuthTokenLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m AuthToken) String() string { + return common.PointerString(m) +} + +// AuthTokenLifecycleStateEnum Enum with underlying type: string +type AuthTokenLifecycleStateEnum string + +// Set of constants representing the allowable values for AuthTokenLifecycleState +const ( + AuthTokenLifecycleStateCreating AuthTokenLifecycleStateEnum = "CREATING" + AuthTokenLifecycleStateActive AuthTokenLifecycleStateEnum = "ACTIVE" + AuthTokenLifecycleStateInactive AuthTokenLifecycleStateEnum = "INACTIVE" + AuthTokenLifecycleStateDeleting AuthTokenLifecycleStateEnum = "DELETING" + AuthTokenLifecycleStateDeleted AuthTokenLifecycleStateEnum = "DELETED" +) + +var mappingAuthTokenLifecycleState = map[string]AuthTokenLifecycleStateEnum{ + "CREATING": AuthTokenLifecycleStateCreating, + "ACTIVE": AuthTokenLifecycleStateActive, + "INACTIVE": AuthTokenLifecycleStateInactive, + "DELETING": AuthTokenLifecycleStateDeleting, + "DELETED": AuthTokenLifecycleStateDeleted, +} + +// GetAuthTokenLifecycleStateEnumValues Enumerates the set of values for AuthTokenLifecycleState +func GetAuthTokenLifecycleStateEnumValues() []AuthTokenLifecycleStateEnum { + values := make([]AuthTokenLifecycleStateEnum, 0) + for _, v := range mappingAuthTokenLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go b/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go index 941523d22..84e432f10 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go @@ -19,7 +19,6 @@ import ( // major part of your organization. For more information, see // Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm) and also // Setting Up Your Tenancy (https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Concepts/settinguptenancy.htm). -// // To place a resource in a compartment, simply specify the compartment ID in the "Create" request object when // initially creating the resource. For example, to launch an instance into a particular compartment, specify // that compartment's OCID in the `LaunchInstance` request. You can't move an existing resource from one @@ -36,7 +35,7 @@ type Compartment struct { CompartmentId *string `mandatory:"true" json:"compartmentId"` // The name you assign to the compartment during creation. The name must be unique across all - // compartments in the tenancy. + // compartments in the tenancy. Avoid entering confidential information. Name *string `mandatory:"true" json:"name"` // The description you assign to the compartment. Does not have to be unique, and it's changeable. @@ -52,6 +51,16 @@ type Compartment struct { // The detailed status of INACTIVE lifecycleState. InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m Compartment) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go new file mode 100644 index 000000000..6bc351e9c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateAuthTokenDetails The representation of CreateAuthTokenDetails +type CreateAuthTokenDetails struct { + + // The description you assign to the auth token during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` +} + +func (m CreateAuthTokenDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go new file mode 100644 index 000000000..0b954f7dd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateAuthTokenRequest wrapper for the CreateAuthToken operation +type CreateAuthTokenRequest struct { + + // Request object for creating a new auth token. + CreateAuthTokenDetails `contributesTo:"body"` + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateAuthTokenRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateAuthTokenRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateAuthTokenRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateAuthTokenResponse wrapper for the CreateAuthToken operation +type CreateAuthTokenResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AuthToken instance + AuthToken `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateAuthTokenResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateAuthTokenResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go index fb4813a61..fa2e1e94d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go @@ -19,11 +19,21 @@ type CreateCompartmentDetails struct { CompartmentId *string `mandatory:"true" json:"compartmentId"` // The name you assign to the compartment during creation. The name must be unique across all compartments - // in the tenancy. + // in the tenancy. Avoid entering confidential information. Name *string `mandatory:"true" json:"name"` // The description you assign to the compartment during creation. Does not have to be unique, and it's changeable. Description *string `mandatory:"true" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m CreateCompartmentDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go index 5ae960ed6..c95d8bbba 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go @@ -20,12 +20,30 @@ type CreateCompartmentRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateCompartmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateCompartmentResponse wrapper for the CreateCompartment operation type CreateCompartmentResponse struct { @@ -46,3 +64,8 @@ type CreateCompartmentResponse struct { func (response CreateCompartmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go index db24ca7a8..3d20147ee 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go @@ -23,12 +23,30 @@ type CreateCustomerSecretKeyRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateCustomerSecretKeyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateCustomerSecretKeyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCustomerSecretKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateCustomerSecretKeyResponse wrapper for the CreateCustomerSecretKey operation type CreateCustomerSecretKeyResponse struct { @@ -49,3 +67,8 @@ type CreateCustomerSecretKeyResponse struct { func (response CreateCustomerSecretKeyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateCustomerSecretKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go new file mode 100644 index 000000000..559d4aa65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDynamicGroupDetails Properties for creating a dynamic group. +type CreateDynamicGroupDetails struct { + + // The OCID of the tenancy containing the group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the group during creation. The name must be unique across all groups + // in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The matching rule to dynamically match an instance certificate to this dynamic group. + // For rule syntax, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). + MatchingRule *string `mandatory:"true" json:"matchingRule"` + + // The description you assign to the group during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` +} + +func (m CreateDynamicGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go new file mode 100644 index 000000000..d7f46e6bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateDynamicGroupRequest wrapper for the CreateDynamicGroup operation +type CreateDynamicGroupRequest struct { + + // Request object for creating a new dynamic group. + CreateDynamicGroupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDynamicGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateDynamicGroupResponse wrapper for the CreateDynamicGroup operation +type CreateDynamicGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DynamicGroup instance + DynamicGroup `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateDynamicGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDynamicGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go index 98a265dc9..d689c3a89 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go @@ -24,6 +24,16 @@ type CreateGroupDetails struct { // The description you assign to the group during creation. Does not have to be unique, and it's changeable. Description *string `mandatory:"true" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m CreateGroupDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go index 882880cb9..344b8452f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go @@ -20,12 +20,30 @@ type CreateGroupRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateGroupResponse wrapper for the CreateGroup operation type CreateGroupResponse struct { @@ -46,3 +64,8 @@ type CreateGroupResponse struct { func (response CreateGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go index 35d7f594a..3b8d84bc8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go @@ -33,6 +33,16 @@ type CreateIdentityProviderDetails interface { // Active Directory Federation Services (ADFS). // Example: `IDCS` GetProductType() CreateIdentityProviderDetailsProductTypeEnum + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} } type createidentityproviderdetails struct { @@ -41,6 +51,8 @@ type createidentityproviderdetails struct { Name *string `mandatory:"true" json:"name"` Description *string `mandatory:"true" json:"description"` ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Protocol string `json:"protocol"` } @@ -59,6 +71,8 @@ func (m *createidentityproviderdetails) UnmarshalJSON(data []byte) error { m.Name = s.Model.Name m.Description = s.Model.Description m.ProductType = s.Model.ProductType + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags m.Protocol = s.Model.Protocol return err @@ -97,6 +111,16 @@ func (m createidentityproviderdetails) GetProductType() CreateIdentityProviderDe return m.ProductType } +//GetFreeformTags returns FreeformTags +func (m createidentityproviderdetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m createidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + func (m createidentityproviderdetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go index a3ac552dd..579231664 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go @@ -20,12 +20,30 @@ type CreateIdentityProviderRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateIdentityProviderRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateIdentityProviderResponse wrapper for the CreateIdentityProvider operation type CreateIdentityProviderResponse struct { @@ -46,3 +64,8 @@ type CreateIdentityProviderResponse struct { func (response CreateIdentityProviderResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateIdentityProviderResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go index 376d07bc3..14df8f80d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go @@ -23,12 +23,30 @@ type CreateIdpGroupMappingRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateIdpGroupMappingRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateIdpGroupMappingResponse wrapper for the CreateIdpGroupMapping operation type CreateIdpGroupMappingResponse struct { @@ -49,3 +67,8 @@ type CreateIdpGroupMappingResponse struct { func (response CreateIdpGroupMappingResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateIdpGroupMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go index 8d6de9aa8..50f62899c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go @@ -20,12 +20,30 @@ type CreateOrResetUIPasswordRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateOrResetUIPasswordRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateOrResetUIPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateOrResetUIPasswordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateOrResetUIPasswordResponse wrapper for the CreateOrResetUIPassword operation type CreateOrResetUIPasswordResponse struct { @@ -46,3 +64,8 @@ type CreateOrResetUIPasswordResponse struct { func (response CreateOrResetUIPasswordResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateOrResetUIPasswordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go index b25f8b649..187890608 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go @@ -34,6 +34,16 @@ type CreatePolicyDetails struct { // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m CreatePolicyDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go index b6d7e0028..4ebff64a4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go @@ -20,12 +20,30 @@ type CreatePolicyRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreatePolicyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreatePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreatePolicyResponse wrapper for the CreatePolicy operation type CreatePolicyResponse struct { @@ -46,3 +64,8 @@ type CreatePolicyResponse struct { func (response CreatePolicyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreatePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go index 78e866f7c..b682a490c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go @@ -20,6 +20,7 @@ type CreateRegionSubscriptionDetails struct { // - `PHX` // - `IAD` // - `FRA` + // - `LHR` // Example: `PHX` RegionKey *string `mandatory:"true" json:"regionKey"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go index 66dc199d1..f58432800 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go @@ -23,12 +23,30 @@ type CreateRegionSubscriptionRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateRegionSubscriptionRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateRegionSubscriptionRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRegionSubscriptionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateRegionSubscriptionResponse wrapper for the CreateRegionSubscription operation type CreateRegionSubscriptionResponse struct { @@ -46,3 +64,8 @@ type CreateRegionSubscriptionResponse struct { func (response CreateRegionSubscriptionResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateRegionSubscriptionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go index f4eba6eee..9f07fb95e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go @@ -35,6 +35,16 @@ type CreateSaml2IdentityProviderDetails struct { // The XML that contains the information required for federating. Metadata *string `mandatory:"true" json:"metadata"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The identity provider service or product. // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft // Active Directory Federation Services (ADFS). @@ -62,6 +72,16 @@ func (m CreateSaml2IdentityProviderDetails) GetProductType() CreateIdentityProvi return m.ProductType } +//GetFreeformTags returns FreeformTags +func (m CreateSaml2IdentityProviderDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m CreateSaml2IdentityProviderDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + func (m CreateSaml2IdentityProviderDetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go new file mode 100644 index 000000000..6240a43c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSmtpCredentialDetails The representation of CreateSmtpCredentialDetails +type CreateSmtpCredentialDetails struct { + + // The description you assign to the SMTP credentials during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` +} + +func (m CreateSmtpCredentialDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go new file mode 100644 index 000000000..8452a7558 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateSmtpCredentialRequest wrapper for the CreateSmtpCredential operation +type CreateSmtpCredentialRequest struct { + + // Request object for creating a new SMTP credential with the user. + CreateSmtpCredentialDetails `contributesTo:"body"` + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSmtpCredentialRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSmtpCredentialRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSmtpCredentialRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateSmtpCredentialResponse wrapper for the CreateSmtpCredential operation +type CreateSmtpCredentialResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SmtpCredential instance + SmtpCredential `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateSmtpCredentialResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSmtpCredentialResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go index 696261df5..90fc31320 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go @@ -23,12 +23,30 @@ type CreateSwiftPasswordRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateSwiftPasswordRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateSwiftPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSwiftPasswordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateSwiftPasswordResponse wrapper for the CreateSwiftPassword operation type CreateSwiftPasswordResponse struct { @@ -49,3 +67,8 @@ type CreateSwiftPasswordResponse struct { func (response CreateSwiftPasswordResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateSwiftPasswordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go new file mode 100644 index 000000000..86ac57d4c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go @@ -0,0 +1,37 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateTagDetails The representation of CreateTagDetails +type CreateTagDetails struct { + + // The name you assign to the tag during creation. The name must be unique within the tag namespace and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the tag during creation. + Description *string `mandatory:"true" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateTagDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go new file mode 100644 index 000000000..1967669fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateTagNamespaceDetails The representation of CreateTagNamespaceDetails +type CreateTagNamespaceDetails struct { + + // The OCID of the tenancy containing the tag namespace. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the tag namespace during creation. It must be unique across all tag namespaces in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the tag namespace during creation. + Description *string `mandatory:"true" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateTagNamespaceDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go new file mode 100644 index 000000000..fb4ad6aaa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateTagNamespaceRequest wrapper for the CreateTagNamespace operation +type CreateTagNamespaceRequest struct { + + // Request object for creating a new tag namespace. + CreateTagNamespaceDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateTagNamespaceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateTagNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateTagNamespaceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateTagNamespaceResponse wrapper for the CreateTagNamespace operation +type CreateTagNamespaceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TagNamespace instance + TagNamespace `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateTagNamespaceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateTagNamespaceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go new file mode 100644 index 000000000..1fd047163 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateTagRequest wrapper for the CreateTag operation +type CreateTagRequest struct { + + // The OCID of the tag namespace. + TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` + + // Request object for creating a new tag in the specified tag namespace. + CreateTagDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateTagRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateTagRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateTagRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateTagResponse wrapper for the CreateTag operation +type CreateTagResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Tag instance + Tag `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateTagResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateTagResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go index 37ddd5857..f775c1ab1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go @@ -24,6 +24,16 @@ type CreateUserDetails struct { // The description you assign to the user during creation. Does not have to be unique, and it's changeable. Description *string `mandatory:"true" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m CreateUserDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go index 137de9446..ac64d39d5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go @@ -20,12 +20,30 @@ type CreateUserRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateUserRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateUserRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateUserRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateUserResponse wrapper for the CreateUser operation type CreateUserResponse struct { @@ -46,3 +64,8 @@ type CreateUserResponse struct { func (response CreateUserResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateUserResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go index e2beffe0a..eadd6ffd9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go @@ -21,12 +21,30 @@ type DeleteApiKeyRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteApiKeyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteApiKeyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteApiKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteApiKeyResponse wrapper for the DeleteApiKey operation type DeleteApiKeyResponse struct { @@ -41,3 +59,8 @@ type DeleteApiKeyResponse struct { func (response DeleteApiKeyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteApiKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go new file mode 100644 index 000000000..714256257 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteAuthTokenRequest wrapper for the DeleteAuthToken operation +type DeleteAuthTokenRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the auth token. + AuthTokenId *string `mandatory:"true" contributesTo:"path" name:"authTokenId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteAuthTokenRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteAuthTokenRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteAuthTokenRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteAuthTokenResponse wrapper for the DeleteAuthToken operation +type DeleteAuthTokenResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteAuthTokenResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteAuthTokenResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go index 02855f42b..fa2d079b9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go @@ -21,12 +21,30 @@ type DeleteCustomerSecretKeyRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteCustomerSecretKeyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteCustomerSecretKeyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCustomerSecretKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteCustomerSecretKeyResponse wrapper for the DeleteCustomerSecretKey operation type DeleteCustomerSecretKeyResponse struct { @@ -41,3 +59,8 @@ type DeleteCustomerSecretKeyResponse struct { func (response DeleteCustomerSecretKeyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCustomerSecretKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go new file mode 100644 index 000000000..e3b59782d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteDynamicGroupRequest wrapper for the DeleteDynamicGroup operation +type DeleteDynamicGroupRequest struct { + + // The OCID of the dynamic group. + DynamicGroupId *string `mandatory:"true" contributesTo:"path" name:"dynamicGroupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDynamicGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteDynamicGroupResponse wrapper for the DeleteDynamicGroup operation +type DeleteDynamicGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDynamicGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDynamicGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go index 9b63b8bf4..d6a7b5f33 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go @@ -18,12 +18,30 @@ type DeleteGroupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteGroupResponse wrapper for the DeleteGroup operation type DeleteGroupResponse struct { @@ -38,3 +56,8 @@ type DeleteGroupResponse struct { func (response DeleteGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go index e0d82c0fa..6716cc95d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go @@ -18,12 +18,30 @@ type DeleteIdentityProviderRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteIdentityProviderRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteIdentityProviderResponse wrapper for the DeleteIdentityProvider operation type DeleteIdentityProviderResponse struct { @@ -38,3 +56,8 @@ type DeleteIdentityProviderResponse struct { func (response DeleteIdentityProviderResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteIdentityProviderResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go index 02d2b8c50..8b0d55d16 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go @@ -21,12 +21,30 @@ type DeleteIdpGroupMappingRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteIdpGroupMappingRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteIdpGroupMappingResponse wrapper for the DeleteIdpGroupMapping operation type DeleteIdpGroupMappingResponse struct { @@ -41,3 +59,8 @@ type DeleteIdpGroupMappingResponse struct { func (response DeleteIdpGroupMappingResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteIdpGroupMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go index 905f97563..12054caa1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go @@ -18,12 +18,30 @@ type DeletePolicyRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeletePolicyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeletePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeletePolicyResponse wrapper for the DeletePolicy operation type DeletePolicyResponse struct { @@ -38,3 +56,8 @@ type DeletePolicyResponse struct { func (response DeletePolicyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeletePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go new file mode 100644 index 000000000..9191bb0b7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteSmtpCredentialRequest wrapper for the DeleteSmtpCredential operation +type DeleteSmtpCredentialRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the SMTP credential. + SmtpCredentialId *string `mandatory:"true" contributesTo:"path" name:"smtpCredentialId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSmtpCredentialRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSmtpCredentialRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSmtpCredentialRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteSmtpCredentialResponse wrapper for the DeleteSmtpCredential operation +type DeleteSmtpCredentialResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSmtpCredentialResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSmtpCredentialResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go index fac41a4f3..8a0c4633e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go @@ -21,12 +21,30 @@ type DeleteSwiftPasswordRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteSwiftPasswordRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteSwiftPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSwiftPasswordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteSwiftPasswordResponse wrapper for the DeleteSwiftPassword operation type DeleteSwiftPasswordResponse struct { @@ -41,3 +59,8 @@ type DeleteSwiftPasswordResponse struct { func (response DeleteSwiftPasswordResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSwiftPasswordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go index 5dffac8f5..434ea1adc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go @@ -18,12 +18,30 @@ type DeleteUserRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteUserRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteUserRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteUserRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteUserResponse wrapper for the DeleteUser operation type DeleteUserResponse struct { @@ -38,3 +56,8 @@ type DeleteUserResponse struct { func (response DeleteUserResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteUserResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go b/vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go new file mode 100644 index 000000000..386edcaa8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DynamicGroup A dynamic group defines a matching rule. Every bare metal or virtual machine instance is deployed with an instance certificate. +// The certificate contains metadata about the instance. This includes the instance OCID and the compartment OCID, along +// with a few other optional properties. When an API call is made using this instance certificate as the authenticator, +// the certificate can be matched to one or multiple dynamic groups. The instance can then get access to the API +// based on the permissions granted in policies written for the dynamic groups. +// This works like regular user/group membership. But in that case, the membership is a static relationship, whereas +// in a dynamic group, the membership of an instance certificate to a dynamic group is determined during runtime. +// For more information, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). +type DynamicGroup struct { + + // The OCID of the group. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the tenancy containing the group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the group during creation. The name must be unique across all groups in + // the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the group. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // A rule string that defines which instance certificates will be matched. + // For syntax, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). + MatchingRule *string `mandatory:"true" json:"matchingRule"` + + // Date and time the group was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The group's current state. After creating a group, make sure its `lifecycleState` changes from CREATING to + // ACTIVE before using it. + LifecycleState DynamicGroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m DynamicGroup) String() string { + return common.PointerString(m) +} + +// DynamicGroupLifecycleStateEnum Enum with underlying type: string +type DynamicGroupLifecycleStateEnum string + +// Set of constants representing the allowable values for DynamicGroupLifecycleState +const ( + DynamicGroupLifecycleStateCreating DynamicGroupLifecycleStateEnum = "CREATING" + DynamicGroupLifecycleStateActive DynamicGroupLifecycleStateEnum = "ACTIVE" + DynamicGroupLifecycleStateInactive DynamicGroupLifecycleStateEnum = "INACTIVE" + DynamicGroupLifecycleStateDeleting DynamicGroupLifecycleStateEnum = "DELETING" + DynamicGroupLifecycleStateDeleted DynamicGroupLifecycleStateEnum = "DELETED" +) + +var mappingDynamicGroupLifecycleState = map[string]DynamicGroupLifecycleStateEnum{ + "CREATING": DynamicGroupLifecycleStateCreating, + "ACTIVE": DynamicGroupLifecycleStateActive, + "INACTIVE": DynamicGroupLifecycleStateInactive, + "DELETING": DynamicGroupLifecycleStateDeleting, + "DELETED": DynamicGroupLifecycleStateDeleted, +} + +// GetDynamicGroupLifecycleStateEnumValues Enumerates the set of values for DynamicGroupLifecycleState +func GetDynamicGroupLifecycleStateEnumValues() []DynamicGroupLifecycleStateEnum { + values := make([]DynamicGroupLifecycleStateEnum, 0) + for _, v := range mappingDynamicGroupLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/fault_domain.go b/vendor/github.com/oracle/oci-go-sdk/identity/fault_domain.go deleted file mode 100644 index 4f596c95b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/fault_domain.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// FaultDomain A Fault Domain is a logical grouping of hardware and infrastructure within an Availability Domain that can become -// unavailable in its entirety either due to hardware failure such as Top-of-rack (TOR) switch failure or due to -// planned software maintenance such as security updates that reboot your instances. -type FaultDomain struct { - - // The name of the Fault Domain. - Name *string `mandatory:"false" json:"name"` - - // The OCID of the of the compartment. Currently only tenancy (root) compartment can be provided. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The name of the availabilityDomain where the Fault Domain belongs. - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` -} - -func (m FaultDomain) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go index f85794587..65133c7ac 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go @@ -13,12 +13,30 @@ type GetCompartmentRequest struct { // The OCID of the compartment. CompartmentId *string `mandatory:"true" contributesTo:"path" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetCompartmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetCompartmentResponse wrapper for the GetCompartment operation type GetCompartmentResponse struct { @@ -39,3 +57,8 @@ type GetCompartmentResponse struct { func (response GetCompartmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go new file mode 100644 index 000000000..c1328c191 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDynamicGroupRequest wrapper for the GetDynamicGroup operation +type GetDynamicGroupRequest struct { + + // The OCID of the dynamic group. + DynamicGroupId *string `mandatory:"true" contributesTo:"path" name:"dynamicGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDynamicGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetDynamicGroupResponse wrapper for the GetDynamicGroup operation +type GetDynamicGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DynamicGroup instance + DynamicGroup `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response GetDynamicGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDynamicGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go index 90d97badc..8e71f7a99 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go @@ -13,12 +13,30 @@ type GetGroupRequest struct { // The OCID of the group. GroupId *string `mandatory:"true" contributesTo:"path" name:"groupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetGroupResponse wrapper for the GetGroup operation type GetGroupResponse struct { @@ -39,3 +57,8 @@ type GetGroupResponse struct { func (response GetGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go index 503c1687a..4b652e9e3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go @@ -13,12 +13,30 @@ type GetIdentityProviderRequest struct { // The OCID of the identity provider. IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetIdentityProviderRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetIdentityProviderResponse wrapper for the GetIdentityProvider operation type GetIdentityProviderResponse struct { @@ -39,3 +57,8 @@ type GetIdentityProviderResponse struct { func (response GetIdentityProviderResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetIdentityProviderResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go index b589e1e9f..b500bb040 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go @@ -16,12 +16,30 @@ type GetIdpGroupMappingRequest struct { // The OCID of the group mapping. MappingId *string `mandatory:"true" contributesTo:"path" name:"mappingId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetIdpGroupMappingRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetIdpGroupMappingResponse wrapper for the GetIdpGroupMapping operation type GetIdpGroupMappingResponse struct { @@ -42,3 +60,8 @@ type GetIdpGroupMappingResponse struct { func (response GetIdpGroupMappingResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetIdpGroupMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go index 3bff5478c..d35f9b898 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go @@ -13,12 +13,30 @@ type GetPolicyRequest struct { // The OCID of the policy. PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetPolicyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetPolicyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetPolicyResponse wrapper for the GetPolicy operation type GetPolicyResponse struct { @@ -39,3 +57,8 @@ type GetPolicyResponse struct { func (response GetPolicyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go new file mode 100644 index 000000000..2c1e44f3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetTagNamespaceRequest wrapper for the GetTagNamespace operation +type GetTagNamespaceRequest struct { + + // The OCID of the tag namespace. + TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetTagNamespaceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetTagNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetTagNamespaceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetTagNamespaceResponse wrapper for the GetTagNamespace operation +type GetTagNamespaceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TagNamespace instance + TagNamespace `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetTagNamespaceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetTagNamespaceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go new file mode 100644 index 000000000..f4a9d07a3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetTagRequest wrapper for the GetTag operation +type GetTagRequest struct { + + // The OCID of the tag namespace. + TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` + + // The name of the tag. + TagName *string `mandatory:"true" contributesTo:"path" name:"tagName"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetTagRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetTagRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetTagRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetTagResponse wrapper for the GetTag operation +type GetTagResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Tag instance + Tag `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetTagResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetTagResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go index 8ad0f641d..7b6610187 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go @@ -13,12 +13,30 @@ type GetTenancyRequest struct { // The OCID of the tenancy. TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetTenancyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetTenancyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetTenancyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetTenancyResponse wrapper for the GetTenancy operation type GetTenancyResponse struct { @@ -36,3 +54,8 @@ type GetTenancyResponse struct { func (response GetTenancyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetTenancyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go index 492240dbf..9d48752ce 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go @@ -13,12 +13,30 @@ type GetUserGroupMembershipRequest struct { // The OCID of the userGroupMembership. UserGroupMembershipId *string `mandatory:"true" contributesTo:"path" name:"userGroupMembershipId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetUserGroupMembershipRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetUserGroupMembershipRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetUserGroupMembershipRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetUserGroupMembershipResponse wrapper for the GetUserGroupMembership operation type GetUserGroupMembershipResponse struct { @@ -39,3 +57,8 @@ type GetUserGroupMembershipResponse struct { func (response GetUserGroupMembershipResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetUserGroupMembershipResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go index 980955dad..140824e24 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go @@ -13,12 +13,30 @@ type GetUserRequest struct { // The OCID of the user. UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetUserRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetUserRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetUserRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetUserResponse wrapper for the GetUser operation type GetUserResponse struct { @@ -39,3 +57,8 @@ type GetUserResponse struct { func (response GetUserResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetUserResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/group.go b/vendor/github.com/oracle/oci-go-sdk/identity/group.go index 8029ba950..75c91ace9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/group.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/group.go @@ -48,6 +48,16 @@ type Group struct { // The detailed status of INACTIVE lifecycleState. InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m Group) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go b/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go index 8bf0c90c5..f019155e0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go @@ -48,8 +48,8 @@ func (client *IdentityClient) setConfigurationProvider(configProvider common.Con // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -62,22 +62,89 @@ func (client *IdentityClient) ConfigurationProvider() *common.ConfigurationProvi // After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the // object, first make sure its `lifecycleState` has changed to ACTIVE. func (client IdentityClient) AddUserToGroup(ctx context.Context, request AddUserToGroupRequest) (response AddUserToGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/userGroupMemberships/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.addUserToGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(AddUserToGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddUserToGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// addUserToGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) addUserToGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/userGroupMemberships/") + if err != nil { + return nil, err + } + + var response AddUserToGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateAuthToken Creates a new auth token for the specified user. For information about what auth tokens are for, see +// Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). +// You must specify a *description* for the auth token (although it can be an empty string). It does not +// have to be unique, and you can change it anytime with +// UpdateAuthToken. +// Every user has permission to create an auth token for *their own user ID*. An administrator in your organization +// does not need to write a policy to give users this ability. To compare, administrators who have permission to the +// tenancy can use this operation to create an auth token for any user, including themselves. +func (client IdentityClient) CreateAuthToken(ctx context.Context, request CreateAuthTokenRequest) (response CreateAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createAuthToken, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateAuthTokenResponse") + } return } +// createAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createAuthToken(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/authTokens/") + if err != nil { + return nil, err + } + + var response CreateAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateCompartment Creates a new compartment in your tenancy. // **Important:** Compartments cannot be deleted. // You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy @@ -93,20 +160,41 @@ func (client IdentityClient) AddUserToGroup(ctx context.Context, request AddUser // After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the // object, first make sure its `lifecycleState` has changed to ACTIVE. func (client IdentityClient) CreateCompartment(ctx context.Context, request CreateCompartmentRequest) (response CreateCompartmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/compartments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createCompartment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCompartmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createCompartment implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createCompartment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/compartments/") + if err != nil { + return nil, err + } + + var response CreateCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateCustomerSecretKey Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3 @@ -119,22 +207,95 @@ func (client IdentityClient) CreateCompartment(ctx context.Context, request Crea // does not need to write a policy to give users this ability. To compare, administrators who have permission to the // tenancy can use this operation to create a secret key for any user, including themselves. func (client IdentityClient) CreateCustomerSecretKey(ctx context.Context, request CreateCustomerSecretKeyRequest) (response CreateCustomerSecretKeyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/customerSecretKeys/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createCustomerSecretKey, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCustomerSecretKeyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createCustomerSecretKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/customerSecretKeys/") + if err != nil { + return nil, err + } + + var response CreateCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDynamicGroup Creates a new dynamic group in your tenancy. +// You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy +// is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) +// reside within the tenancy itself, unlike cloud resources such as compute instances, which typically +// reside within compartments inside the tenancy. For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// You must also specify a *name* for the dynamic group, which must be unique across all dynamic groups in your +// tenancy, and cannot be changed. Note that this name has to be also unique accross all groups in your tenancy. +// You can use this name or the OCID when writing policies that apply to the dynamic group. For more information +// about policies, see How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). +// You must also specify a *description* for the dynamic group (although it can be an empty string). It does not +// have to be unique, and you can change it anytime with UpdateDynamicGroup. +// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the +// object, first make sure its `lifecycleState` has changed to ACTIVE. +func (client IdentityClient) CreateDynamicGroup(ctx context.Context, request CreateDynamicGroupRequest) (response CreateDynamicGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createDynamicGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateDynamicGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDynamicGroupResponse") + } return } +// createDynamicGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dynamicGroups/") + if err != nil { + return nil, err + } + + var response CreateDynamicGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateGroup Creates a new group in your tenancy. // You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy // is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) @@ -152,20 +313,41 @@ func (client IdentityClient) CreateCustomerSecretKey(ctx context.Context, reques // See AddUserToGroup and // CreatePolicy. func (client IdentityClient) CreateGroup(ctx context.Context, request CreateGroupRequest) (response CreateGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/groups/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/groups/") + if err != nil { + return nil, err + } + + var response CreateGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateIdentityProvider Creates a new identity provider in your tenancy. For more information, see @@ -183,39 +365,81 @@ func (client IdentityClient) CreateGroup(ctx context.Context, request CreateGrou // be CREATING. Before using the object, first make sure its `lifecycleState` has // changed to ACTIVE. func (client IdentityClient) CreateIdentityProvider(ctx context.Context, request CreateIdentityProviderRequest) (response CreateIdentityProviderResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/identityProviders/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createIdentityProvider, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateIdentityProviderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIdentityProviderResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/identityProviders/") + if err != nil { + return nil, err + } + + var response CreateIdentityProviderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) - return + return response, err } // CreateIdpGroupMapping Creates a single mapping between an IdP group and an IAM Service // Group. func (client IdentityClient) CreateIdpGroupMapping(ctx context.Context, request CreateIdpGroupMappingRequest) (response CreateIdpGroupMappingResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/identityProviders/{identityProviderId}/groupMappings/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createIdpGroupMapping, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateIdpGroupMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIdpGroupMappingResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createIdpGroupMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/identityProviders/{identityProviderId}/groupMappings/") + if err != nil { + return nil, err + } + + var response CreateIdpGroupMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateOrResetUIPassword Creates a new Console one-time password for the specified user. For more information about user @@ -228,20 +452,41 @@ func (client IdentityClient) CreateIdpGroupMapping(ctx context.Context, request // **Note:** The user's Console login is the unique name you specified when you created the user // (see CreateUser). func (client IdentityClient) CreateOrResetUIPassword(ctx context.Context, request CreateOrResetUIPasswordRequest) (response CreateOrResetUIPasswordResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/uiPassword", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createOrResetUIPassword, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateOrResetUIPasswordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateOrResetUIPasswordResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createOrResetUIPassword implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createOrResetUIPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/uiPassword") + if err != nil { + return nil, err + } + + var response CreateOrResetUIPasswordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreatePolicy Creates a new policy in the specified compartment (either the tenancy or another of your compartments). @@ -257,41 +502,126 @@ func (client IdentityClient) CreateOrResetUIPassword(ctx context.Context, reques // object, first make sure its `lifecycleState` has changed to ACTIVE. // New policies take effect typically within 10 seconds. func (client IdentityClient) CreatePolicy(ctx context.Context, request CreatePolicyRequest) (response CreatePolicyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/policies/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createPolicy, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreatePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePolicyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createPolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/policies/") + if err != nil { + return nil, err + } + + var response CreatePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateRegionSubscription Creates a subscription to a region for a tenancy. func (client IdentityClient) CreateRegionSubscription(ctx context.Context, request CreateRegionSubscriptionRequest) (response CreateRegionSubscriptionResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/tenancies/{tenancyId}/regionSubscriptions", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createRegionSubscription, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(CreateRegionSubscriptionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRegionSubscriptionResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// CreateSwiftPassword Creates a new Swift password for the specified user. For information about what Swift passwords are for, see +// createRegionSubscription implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createRegionSubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/tenancies/{tenancyId}/regionSubscriptions") + if err != nil { + return nil, err + } + + var response CreateRegionSubscriptionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSmtpCredential Creates a new SMTP credential for the specified user. An SMTP credential has an SMTP user name and an SMTP password. +// You must specify a *description* for the SMTP credential (although it can be an empty string). It does not +// have to be unique, and you can change it anytime with +// UpdateSmtpCredential. +func (client IdentityClient) CreateSmtpCredential(ctx context.Context, request CreateSmtpCredentialRequest) (response CreateSmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createSmtpCredential, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateSmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSmtpCredentialResponse") + } + return +} + +// createSmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createSmtpCredential(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/smtpCredentials/") + if err != nil { + return nil, err + } + + var response CreateSmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSwiftPassword **Deprecated. Use CreateAuthToken instead.** +// Creates a new Swift password for the specified user. For information about what Swift passwords are for, see // Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). // You must specify a *description* for the Swift password (although it can be an empty string). It does not // have to be unique, and you can change it anytime with @@ -300,22 +630,141 @@ func (client IdentityClient) CreateRegionSubscription(ctx context.Context, reque // does not need to write a policy to give users this ability. To compare, administrators who have permission to the // tenancy can use this operation to create a Swift password for any user, including themselves. func (client IdentityClient) CreateSwiftPassword(ctx context.Context, request CreateSwiftPasswordRequest) (response CreateSwiftPasswordResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/swiftPasswords/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createSwiftPassword, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateSwiftPasswordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSwiftPasswordResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createSwiftPassword implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createSwiftPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/swiftPasswords/") + if err != nil { + return nil, err + } + + var response CreateSwiftPasswordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateTag Creates a new tag in the specified tag namespace. +// You must specify either the OCID or the name of the tag namespace that will contain this tag definition. +// You must also specify a *name* for the tag, which must be unique across all tags in the tag namespace +// and cannot be changed. The name can contain any ASCII character except the space (_) or period (.) characters. +// Names are case insensitive. That means, for example, "myTag" and "mytag" are not allowed in the same namespace. +// If you specify a name that's already in use in the tag namespace, a 409 error is returned. +// You must also specify a *description* for the tag. +// It does not have to be unique, and you can change it with +// UpdateTag. +func (client IdentityClient) CreateTag(ctx context.Context, request CreateTagRequest) (response CreateTagResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createTag, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateTagResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateTagResponse") + } return } +// createTag implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createTag(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/tagNamespaces/{tagNamespaceId}/tags") + if err != nil { + return nil, err + } + + var response CreateTagResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateTagNamespace Creates a new tag namespace in the specified compartment. +// You must specify the compartment ID in the request object (remember that the tenancy is simply the root +// compartment). +// You must also specify a *name* for the namespace, which must be unique across all namespaces in your tenancy +// and cannot be changed. The name can contain any ASCII character except the space (_) or period (.). +// Names are case insensitive. That means, for example, "myNamespace" and "mynamespace" are not allowed +// in the same tenancy. Once you created a namespace, you cannot change the name. +// If you specify a name that's already in use in the tenancy, a 409 error is returned. +// You must also specify a *description* for the namespace. +// It does not have to be unique, and you can change it with +// UpdateTagNamespace. +// Tag namespaces cannot be deleted, but they can be retired. +// See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring) for more information. +func (client IdentityClient) CreateTagNamespace(ctx context.Context, request CreateTagNamespaceRequest) (response CreateTagNamespaceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createTagNamespace, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateTagNamespaceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateTagNamespaceResponse") + } + return +} + +// createTagNamespace implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createTagNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/tagNamespaces") + if err != nil { + return nil, err + } + + var response CreateTagNamespaceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateUser Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other // IAM Service components, see Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). // You must specify your tenancy's OCID as the compartment ID in the request object (remember that the @@ -346,20 +795,41 @@ func (client IdentityClient) CreateSwiftPassword(ctx context.Context, request Cr // UploadApiKey). // **Important:** Make sure to inform the new user which compartment(s) they have access to. func (client IdentityClient) CreateUser(ctx context.Context, request CreateUserRequest) (response CreateUserResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createUser, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateUserResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateUserResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) createUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/") + if err != nil { + return nil, err + } + + var response CreateUserResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteApiKey Deletes the specified API signing key for the specified user. @@ -368,147 +838,433 @@ func (client IdentityClient) CreateUser(ctx context.Context, request CreateUserR // To compare, administrators who have permission to the tenancy can use this operation to delete // a key for any user, including themselves. func (client IdentityClient) DeleteApiKey(ctx context.Context, request DeleteApiKeyRequest) (response DeleteApiKeyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}/apiKeys/{fingerprint}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteApiKey, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteApiKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteApiKeyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteApiKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/apiKeys/{fingerprint}") + if err != nil { + return nil, err + } + + var response DeleteApiKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteAuthToken Deletes the specified auth token for the specified user. +func (client IdentityClient) DeleteAuthToken(ctx context.Context, request DeleteAuthTokenRequest) (response DeleteAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteAuthToken, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteAuthTokenResponse") + } return } +// deleteAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteAuthToken(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/authTokens/{authTokenId}") + if err != nil { + return nil, err + } + + var response DeleteAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteCustomerSecretKey Deletes the specified secret key for the specified user. func (client IdentityClient) DeleteCustomerSecretKey(ctx context.Context, request DeleteCustomerSecretKeyRequest) (response DeleteCustomerSecretKeyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCustomerSecretKey, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCustomerSecretKeyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteCustomerSecretKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}") + if err != nil { + return nil, err + } + + var response DeleteCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDynamicGroup Deletes the specified dynamic group. +func (client IdentityClient) DeleteDynamicGroup(ctx context.Context, request DeleteDynamicGroupRequest) (response DeleteDynamicGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDynamicGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteDynamicGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDynamicGroupResponse") + } return } +// deleteDynamicGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dynamicGroups/{dynamicGroupId}") + if err != nil { + return nil, err + } + + var response DeleteDynamicGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteGroup Deletes the specified group. The group must be empty. func (client IdentityClient) DeleteGroup(ctx context.Context, request DeleteGroupRequest) (response DeleteGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/groups/{groupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/groups/{groupId}") + if err != nil { + return nil, err + } + + var response DeleteGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteIdentityProvider Deletes the specified identity provider. The identity provider must not have // any group mappings (see IdpGroupMapping). func (client IdentityClient) DeleteIdentityProvider(ctx context.Context, request DeleteIdentityProviderRequest) (response DeleteIdentityProviderResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/identityProviders/{identityProviderId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteIdentityProvider, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteIdentityProviderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIdentityProviderResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/identityProviders/{identityProviderId}") + if err != nil { + return nil, err + } + + var response DeleteIdentityProviderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteIdpGroupMapping Deletes the specified group mapping. func (client IdentityClient) DeleteIdpGroupMapping(ctx context.Context, request DeleteIdpGroupMappingRequest) (response DeleteIdpGroupMappingResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteIdpGroupMapping, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteIdpGroupMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIdpGroupMappingResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteIdpGroupMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}") + if err != nil { + return nil, err + } + + var response DeleteIdpGroupMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeletePolicy Deletes the specified policy. The deletion takes effect typically within 10 seconds. func (client IdentityClient) DeletePolicy(ctx context.Context, request DeletePolicyRequest) (response DeletePolicyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/policies/{policyId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePolicy, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(DeletePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePolicyResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// DeleteSwiftPassword Deletes the specified Swift password for the specified user. -func (client IdentityClient) DeleteSwiftPassword(ctx context.Context, request DeleteSwiftPasswordRequest) (response DeleteSwiftPasswordResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}/swiftPasswords/{swiftPasswordId}", request) +// deletePolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deletePolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/policies/{policyId}") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response DeletePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSmtpCredential Deletes the specified SMTP credential for the specified user. +func (client IdentityClient) DeleteSmtpCredential(ctx context.Context, request DeleteSmtpCredentialRequest) (response DeleteSmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSmtpCredential, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteSmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSmtpCredentialResponse") + } return } +// deleteSmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteSmtpCredential(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/smtpCredentials/{smtpCredentialId}") + if err != nil { + return nil, err + } + + var response DeleteSmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSwiftPassword **Deprecated. Use DeleteAuthToken instead.** +// Deletes the specified Swift password for the specified user. +func (client IdentityClient) DeleteSwiftPassword(ctx context.Context, request DeleteSwiftPasswordRequest) (response DeleteSwiftPasswordResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSwiftPassword, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteSwiftPasswordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSwiftPasswordResponse") + } + return +} + +// deleteSwiftPassword implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteSwiftPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/swiftPasswords/{swiftPasswordId}") + if err != nil { + return nil, err + } + + var response DeleteSwiftPasswordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteUser Deletes the specified user. The user must not be in any groups. func (client IdentityClient) DeleteUser(ctx context.Context, request DeleteUserRequest) (response DeleteUserResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteUser, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteUserResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteUserResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) deleteUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}") + if err != nil { + return nil, err + } + + var response DeleteUserResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetCompartment Gets the specified compartment's information. @@ -519,268 +1275,719 @@ func (client IdentityClient) DeleteUser(ctx context.Context, request DeleteUserR // call the ListInstances operation in the Cloud Compute // Service or the ListVolumes operation in Cloud Block Storage. func (client IdentityClient) GetCompartment(ctx context.Context, request GetCompartmentRequest) (response GetCompartmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/compartments/{compartmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCompartment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCompartmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getCompartment implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getCompartment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/compartments/{compartmentId}") + if err != nil { + return nil, err + } + + var response GetCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDynamicGroup Gets the specified dynamic group's information. +func (client IdentityClient) GetDynamicGroup(ctx context.Context, request GetDynamicGroupRequest) (response GetDynamicGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDynamicGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetDynamicGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDynamicGroupResponse") + } return } +// getDynamicGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dynamicGroups/{dynamicGroupId}") + if err != nil { + return nil, err + } + + var response GetDynamicGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetGroup Gets the specified group's information. // This operation does not return a list of all the users in the group. To do that, use // ListUserGroupMemberships and // provide the group's OCID as a query parameter in the request. func (client IdentityClient) GetGroup(ctx context.Context, request GetGroupRequest) (response GetGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/groups/{groupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/groups/{groupId}") + if err != nil { + return nil, err + } + + var response GetGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetIdentityProvider Gets the specified identity provider's information. func (client IdentityClient) GetIdentityProvider(ctx context.Context, request GetIdentityProviderRequest) (response GetIdentityProviderResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/{identityProviderId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIdentityProvider, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetIdentityProviderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIdentityProviderResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/{identityProviderId}") + if err != nil { + return nil, err + } + + var response GetIdentityProviderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) - return + return response, err } // GetIdpGroupMapping Gets the specified group mapping. func (client IdentityClient) GetIdpGroupMapping(ctx context.Context, request GetIdpGroupMappingRequest) (response GetIdpGroupMappingResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIdpGroupMapping, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetIdpGroupMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIdpGroupMappingResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getIdpGroupMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}") + if err != nil { + return nil, err + } + + var response GetIdpGroupMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetPolicy Gets the specified policy's information. func (client IdentityClient) GetPolicy(ctx context.Context, request GetPolicyRequest) (response GetPolicyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/policies/{policyId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPolicy, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPolicyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getPolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/policies/{policyId}") + if err != nil { + return nil, err + } + + var response GetPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetTag Gets the specified tag's information. +func (client IdentityClient) GetTag(ctx context.Context, request GetTagRequest) (response GetTagResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getTag, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetTagResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetTagResponse") + } return } +// getTag implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getTag(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces/{tagNamespaceId}/tags/{tagName}") + if err != nil { + return nil, err + } + + var response GetTagResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetTagNamespace Gets the specified tag namespace's information. +func (client IdentityClient) GetTagNamespace(ctx context.Context, request GetTagNamespaceRequest) (response GetTagNamespaceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getTagNamespace, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetTagNamespaceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetTagNamespaceResponse") + } + return +} + +// getTagNamespace implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getTagNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces/{tagNamespaceId}") + if err != nil { + return nil, err + } + + var response GetTagNamespaceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetTenancy Get the specified tenancy's information. func (client IdentityClient) GetTenancy(ctx context.Context, request GetTenancyRequest) (response GetTenancyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/tenancies/{tenancyId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getTenancy, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetTenancyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetTenancyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getTenancy implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getTenancy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/tenancies/{tenancyId}") + if err != nil { + return nil, err + } + + var response GetTenancyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetUser Gets the specified user's information. func (client IdentityClient) GetUser(ctx context.Context, request GetUserRequest) (response GetUserResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getUser, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetUserResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetUserResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}") + if err != nil { + return nil, err + } + + var response GetUserResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetUserGroupMembership Gets the specified UserGroupMembership's information. func (client IdentityClient) GetUserGroupMembership(ctx context.Context, request GetUserGroupMembershipRequest) (response GetUserGroupMembershipResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/userGroupMemberships/{userGroupMembershipId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getUserGroupMembership, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetUserGroupMembershipResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetUserGroupMembershipResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getUserGroupMembership implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) getUserGroupMembership(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/userGroupMemberships/{userGroupMembershipId}") + if err != nil { + return nil, err + } + + var response GetUserGroupMembershipResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListApiKeys Lists the API signing keys for the specified user. A user can have a maximum of three keys. // Every user has permission to use this API call for *their own user ID*. An administrator in your // organization does not need to write a policy to give users this ability. func (client IdentityClient) ListApiKeys(ctx context.Context, request ListApiKeysRequest) (response ListApiKeysResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}/apiKeys/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listApiKeys, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListApiKeysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListApiKeysResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listApiKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listApiKeys(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/apiKeys/") + if err != nil { + return nil, err + } + + var response ListApiKeysResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAuthTokens Lists the auth tokens for the specified user. The returned object contains the token's OCID, but not +// the token itself. The actual token is returned only upon creation. +func (client IdentityClient) ListAuthTokens(ctx context.Context, request ListAuthTokensRequest) (response ListAuthTokensResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAuthTokens, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListAuthTokensResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAuthTokensResponse") + } return } +// listAuthTokens implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listAuthTokens(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/authTokens/") + if err != nil { + return nil, err + } + + var response ListAuthTokensResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListAvailabilityDomains Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another // of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). func (client IdentityClient) ListAvailabilityDomains(ctx context.Context, request ListAvailabilityDomainsRequest) (response ListAvailabilityDomainsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/availabilityDomains/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAvailabilityDomains, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListAvailabilityDomainsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAvailabilityDomainsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listAvailabilityDomains implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listAvailabilityDomains(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/availabilityDomains/") + if err != nil { + return nil, err + } + + var response ListAvailabilityDomainsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListCompartments Lists the compartments in your tenancy. You must specify your tenancy's OCID as the value // for the compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). func (client IdentityClient) ListCompartments(ctx context.Context, request ListCompartmentsRequest) (response ListCompartmentsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/compartments/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCompartments, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListCompartmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCompartmentsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listCompartments implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listCompartments(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/compartments/") + if err != nil { + return nil, err + } + + var response ListCompartmentsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListCustomerSecretKeys Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not // the secret key itself. The actual secret key is returned only upon creation. func (client IdentityClient) ListCustomerSecretKeys(ctx context.Context, request ListCustomerSecretKeysRequest) (response ListCustomerSecretKeysResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}/customerSecretKeys/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCustomerSecretKeys, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(ListCustomerSecretKeysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCustomerSecretKeysResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// ListFaultDomains Lists the Fault Domains in your tenancy. Specify the OCID of either the tenancy or another -// of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -func (client IdentityClient) ListFaultDomains(ctx context.Context, request ListFaultDomainsRequest) (response ListFaultDomainsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/faultDomains/", request) +// listCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listCustomerSecretKeys(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/customerSecretKeys/") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response ListCustomerSecretKeysResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDynamicGroups Lists the dynamic groups in your tenancy. You must specify your tenancy's OCID as the value for +// the compartment ID (remember that the tenancy is simply the root compartment). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +func (client IdentityClient) ListDynamicGroups(ctx context.Context, request ListDynamicGroupsRequest) (response ListDynamicGroupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDynamicGroups, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListDynamicGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDynamicGroupsResponse") + } return } +// listDynamicGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listDynamicGroups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dynamicGroups/") + if err != nil { + return nil, err + } + + var response ListDynamicGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListGroups Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for // the compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). func (client IdentityClient) ListGroups(ctx context.Context, request ListGroupsRequest) (response ListGroupsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/groups/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listGroups, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListGroupsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listGroups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/groups/") + if err != nil { + return nil, err + } + + var response ListGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } //listidentityprovider allows to unmarshal list of polymorphic IdentityProvider @@ -804,38 +2011,80 @@ func (m *listidentityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{ // compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). func (client IdentityClient) ListIdentityProviders(ctx context.Context, request ListIdentityProvidersRequest) (response ListIdentityProvidersResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIdentityProviders, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListIdentityProvidersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIdentityProvidersResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listIdentityProviders implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listIdentityProviders(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/") + if err != nil { + return nil, err + } + + var response ListIdentityProvidersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listidentityprovider{}) - return + return response, err } // ListIdpGroupMappings Lists the group mappings for the specified identity provider. func (client IdentityClient) ListIdpGroupMappings(ctx context.Context, request ListIdpGroupMappingsRequest) (response ListIdpGroupMappingsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIdpGroupMappings, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListIdpGroupMappingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIdpGroupMappingsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listIdpGroupMappings implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listIdpGroupMappings(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/") + if err != nil { + return nil, err + } + + var response ListIdpGroupMappingsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListPolicies Lists the policies in the specified compartment (either the tenancy or another of your compartments). @@ -843,74 +2092,274 @@ func (client IdentityClient) ListIdpGroupMappings(ctx context.Context, request L // To determine which policies apply to a particular group or compartment, you must view the individual // statements inside all your policies. There isn't a way to automatically obtain that information via the API. func (client IdentityClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/policies/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPolicies, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListPoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPoliciesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listPolicies implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listPolicies(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/policies/") + if err != nil { + return nil, err + } + + var response ListPoliciesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListRegionSubscriptions Lists the region subscriptions for the specified tenancy. func (client IdentityClient) ListRegionSubscriptions(ctx context.Context, request ListRegionSubscriptionsRequest) (response ListRegionSubscriptionsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/tenancies/{tenancyId}/regionSubscriptions", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listRegionSubscriptions, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListRegionSubscriptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRegionSubscriptionsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listRegionSubscriptions implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listRegionSubscriptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/tenancies/{tenancyId}/regionSubscriptions") + if err != nil { + return nil, err + } + + var response ListRegionSubscriptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListRegions Lists all the regions offered by Oracle Cloud Infrastructure. func (client IdentityClient) ListRegions(ctx context.Context) (response ListRegionsResponse, err error) { - httpRequest := common.MakeDefaultHTTPRequest(http.MethodGet, "/regions") - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse + var ociResponse common.OCIResponse + ociResponse, err = client.listRegions(ctx) if err != nil { return } - - err = common.UnmarshalResponse(httpResponse, &response) + if convertedResponse, ok := ociResponse.(ListRegionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRegionsResponse") + } return } -// ListSwiftPasswords Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not -// the password itself. The actual password is returned only upon creation. -func (client IdentityClient) ListSwiftPasswords(ctx context.Context, request ListSwiftPasswordsRequest) (response ListSwiftPasswordsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}/swiftPasswords/", request) - if err != nil { - return - } +// listRegions performs the request (retry policy is not enabled without a request object) +func (client IdentityClient) listRegions(ctx context.Context) (common.OCIResponse, error) { + httpRequest := common.MakeDefaultHTTPRequest(http.MethodGet, "/regions") + var err error - httpResponse, err := client.Call(ctx, &httpRequest) + var response ListRegionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSmtpCredentials Lists the SMTP credentials for the specified user. The returned object contains the credential's OCID, +// the SMTP user name but not the SMTP password. The SMTP password is returned only upon creation. +func (client IdentityClient) ListSmtpCredentials(ctx context.Context, request ListSmtpCredentialsRequest) (response ListSmtpCredentialsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSmtpCredentials, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListSmtpCredentialsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSmtpCredentialsResponse") + } return } +// listSmtpCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listSmtpCredentials(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/smtpCredentials/") + if err != nil { + return nil, err + } + + var response ListSmtpCredentialsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSwiftPasswords **Deprecated. Use ListAuthTokens instead.** +// Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not +// the password itself. The actual password is returned only upon creation. +func (client IdentityClient) ListSwiftPasswords(ctx context.Context, request ListSwiftPasswordsRequest) (response ListSwiftPasswordsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSwiftPasswords, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListSwiftPasswordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSwiftPasswordsResponse") + } + return +} + +// listSwiftPasswords implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listSwiftPasswords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/swiftPasswords/") + if err != nil { + return nil, err + } + + var response ListSwiftPasswordsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTagNamespaces Lists the tag namespaces in the specified compartment. +func (client IdentityClient) ListTagNamespaces(ctx context.Context, request ListTagNamespacesRequest) (response ListTagNamespacesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listTagNamespaces, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListTagNamespacesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTagNamespacesResponse") + } + return +} + +// listTagNamespaces implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listTagNamespaces(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces") + if err != nil { + return nil, err + } + + var response ListTagNamespacesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTags Lists the tag definitions in the specified tag namespace. +func (client IdentityClient) ListTags(ctx context.Context, request ListTagsRequest) (response ListTagsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listTags, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListTagsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTagsResponse") + } + return +} + +// listTags implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listTags(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces/{tagNamespaceId}/tags") + if err != nil { + return nil, err + } + + var response ListTagsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListUserGroupMemberships Lists the `UserGroupMembership` objects in your tenancy. You must specify your tenancy's OCID // as the value for the compartment ID // (see Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five)). @@ -919,222 +2368,677 @@ func (client IdentityClient) ListSwiftPasswords(ctx context.Context, request Lis // - Similarly, you can limit the results to just the memberships for a given group by specifying a `groupId`. // - You can set both the `userId` and `groupId` to determine if the specified user is in the specified group. // If the answer is no, the response is an empty list. +// - Although`userId` and `groupId` are not indvidually required, you must set one of them. func (client IdentityClient) ListUserGroupMemberships(ctx context.Context, request ListUserGroupMembershipsRequest) (response ListUserGroupMembershipsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/userGroupMemberships/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listUserGroupMemberships, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListUserGroupMembershipsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListUserGroupMembershipsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listUserGroupMemberships implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listUserGroupMemberships(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/userGroupMemberships/") + if err != nil { + return nil, err + } + + var response ListUserGroupMembershipsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListUsers Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the // compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). func (client IdentityClient) ListUsers(ctx context.Context, request ListUsersRequest) (response ListUsersResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listUsers, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListUsersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListUsersResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listUsers implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) listUsers(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/") + if err != nil { + return nil, err + } + + var response ListUsersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // RemoveUserFromGroup Removes a user from a group by deleting the corresponding `UserGroupMembership`. func (client IdentityClient) RemoveUserFromGroup(ctx context.Context, request RemoveUserFromGroupRequest) (response RemoveUserFromGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/userGroupMemberships/{userGroupMembershipId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.removeUserFromGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(RemoveUserFromGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveUserFromGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// removeUserFromGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) removeUserFromGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/userGroupMemberships/{userGroupMembershipId}") + if err != nil { + return nil, err + } + + var response RemoveUserFromGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateAuthToken Updates the specified auth token's description. +func (client IdentityClient) UpdateAuthToken(ctx context.Context, request UpdateAuthTokenRequest) (response UpdateAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateAuthToken, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateAuthTokenResponse") + } return } +// updateAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateAuthToken(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/authTokens/{authTokenId}") + if err != nil { + return nil, err + } + + var response UpdateAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateCompartment Updates the specified compartment's description or name. You can't update the root compartment. func (client IdentityClient) UpdateCompartment(ctx context.Context, request UpdateCompartmentRequest) (response UpdateCompartmentResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/compartments/{compartmentId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCompartment, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCompartmentResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateCompartment implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateCompartment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/compartments/{compartmentId}") + if err != nil { + return nil, err + } + + var response UpdateCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateCustomerSecretKey Updates the specified secret key's description. func (client IdentityClient) UpdateCustomerSecretKey(ctx context.Context, request UpdateCustomerSecretKeyRequest) (response UpdateCustomerSecretKeyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCustomerSecretKey, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCustomerSecretKeyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateCustomerSecretKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}") + if err != nil { + return nil, err + } + + var response UpdateCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDynamicGroup Updates the specified dynamic group. +func (client IdentityClient) UpdateDynamicGroup(ctx context.Context, request UpdateDynamicGroupRequest) (response UpdateDynamicGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDynamicGroup, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateDynamicGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDynamicGroupResponse") + } return } +// updateDynamicGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dynamicGroups/{dynamicGroupId}") + if err != nil { + return nil, err + } + + var response UpdateDynamicGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateGroup Updates the specified group. func (client IdentityClient) UpdateGroup(ctx context.Context, request UpdateGroupRequest) (response UpdateGroupResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/groups/{groupId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateGroup, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateGroupResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/groups/{groupId}") + if err != nil { + return nil, err + } + + var response UpdateGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateIdentityProvider Updates the specified identity provider. func (client IdentityClient) UpdateIdentityProvider(ctx context.Context, request UpdateIdentityProviderRequest) (response UpdateIdentityProviderResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/identityProviders/{identityProviderId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateIdentityProvider, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateIdentityProviderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIdentityProviderResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/identityProviders/{identityProviderId}") + if err != nil { + return nil, err + } + + var response UpdateIdentityProviderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) - return + return response, err } // UpdateIdpGroupMapping Updates the specified group mapping. func (client IdentityClient) UpdateIdpGroupMapping(ctx context.Context, request UpdateIdpGroupMappingRequest) (response UpdateIdpGroupMappingResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateIdpGroupMapping, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateIdpGroupMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIdpGroupMappingResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateIdpGroupMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}") + if err != nil { + return nil, err + } + + var response UpdateIdpGroupMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdatePolicy Updates the specified policy. You can update the description or the policy statements themselves. // Policy changes take effect typically within 10 seconds. func (client IdentityClient) UpdatePolicy(ctx context.Context, request UpdatePolicyRequest) (response UpdatePolicyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/policies/{policyId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePolicy, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(UpdatePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePolicyResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// UpdateSwiftPassword Updates the specified Swift password's description. -func (client IdentityClient) UpdateSwiftPassword(ctx context.Context, request UpdateSwiftPasswordRequest) (response UpdateSwiftPasswordResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}/swiftPasswords/{swiftPasswordId}", request) +// updatePolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updatePolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/policies/{policyId}") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response UpdatePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateSmtpCredential Updates the specified SMTP credential's description. +func (client IdentityClient) UpdateSmtpCredential(ctx context.Context, request UpdateSmtpCredentialRequest) (response UpdateSmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateSmtpCredential, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateSmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSmtpCredentialResponse") + } return } +// updateSmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateSmtpCredential(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/smtpCredentials/{smtpCredentialId}") + if err != nil { + return nil, err + } + + var response UpdateSmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateSwiftPassword **Deprecated. Use UpdateAuthToken instead.** +// Updates the specified Swift password's description. +func (client IdentityClient) UpdateSwiftPassword(ctx context.Context, request UpdateSwiftPasswordRequest) (response UpdateSwiftPasswordResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateSwiftPassword, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateSwiftPasswordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSwiftPasswordResponse") + } + return +} + +// updateSwiftPassword implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateSwiftPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/swiftPasswords/{swiftPasswordId}") + if err != nil { + return nil, err + } + + var response UpdateSwiftPasswordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateTag Updates the the specified tag definition. You can update `description`, and `isRetired`. +func (client IdentityClient) UpdateTag(ctx context.Context, request UpdateTagRequest) (response UpdateTagResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateTag, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateTagResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateTagResponse") + } + return +} + +// updateTag implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateTag(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/tagNamespaces/{tagNamespaceId}/tags/{tagName}") + if err != nil { + return nil, err + } + + var response UpdateTagResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateTagNamespace Updates the the specified tag namespace. You can't update the namespace name. +// Updating `isRetired` to 'true' retires the namespace and all the tag definitions in the namespace. Reactivating a +// namespace (changing `isRetired` from 'true' to 'false') does not reactivate tag definitions. +// To reactivate the tag definitions, you must reactivate each one indvidually *after* you reactivate the namespace, +// using UpdateTag. For more information about retiring tag namespaces, see +// Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). +// You can't add a namespace with the same name as a retired namespace in the same tenancy. +func (client IdentityClient) UpdateTagNamespace(ctx context.Context, request UpdateTagNamespaceRequest) (response UpdateTagNamespaceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateTagNamespace, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateTagNamespaceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateTagNamespaceResponse") + } + return +} + +// updateTagNamespace implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateTagNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/tagNamespaces/{tagNamespaceId}") + if err != nil { + return nil, err + } + + var response UpdateTagNamespaceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateUser Updates the description of the specified user. func (client IdentityClient) UpdateUser(ctx context.Context, request UpdateUserRequest) (response UpdateUserResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateUser, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateUserResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateUserResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}") + if err != nil { + return nil, err + } + + var response UpdateUserResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateUserState Updates the state of the specified user. func (client IdentityClient) UpdateUserState(ctx context.Context, request UpdateUserStateRequest) (response UpdateUserStateResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}/state/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateUserState, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateUserStateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateUserStateResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateUserState implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) updateUserState(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/state/") + if err != nil { + return nil, err + } + + var response UpdateUserStateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UploadApiKey Uploads an API signing key for the specified user. @@ -1150,18 +3054,39 @@ func (client IdentityClient) UpdateUserState(ctx context.Context, request Update // After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using // the object, first make sure its `lifecycleState` has changed to ACTIVE. func (client IdentityClient) UploadApiKey(ctx context.Context, request UploadApiKeyRequest) (response UploadApiKeyResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/apiKeys/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.uploadApiKey, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UploadApiKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UploadApiKeyResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// uploadApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityClient) uploadApiKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/apiKeys/") + if err != nil { + return nil, err + } + + var response UploadApiKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go index 170df8879..6b3f9c572 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go @@ -59,6 +59,16 @@ type IdentityProvider interface { // The detailed status of INACTIVE lifecycleState. GetInactiveStatus() *int + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} } type identityprovider struct { @@ -71,6 +81,8 @@ type identityprovider struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Protocol string `json:"protocol"` } @@ -93,6 +105,8 @@ func (m *identityprovider) UnmarshalJSON(data []byte) error { m.TimeCreated = s.Model.TimeCreated m.LifecycleState = s.Model.LifecycleState m.InactiveStatus = s.Model.InactiveStatus + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags m.Protocol = s.Model.Protocol return err @@ -151,6 +165,16 @@ func (m identityprovider) GetInactiveStatus() *int { return m.InactiveStatus } +//GetFreeformTags returns FreeformTags +func (m identityprovider) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m identityprovider) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + func (m identityprovider) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go index 62ce550f5..8193e69eb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go @@ -13,12 +13,30 @@ type ListApiKeysRequest struct { // The OCID of the user. UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListApiKeysRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListApiKeysRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListApiKeysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListApiKeysResponse wrapper for the ListApiKeys operation type ListApiKeysResponse struct { @@ -41,3 +59,8 @@ type ListApiKeysResponse struct { func (response ListApiKeysResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListApiKeysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go new file mode 100644 index 000000000..6a9ffca80 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListAuthTokensRequest wrapper for the ListAuthTokens operation +type ListAuthTokensRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAuthTokensRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAuthTokensRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAuthTokensRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListAuthTokensResponse wrapper for the ListAuthTokens operation +type ListAuthTokensResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []AuthToken instance + Items []AuthToken `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListAuthTokensResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAuthTokensResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go index 407c2a36a..917b4288d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go @@ -13,12 +13,30 @@ type ListAvailabilityDomainsRequest struct { // The OCID of the compartment (remember that the tenancy is simply the root compartment). CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListAvailabilityDomainsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListAvailabilityDomainsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAvailabilityDomainsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListAvailabilityDomainsResponse wrapper for the ListAvailabilityDomains operation type ListAvailabilityDomainsResponse struct { @@ -41,3 +59,8 @@ type ListAvailabilityDomainsResponse struct { func (response ListAvailabilityDomainsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListAvailabilityDomainsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go index 6d4338d3d..d132e3467 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go @@ -19,19 +19,37 @@ type ListCompartmentsRequest struct { // The maximum number of items to return in a paginated "List" call. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCompartmentsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCompartmentsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCompartmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCompartmentsResponse wrapper for the ListCompartments operation type ListCompartmentsResponse struct { // The underlying http response RawResponse *http.Response - // The []Compartment instance + // A list of []Compartment instances Items []Compartment `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -47,3 +65,8 @@ type ListCompartmentsResponse struct { func (response ListCompartmentsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListCompartmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go index a1de6bb33..885d7ee96 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go @@ -13,12 +13,30 @@ type ListCustomerSecretKeysRequest struct { // The OCID of the user. UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCustomerSecretKeysRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCustomerSecretKeysRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCustomerSecretKeysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCustomerSecretKeysResponse wrapper for the ListCustomerSecretKeys operation type ListCustomerSecretKeysResponse struct { @@ -41,3 +59,8 @@ type ListCustomerSecretKeysResponse struct { func (response ListCustomerSecretKeysResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListCustomerSecretKeysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go new file mode 100644 index 000000000..9821c3bf3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDynamicGroupsRequest wrapper for the ListDynamicGroups operation +type ListDynamicGroupsRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDynamicGroupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDynamicGroupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDynamicGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListDynamicGroupsResponse wrapper for the ListDynamicGroups operation +type ListDynamicGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DynamicGroup instances + Items []DynamicGroup `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListDynamicGroupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDynamicGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_fault_domains_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_fault_domains_request_response.go deleted file mode 100644 index 58e8cf4ed..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_fault_domains_request_response.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListFaultDomainsRequest wrapper for the ListFaultDomains operation -type ListFaultDomainsRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The name of the availibilityDomain. - AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` -} - -func (request ListFaultDomainsRequest) String() string { - return common.PointerString(request) -} - -// ListFaultDomainsResponse wrapper for the ListFaultDomains operation -type ListFaultDomainsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []FaultDomain instance - Items []FaultDomain `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListFaultDomainsResponse) String() string { - return common.PointerString(response) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go index b466a566f..29e9d14ec 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go @@ -19,19 +19,37 @@ type ListGroupsRequest struct { // The maximum number of items to return in a paginated "List" call. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListGroupsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListGroupsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListGroupsResponse wrapper for the ListGroups operation type ListGroupsResponse struct { // The underlying http response RawResponse *http.Response - // The []Group instance + // A list of []Group instances Items []Group `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -47,3 +65,8 @@ type ListGroupsResponse struct { func (response ListGroupsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go index abebf6877..f7200987e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go @@ -22,19 +22,37 @@ type ListIdentityProvidersRequest struct { // The maximum number of items to return in a paginated "List" call. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListIdentityProvidersRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListIdentityProvidersRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIdentityProvidersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListIdentityProvidersResponse wrapper for the ListIdentityProviders operation type ListIdentityProvidersResponse struct { // The underlying http response RawResponse *http.Response - // The []IdentityProvider instance + // A list of []IdentityProvider instances Items []IdentityProvider `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -51,6 +69,11 @@ func (response ListIdentityProvidersResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListIdentityProvidersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListIdentityProvidersProtocolEnum Enum with underlying type: string type ListIdentityProvidersProtocolEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go index 09323f659..0c7536f42 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go @@ -19,19 +19,37 @@ type ListIdpGroupMappingsRequest struct { // The maximum number of items to return in a paginated "List" call. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListIdpGroupMappingsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListIdpGroupMappingsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIdpGroupMappingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListIdpGroupMappingsResponse wrapper for the ListIdpGroupMappings operation type ListIdpGroupMappingsResponse struct { // The underlying http response RawResponse *http.Response - // The []IdpGroupMapping instance + // A list of []IdpGroupMapping instances Items []IdpGroupMapping `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -47,3 +65,8 @@ type ListIdpGroupMappingsResponse struct { func (response ListIdpGroupMappingsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListIdpGroupMappingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go index 6b6461d28..3b9b2f94e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go @@ -19,19 +19,37 @@ type ListPoliciesRequest struct { // The maximum number of items to return in a paginated "List" call. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListPoliciesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListPoliciesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListPoliciesResponse wrapper for the ListPolicies operation type ListPoliciesResponse struct { // The underlying http response RawResponse *http.Response - // The []Policy instance + // A list of []Policy instances Items []Policy `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -47,3 +65,8 @@ type ListPoliciesResponse struct { func (response ListPoliciesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go index a10917633..48619d703 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go @@ -13,12 +13,30 @@ type ListRegionSubscriptionsRequest struct { // The OCID of the tenancy. TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListRegionSubscriptionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListRegionSubscriptionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRegionSubscriptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListRegionSubscriptionsResponse wrapper for the ListRegionSubscriptions operation type ListRegionSubscriptionsResponse struct { @@ -36,3 +54,8 @@ type ListRegionSubscriptionsResponse struct { func (response ListRegionSubscriptionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListRegionSubscriptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go index 528b6b863..7d1a5faba 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go @@ -10,12 +10,30 @@ import ( // ListRegionsRequest wrapper for the ListRegions operation type ListRegionsRequest struct { + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListRegionsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListRegionsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRegionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListRegionsResponse wrapper for the ListRegions operation type ListRegionsResponse struct { @@ -33,3 +51,8 @@ type ListRegionsResponse struct { func (response ListRegionsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListRegionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go new file mode 100644 index 000000000..dc6e099d8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListSmtpCredentialsRequest wrapper for the ListSmtpCredentials operation +type ListSmtpCredentialsRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSmtpCredentialsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSmtpCredentialsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSmtpCredentialsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListSmtpCredentialsResponse wrapper for the ListSmtpCredentials operation +type ListSmtpCredentialsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []SmtpCredentialSummary instance + Items []SmtpCredentialSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSmtpCredentialsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSmtpCredentialsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go index 86d737c0f..eb6bc6b48 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go @@ -13,12 +13,30 @@ type ListSwiftPasswordsRequest struct { // The OCID of the user. UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListSwiftPasswordsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListSwiftPasswordsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSwiftPasswordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListSwiftPasswordsResponse wrapper for the ListSwiftPasswords operation type ListSwiftPasswordsResponse struct { @@ -41,3 +59,8 @@ type ListSwiftPasswordsResponse struct { func (response ListSwiftPasswordsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListSwiftPasswordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go new file mode 100644 index 000000000..5d367d537 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListTagNamespacesRequest wrapper for the ListTagNamespaces operation +type ListTagNamespacesRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // An optional boolean parameter indicating whether to retrieve all tag namespaces in subcompartments. If this + // parameter is not specified, only the tag namespaces defined in the specified compartment are retrieved. + IncludeSubcompartments *bool `mandatory:"false" contributesTo:"query" name:"includeSubcompartments"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListTagNamespacesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListTagNamespacesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListTagNamespacesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListTagNamespacesResponse wrapper for the ListTagNamespaces operation +type ListTagNamespacesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []TagNamespaceSummary instances + Items []TagNamespaceSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of tagNamespaces. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListTagNamespacesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListTagNamespacesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go new file mode 100644 index 000000000..fe201c404 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListTagsRequest wrapper for the ListTags operation +type ListTagsRequest struct { + + // The OCID of the tag namespace. + TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListTagsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListTagsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListTagsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListTagsResponse wrapper for the ListTags operation +type ListTagsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []TagSummary instances + Items []TagSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of tags. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListTagsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListTagsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go index 3f6d406b8..bedd1f697 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go @@ -25,19 +25,37 @@ type ListUserGroupMembershipsRequest struct { // The maximum number of items to return in a paginated "List" call. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListUserGroupMembershipsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListUserGroupMembershipsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListUserGroupMembershipsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListUserGroupMembershipsResponse wrapper for the ListUserGroupMemberships operation type ListUserGroupMembershipsResponse struct { // The underlying http response RawResponse *http.Response - // The []UserGroupMembership instance + // A list of []UserGroupMembership instances Items []UserGroupMembership `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -53,3 +71,8 @@ type ListUserGroupMembershipsResponse struct { func (response ListUserGroupMembershipsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListUserGroupMembershipsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go index 905d7e8c5..3bdd6b6a0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go @@ -19,19 +19,37 @@ type ListUsersRequest struct { // The maximum number of items to return in a paginated "List" call. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListUsersRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListUsersRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListUsersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListUsersResponse wrapper for the ListUsers operation type ListUsersResponse struct { // The underlying http response RawResponse *http.Response - // The []User instance + // A list of []User instances Items []User `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -47,3 +65,8 @@ type ListUsersResponse struct { func (response ListUsersResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListUsersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/policy.go b/vendor/github.com/oracle/oci-go-sdk/identity/policy.go index 39eacc77a..be04461b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/policy.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/policy.go @@ -55,6 +55,16 @@ type Policy struct { // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m Policy) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/region.go b/vendor/github.com/oracle/oci-go-sdk/identity/region.go index ba73a4453..36fa7d1d6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/region.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/region.go @@ -25,6 +25,7 @@ type Region struct { // - `PHX` // - `IAD` // - `FRA` + // - `LHR` Key *string `mandatory:"false" json:"key"` // The name of the region. @@ -32,6 +33,7 @@ type Region struct { // - `us-phoenix-1` // - `us-ashburn-1` // - `eu-frankfurt-1` + // - `uk-london-1` Name *string `mandatory:"false" json:"name"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go b/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go index dfa9f26b6..040558980 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go @@ -24,6 +24,7 @@ type RegionSubscription struct { // - `PHX` // - `IAD` // - `FRA` + // - `LHR` RegionKey *string `mandatory:"true" json:"regionKey"` // The region's name. @@ -31,6 +32,7 @@ type RegionSubscription struct { // - `us-phoenix-1` // - `us-ashburn-1` // - `eu-frankurt-1` + // - `uk-london-1` RegionName *string `mandatory:"true" json:"regionName"` // The region subscription status. diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go index afed269d0..b488021ed 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go @@ -18,12 +18,30 @@ type RemoveUserFromGroupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request RemoveUserFromGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request RemoveUserFromGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveUserFromGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // RemoveUserFromGroupResponse wrapper for the RemoveUserFromGroup operation type RemoveUserFromGroupResponse struct { @@ -38,3 +56,8 @@ type RemoveUserFromGroupResponse struct { func (response RemoveUserFromGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response RemoveUserFromGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go index 0ef2511b3..265b07748 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go @@ -63,6 +63,16 @@ type Saml2IdentityProvider struct { // The detailed status of INACTIVE lifecycleState. InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The current state. After creating an `IdentityProvider`, make sure its // `lifecycleState` changes from CREATING to ACTIVE before using it. LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` @@ -108,6 +118,16 @@ func (m Saml2IdentityProvider) GetInactiveStatus() *int { return m.InactiveStatus } +//GetFreeformTags returns FreeformTags +func (m Saml2IdentityProvider) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m Saml2IdentityProvider) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + func (m Saml2IdentityProvider) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go b/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go new file mode 100644 index 000000000..e2b8bda13 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SmtpCredential Simple Mail Transfer Protocol (SMTP) credentials are needed to send email through Email Delivery. +// The SMTP credentials are used for SMTP authentication with the service. The credentials never expire. +// A user can have up to 2 SMTP credentials at a time. +// **Note:** The credential set is always an Oracle-generated SMTP user name and password pair; +// you cannot designate the SMTP user name or the SMTP password. +// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm#SMTP). +type SmtpCredential struct { + + // The SMTP user name. + Username *string `mandatory:"false" json:"username"` + + // The SMTP password. + Password *string `mandatory:"false" json:"password"` + + // The OCID of the SMTP credential. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the user the SMTP credential belongs to. + UserId *string `mandatory:"false" json:"userId"` + + // The description you assign to the SMTP credential. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // Date and time the `SmtpCredential` object was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Date and time when this credential will expire, in the format defined by RFC3339. + // Null if it never expires. + // Example: `2016-08-25T21:10:29.600Z` + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The credential's current state. After creating a SMTP credential, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState SmtpCredentialLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m SmtpCredential) String() string { + return common.PointerString(m) +} + +// SmtpCredentialLifecycleStateEnum Enum with underlying type: string +type SmtpCredentialLifecycleStateEnum string + +// Set of constants representing the allowable values for SmtpCredentialLifecycleState +const ( + SmtpCredentialLifecycleStateCreating SmtpCredentialLifecycleStateEnum = "CREATING" + SmtpCredentialLifecycleStateActive SmtpCredentialLifecycleStateEnum = "ACTIVE" + SmtpCredentialLifecycleStateInactive SmtpCredentialLifecycleStateEnum = "INACTIVE" + SmtpCredentialLifecycleStateDeleting SmtpCredentialLifecycleStateEnum = "DELETING" + SmtpCredentialLifecycleStateDeleted SmtpCredentialLifecycleStateEnum = "DELETED" +) + +var mappingSmtpCredentialLifecycleState = map[string]SmtpCredentialLifecycleStateEnum{ + "CREATING": SmtpCredentialLifecycleStateCreating, + "ACTIVE": SmtpCredentialLifecycleStateActive, + "INACTIVE": SmtpCredentialLifecycleStateInactive, + "DELETING": SmtpCredentialLifecycleStateDeleting, + "DELETED": SmtpCredentialLifecycleStateDeleted, +} + +// GetSmtpCredentialLifecycleStateEnumValues Enumerates the set of values for SmtpCredentialLifecycleState +func GetSmtpCredentialLifecycleStateEnumValues() []SmtpCredentialLifecycleStateEnum { + values := make([]SmtpCredentialLifecycleStateEnum, 0) + for _, v := range mappingSmtpCredentialLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go new file mode 100644 index 000000000..5ad398c8b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SmtpCredentialSummary As the name suggests, an `SmtpCredentialSummary` object contains information about an `SmtpCredential`. +// The SMTP credential is used for SMTP authentication with +// the Email Delivery Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/overview.htm). +type SmtpCredentialSummary struct { + + // The SMTP user name. + Username *string `mandatory:"false" json:"username"` + + // The OCID of the SMTP credential. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the user the SMTP credential belongs to. + UserId *string `mandatory:"false" json:"userId"` + + // The description you assign to the SMTP credential. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // Date and time the `SmtpCredential` object was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Date and time when this credential will expire, in the format defined by RFC3339. + // Null if it never expires. + // Example: `2016-08-25T21:10:29.600Z` + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The credential's current state. After creating a SMTP credential, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState SmtpCredentialSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m SmtpCredentialSummary) String() string { + return common.PointerString(m) +} + +// SmtpCredentialSummaryLifecycleStateEnum Enum with underlying type: string +type SmtpCredentialSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for SmtpCredentialSummaryLifecycleState +const ( + SmtpCredentialSummaryLifecycleStateCreating SmtpCredentialSummaryLifecycleStateEnum = "CREATING" + SmtpCredentialSummaryLifecycleStateActive SmtpCredentialSummaryLifecycleStateEnum = "ACTIVE" + SmtpCredentialSummaryLifecycleStateInactive SmtpCredentialSummaryLifecycleStateEnum = "INACTIVE" + SmtpCredentialSummaryLifecycleStateDeleting SmtpCredentialSummaryLifecycleStateEnum = "DELETING" + SmtpCredentialSummaryLifecycleStateDeleted SmtpCredentialSummaryLifecycleStateEnum = "DELETED" +) + +var mappingSmtpCredentialSummaryLifecycleState = map[string]SmtpCredentialSummaryLifecycleStateEnum{ + "CREATING": SmtpCredentialSummaryLifecycleStateCreating, + "ACTIVE": SmtpCredentialSummaryLifecycleStateActive, + "INACTIVE": SmtpCredentialSummaryLifecycleStateInactive, + "DELETING": SmtpCredentialSummaryLifecycleStateDeleting, + "DELETED": SmtpCredentialSummaryLifecycleStateDeleted, +} + +// GetSmtpCredentialSummaryLifecycleStateEnumValues Enumerates the set of values for SmtpCredentialSummaryLifecycleState +func GetSmtpCredentialSummaryLifecycleStateEnumValues() []SmtpCredentialSummaryLifecycleStateEnum { + values := make([]SmtpCredentialSummaryLifecycleStateEnum, 0) + for _, v := range mappingSmtpCredentialSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go b/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go index 89a37c63c..92bab6995 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go @@ -12,8 +12,9 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// SwiftPassword Swift is the OpenStack object storage service. A `SwiftPassword` is an Oracle-provided password for using a -// Swift client with the Oracle Cloud Infrastructure Object Storage Service. This password is associated with +// SwiftPassword **Deprecated. Use AuthToken instead.** +// Swift is the OpenStack object storage service. A `SwiftPassword` is an Oracle-provided password for using a +// Swift client with the Object Storage Service. This password is associated with // the user's Console login. Swift passwords never expire. A user can have up to two Swift passwords at a time. // **Note:** The password is always an Oracle-generated string; you can't change it to a string of your choice. // For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag.go new file mode 100644 index 000000000..73f408ced --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/tag.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Tag A tag definition that belongs to a specific tag namespace. "Defined tags" must be set up in your tenancy before +// you can apply them to resources. +// For more information, see Managing Tags and Tag Namespaces (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm). +type Tag struct { + + // The OCID of the compartment that contains the tag definition. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the namespace that contains the tag definition. + TagNamespaceId *string `mandatory:"true" json:"tagNamespaceId"` + + // The name of the tag namespace that contains the tag definition. + TagNamespaceName *string `mandatory:"true" json:"tagNamespaceName"` + + // The OCID of the tag definition. + Id *string `mandatory:"true" json:"id"` + + // The name of the tag. The name must be unique across all tags in the namespace and can't be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the tag. + Description *string `mandatory:"true" json:"description"` + + // Indicates whether the tag is retired. + // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). + IsRetired *bool `mandatory:"true" json:"isRetired"` + + // Date and time the tag was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}`` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m Tag) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go new file mode 100644 index 000000000..b04a28ea7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// TagNamespace A managed container for defined tags. A tag namespace is unique in a tenancy. A tag namespace can't be deleted. +// For more information, see Managing Tags and Tag Namespaces (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm). +type TagNamespace struct { + + // The OCID of the tag namespace. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment that contains the tag namespace. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name of the tag namespace. It must be unique across all tag namespaces in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the tag namespace. + Description *string `mandatory:"true" json:"description"` + + // Whether the tag namespace is retired. + // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). + IsRetired *bool `mandatory:"true" json:"isRetired"` + + // Date and time the tagNamespace was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m TagNamespace) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go new file mode 100644 index 000000000..c4c2ffe05 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// TagNamespaceSummary A container for defined tags. +type TagNamespaceSummary struct { + + // The OCID of the tag namespace. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the compartment that contains the tag namespace. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The name of the tag namespace. It must be unique across all tag namespaces in the tenancy and cannot be changed. + Name *string `mandatory:"false" json:"name"` + + // The description you assign to the tag namespace. + Description *string `mandatory:"false" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Whether the tag namespace is retired. + // For more information, see Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). + IsRetired *bool `mandatory:"false" json:"isRetired"` + + // Date and time the tagNamespace was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m TagNamespaceSummary) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go new file mode 100644 index 000000000..44cf2b71a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// TagSummary A tag definition that belongs to a specific tag namespace. +type TagSummary struct { + + // The OCID of the compartment that contains the tag definition. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the tag definition. + Id *string `mandatory:"false" json:"id"` + + // The name of the tag. The name must be unique across all tags in the tag namespace and can't be changed. + Name *string `mandatory:"false" json:"name"` + + // The description you assign to the tag. + Description *string `mandatory:"false" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Whether the tag is retired. + // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). + IsRetired *bool `mandatory:"false" json:"isRetired"` + + // Date and time the tag was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m TagSummary) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go b/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go index 676b91b9a..1acda2f54 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go @@ -30,12 +30,24 @@ type Tenancy struct { // The description of the tenancy. Description *string `mandatory:"false" json:"description"` - // The region key for the tenancy's home region. + // The region key for the tenancy's home region. For more information about regions, see + // Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). // Allowed values are: // - `IAD` // - `PHX` // - `FRA` + // - `LHR` HomeRegionKey *string `mandatory:"false" json:"homeRegionKey"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m Tenancy) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go new file mode 100644 index 000000000..60d3729a3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateAuthTokenDetails The representation of UpdateAuthTokenDetails +type UpdateAuthTokenDetails struct { + + // The description you assign to the auth token. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` +} + +func (m UpdateAuthTokenDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go new file mode 100644 index 000000000..a318401be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateAuthTokenRequest wrapper for the UpdateAuthToken operation +type UpdateAuthTokenRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the auth token. + AuthTokenId *string `mandatory:"true" contributesTo:"path" name:"authTokenId"` + + // Request object for updating an auth token. + UpdateAuthTokenDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateAuthTokenRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateAuthTokenRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateAuthTokenRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateAuthTokenResponse wrapper for the UpdateAuthToken operation +type UpdateAuthTokenResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AuthToken instance + AuthToken `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateAuthTokenResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateAuthTokenResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go index 0e064808c..1d0abe20e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go @@ -19,7 +19,18 @@ type UpdateCompartmentDetails struct { Description *string `mandatory:"false" json:"description"` // The new name you assign to the compartment. The name must be unique across all compartments in the tenancy. + // Avoid entering confidential information. Name *string `mandatory:"false" json:"name"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m UpdateCompartmentDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go index 217bc6877..12defce75 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go @@ -21,12 +21,30 @@ type UpdateCompartmentRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateCompartmentRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateCompartmentResponse wrapper for the UpdateCompartment operation type UpdateCompartmentResponse struct { @@ -47,3 +65,8 @@ type UpdateCompartmentResponse struct { func (response UpdateCompartmentResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go index e722571e7..c39922e4d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go @@ -24,12 +24,30 @@ type UpdateCustomerSecretKeyRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateCustomerSecretKeyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateCustomerSecretKeyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCustomerSecretKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateCustomerSecretKeyResponse wrapper for the UpdateCustomerSecretKey operation type UpdateCustomerSecretKeyResponse struct { @@ -50,3 +68,8 @@ type UpdateCustomerSecretKeyResponse struct { func (response UpdateCustomerSecretKeyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCustomerSecretKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go new file mode 100644 index 000000000..84059385c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateDynamicGroupDetails Properties for updating a dynamic group. +type UpdateDynamicGroupDetails struct { + + // The description you assign to the dynamic group. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // The matching rule to dynamically match an instance certificate to this dynamic group. + // For rule syntax, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). + MatchingRule *string `mandatory:"false" json:"matchingRule"` +} + +func (m UpdateDynamicGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go new file mode 100644 index 000000000..04a435426 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDynamicGroupRequest wrapper for the UpdateDynamicGroup operation +type UpdateDynamicGroupRequest struct { + + // The OCID of the dynamic group. + DynamicGroupId *string `mandatory:"true" contributesTo:"path" name:"dynamicGroupId"` + + // Request object for updating an dynamic group. + UpdateDynamicGroupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDynamicGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateDynamicGroupResponse wrapper for the UpdateDynamicGroup operation +type UpdateDynamicGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DynamicGroup instance + DynamicGroup `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateDynamicGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDynamicGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go index 35a082a90..5c613d256 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go @@ -17,6 +17,16 @@ type UpdateGroupDetails struct { // The description you assign to the group. Does not have to be unique, and it's changeable. Description *string `mandatory:"false" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m UpdateGroupDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go index 75840e1c0..c7afc1848 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go @@ -21,12 +21,30 @@ type UpdateGroupRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateGroupRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateGroupRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateGroupResponse wrapper for the UpdateGroup operation type UpdateGroupResponse struct { @@ -47,3 +65,8 @@ type UpdateGroupResponse struct { func (response UpdateGroupResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go index 976c40edf..175591cdf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go @@ -19,12 +19,24 @@ type UpdateIdentityProviderDetails interface { // The description you assign to the `IdentityProvider`. Does not have to // be unique, and it's changeable. GetDescription() *string + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} } type updateidentityproviderdetails struct { - JsonData []byte - Description *string `mandatory:"false" json:"description"` - Protocol string `json:"protocol"` + JsonData []byte + Description *string `mandatory:"false" json:"description"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + Protocol string `json:"protocol"` } // UnmarshalJSON unmarshals json @@ -39,6 +51,8 @@ func (m *updateidentityproviderdetails) UnmarshalJSON(data []byte) error { return err } m.Description = s.Model.Description + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags m.Protocol = s.Model.Protocol return err @@ -62,6 +76,16 @@ func (m updateidentityproviderdetails) GetDescription() *string { return m.Description } +//GetFreeformTags returns FreeformTags +func (m updateidentityproviderdetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m updateidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + func (m updateidentityproviderdetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go index e092b59f4..74b06bc9e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go @@ -21,12 +21,30 @@ type UpdateIdentityProviderRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateIdentityProviderRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateIdentityProviderResponse wrapper for the UpdateIdentityProvider operation type UpdateIdentityProviderResponse struct { @@ -47,3 +65,8 @@ type UpdateIdentityProviderResponse struct { func (response UpdateIdentityProviderResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIdentityProviderResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go index be9dbd3df..d90d88f69 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go @@ -24,12 +24,30 @@ type UpdateIdpGroupMappingRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateIdpGroupMappingRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateIdpGroupMappingResponse wrapper for the UpdateIdpGroupMapping operation type UpdateIdpGroupMappingResponse struct { @@ -50,3 +68,8 @@ type UpdateIdpGroupMappingResponse struct { func (response UpdateIdpGroupMappingResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIdpGroupMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go index 3fd45b64e..264f4aef7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go @@ -27,6 +27,16 @@ type UpdatePolicyDetails struct { // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m UpdatePolicyDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go index 198afbecd..25c214550 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go @@ -21,12 +21,30 @@ type UpdatePolicyRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdatePolicyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdatePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdatePolicyResponse wrapper for the UpdatePolicy operation type UpdatePolicyResponse struct { @@ -47,3 +65,8 @@ type UpdatePolicyResponse struct { func (response UpdatePolicyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go index f83217f2b..7e28f96ca 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go @@ -20,6 +20,16 @@ type UpdateSaml2IdentityProviderDetails struct { // be unique, and it's changeable. Description *string `mandatory:"false" json:"description"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // The URL for retrieving the identity provider's metadata, // which contains information required for federating. MetadataUrl *string `mandatory:"false" json:"metadataUrl"` @@ -33,6 +43,16 @@ func (m UpdateSaml2IdentityProviderDetails) GetDescription() *string { return m.Description } +//GetFreeformTags returns FreeformTags +func (m UpdateSaml2IdentityProviderDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m UpdateSaml2IdentityProviderDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + func (m UpdateSaml2IdentityProviderDetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go new file mode 100644 index 000000000..04d580033 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateSmtpCredentialDetails The representation of UpdateSmtpCredentialDetails +type UpdateSmtpCredentialDetails struct { + + // The description you assign to the SMTP credential. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` +} + +func (m UpdateSmtpCredentialDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go new file mode 100644 index 000000000..730db05b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateSmtpCredentialRequest wrapper for the UpdateSmtpCredential operation +type UpdateSmtpCredentialRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the SMTP credential. + SmtpCredentialId *string `mandatory:"true" contributesTo:"path" name:"smtpCredentialId"` + + // Request object for updating a SMTP credential. + UpdateSmtpCredentialDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateSmtpCredentialRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateSmtpCredentialRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSmtpCredentialRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateSmtpCredentialResponse wrapper for the UpdateSmtpCredential operation +type UpdateSmtpCredentialResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SmtpCredentialSummary instance + SmtpCredentialSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateSmtpCredentialResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSmtpCredentialResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go index 0ec212ff8..c1d82d8ae 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go @@ -24,12 +24,30 @@ type UpdateSwiftPasswordRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateSwiftPasswordRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateSwiftPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSwiftPasswordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateSwiftPasswordResponse wrapper for the UpdateSwiftPassword operation type UpdateSwiftPasswordResponse struct { @@ -50,3 +68,8 @@ type UpdateSwiftPasswordResponse struct { func (response UpdateSwiftPasswordResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSwiftPasswordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go new file mode 100644 index 000000000..0abb1f972 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateTagDetails The representation of UpdateTagDetails +type UpdateTagDetails struct { + + // The description you assign to the tag during creation. + Description *string `mandatory:"false" json:"description"` + + // Whether the tag is retired. + // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). + IsRetired *bool `mandatory:"false" json:"isRetired"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateTagDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go new file mode 100644 index 000000000..78dd3f2f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateTagNamespaceDetails The representation of UpdateTagNamespaceDetails +type UpdateTagNamespaceDetails struct { + + // The description you assign to the tag namespace. + Description *string `mandatory:"false" json:"description"` + + // Whether the tag namespace is retired. + // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). + IsRetired *bool `mandatory:"false" json:"isRetired"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateTagNamespaceDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go new file mode 100644 index 000000000..c2ae136b7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateTagNamespaceRequest wrapper for the UpdateTagNamespace operation +type UpdateTagNamespaceRequest struct { + + // The OCID of the tag namespace. + TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` + + // Request object for updating a namespace. + UpdateTagNamespaceDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateTagNamespaceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateTagNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateTagNamespaceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateTagNamespaceResponse wrapper for the UpdateTagNamespace operation +type UpdateTagNamespaceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TagNamespace instance + TagNamespace `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateTagNamespaceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateTagNamespaceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go new file mode 100644 index 000000000..6fc3cd6c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateTagRequest wrapper for the UpdateTag operation +type UpdateTagRequest struct { + + // The OCID of the tag namespace. + TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` + + // The name of the tag. + TagName *string `mandatory:"true" contributesTo:"path" name:"tagName"` + + // Request object for updating a tag. + UpdateTagDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateTagRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateTagRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateTagRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateTagResponse wrapper for the UpdateTag operation +type UpdateTagResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Tag instance + Tag `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateTagResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateTagResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go index 07b2ce2a4..84363a12c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go @@ -17,6 +17,16 @@ type UpdateUserDetails struct { // The description you assign to the user. Does not have to be unique, and it's changeable. Description *string `mandatory:"false" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m UpdateUserDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go index 41565565e..952f3790d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go @@ -21,12 +21,30 @@ type UpdateUserRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateUserRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateUserRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateUserRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateUserResponse wrapper for the UpdateUser operation type UpdateUserResponse struct { @@ -47,3 +65,8 @@ type UpdateUserResponse struct { func (response UpdateUserResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateUserResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go index f1e2c7514..86b46c6eb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go @@ -21,12 +21,30 @@ type UpdateUserStateRequest struct { // parameter to the value of the etag from a previous GET or POST response for that resource. The resource // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateUserStateRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateUserStateRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateUserStateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateUserStateResponse wrapper for the UpdateUserState operation type UpdateUserStateResponse struct { @@ -47,3 +65,8 @@ type UpdateUserStateResponse struct { func (response UpdateUserStateResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateUserStateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go index 4a971b526..defdc1237 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go @@ -23,12 +23,30 @@ type UploadApiKeyRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UploadApiKeyRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UploadApiKeyRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UploadApiKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UploadApiKeyResponse wrapper for the UploadApiKey operation type UploadApiKeyResponse struct { @@ -49,3 +67,8 @@ type UploadApiKeyResponse struct { func (response UploadApiKeyResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UploadApiKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/user.go b/vendor/github.com/oracle/oci-go-sdk/identity/user.go index 945e672e4..af4c328a2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/identity/user.go +++ b/vendor/github.com/oracle/oci-go-sdk/identity/user.go @@ -15,7 +15,8 @@ import ( // User An individual employee or system that needs to manage or use your company's Oracle Cloud Infrastructure // resources. Users might need to launch instances, manage remote disks, work with your cloud network, etc. Users // have one or more IAM Service credentials (ApiKey, -// UIPassword, and SwiftPassword). +// UIPassword, SwiftPassword and +// AuthToken). // For more information, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usercredentials.htm)). End users of your // application are not typically IAM Service users. For conceptual information about users and other IAM Service // components, see Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). @@ -55,6 +56,16 @@ type User struct { // - bit 1: DISABLED (reserved for future use) // - bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console) InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m User) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go index ecca968c3..cb6185170 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go @@ -18,25 +18,25 @@ type Backend struct { // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `true` + // Example: `false` Backup *bool `mandatory:"true" json:"backup"` // Whether the load balancer should drain this server. Servers marked "drain" receive no new // incoming traffic. - // Example: `true` + // Example: `false` Drain *bool `mandatory:"true" json:"drain"` // The IP address of the backend server. - // Example: `10.10.10.4` + // Example: `10.0.0.3` IpAddress *string `mandatory:"true" json:"ipAddress"` // A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. - // Example: `10.10.10.4:8080` + // Example: `10.0.0.3:8080` Name *string `mandatory:"true" json:"name"` // Whether the load balancer should treat this server as offline. Offline servers receive no incoming // traffic. - // Example: `true` + // Example: `false` Offline *bool `mandatory:"true" json:"offline"` // The communication port for the backend server. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go index a65e538e3..bc2744227 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go @@ -16,7 +16,7 @@ import ( type BackendDetails struct { // The IP address of the backend server. - // Example: `10.10.10.4` + // Example: `10.0.0.3` IpAddress *string `mandatory:"true" json:"ipAddress"` // The communication port for the backend server. @@ -25,17 +25,17 @@ type BackendDetails struct { // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `true` + // Example: `false` Backup *bool `mandatory:"false" json:"backup"` // Whether the load balancer should drain this server. Servers marked "drain" receive no new // incoming traffic. - // Example: `true` + // Example: `false` Drain *bool `mandatory:"false" json:"drain"` // Whether the load balancer should treat this server as offline. Offline servers receive no incoming // traffic. - // Example: `true` + // Example: `false` Offline *bool `mandatory:"false" json:"offline"` // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go index c47097c7a..8932a1c0a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go @@ -23,7 +23,7 @@ type BackendSet struct { // A friendly name for the backend set. It must be unique and it cannot be changed. // Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot // contain spaces. Avoid entering confidential information. - // Example: `My_backend_set` + // Example: `example_backend_set` Name *string `mandatory:"true" json:"name"` // The load balancer policy for the backend set. To get a list of available policies, use the diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go index 1ef062996..9e656d7ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go @@ -19,7 +19,7 @@ type BackendSetHealth struct { // A list of backend servers that are currently in the `CRITICAL` health state. The list identifies each backend server by // IP address and port. - // Example: `1.1.1.1:80` + // Example: `10.0.0.4:8080` CriticalStateBackendNames []string `mandatory:"true" json:"criticalStateBackendNames"` // Overall health status of the backend set. @@ -32,17 +32,17 @@ type BackendSetHealth struct { Status BackendSetHealthStatusEnum `mandatory:"true" json:"status"` // The total number of backend servers in this backend set. - // Example: `5` + // Example: `7` TotalBackendCount *int `mandatory:"true" json:"totalBackendCount"` // A list of backend servers that are currently in the `UNKNOWN` health state. The list identifies each backend server by // IP address and port. - // Example: `1.1.1.5:80` + // Example: `10.0.0.5:8080` UnknownStateBackendNames []string `mandatory:"true" json:"unknownStateBackendNames"` // A list of backend servers that are currently in the `WARNING` health state. The list identifies each backend server by // IP address and port. - // Example: `1.1.1.7:42` + // Example: `10.0.0.3:8080` WarningStateBackendNames []string `mandatory:"true" json:"warningStateBackendNames"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go index e2d038de7..c66a770b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go @@ -12,7 +12,7 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// Certificate The configuration details of a listener certificate bundle. +// Certificate The configuration details of a certificate bundle. // For more information on SSL certficate configuration, see // Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). type Certificate struct { @@ -31,7 +31,7 @@ type Certificate struct { // A friendly name for the certificate bundle. It must be unique and it cannot be changed. // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `My_certificate_bundle` + // Example: `example_certificate_bundle` CertificateName *string `mandatory:"true" json:"certificateName"` // The public certificate, in PEM format, that you received from your SSL certificate provider. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go index d63af94d9..526bb3cd5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go @@ -12,7 +12,7 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// CertificateDetails The configuration details for a listener certificate bundle. +// CertificateDetails The configuration details for a certificate bundle. // For more information on SSL certficate configuration, see // Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). type CertificateDetails struct { @@ -20,7 +20,7 @@ type CertificateDetails struct { // A friendly name for the certificate bundle. It must be unique and it cannot be changed. // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `My_certificate_bundle` + // Example: `example_certificate_bundle` CertificateName *string `mandatory:"true" json:"certificateName"` // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. @@ -35,7 +35,6 @@ type CertificateDetails struct { CaCertificate *string `mandatory:"false" json:"caCertificate"` // A passphrase for encrypted private keys. This is needed only if you created your certificate with a passphrase. - // Example: `Mysecretunlockingcode42!1!` Passphrase *string `mandatory:"false" json:"passphrase"` // The SSL private key for your certificate, in PEM format. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go new file mode 100644 index 000000000..ab6bb2d21 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ConnectionConfiguration Configuration details for the connection between the client and backend servers. +type ConnectionConfiguration struct { + + // The maximum idle time, in seconds, allowed between two successive receive or two successive send operations + // between the client and backend servers. A send operation does not reset the timer for receive operations. A + // receive operation does not reset the timer for send operations. + // For more information, see Connection Configuration (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/connectionreuse.htm#ConnectionConfiguration). + // Example: `1200` + IdleTimeout *int `mandatory:"true" json:"idleTimeout"` +} + +func (m ConnectionConfiguration) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go index b47a042c0..1fc3a835f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go @@ -18,7 +18,7 @@ import ( type CreateBackendDetails struct { // The IP address of the backend server. - // Example: `10.10.10.4` + // Example: `10.0.0.3` IpAddress *string `mandatory:"true" json:"ipAddress"` // The communication port for the backend server. @@ -27,17 +27,17 @@ type CreateBackendDetails struct { // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `true` + // Example: `false` Backup *bool `mandatory:"false" json:"backup"` // Whether the load balancer should drain this server. Servers marked "drain" receive no new // incoming traffic. - // Example: `true` + // Example: `false` Drain *bool `mandatory:"false" json:"drain"` // Whether the load balancer should treat this server as offline. Offline servers receive no incoming // traffic. - // Example: `true` + // Example: `false` Offline *bool `mandatory:"false" json:"offline"` // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go index 3d14273ce..e351d21a8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go @@ -18,7 +18,7 @@ type CreateBackendRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set to add the backend server to. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -31,12 +31,26 @@ type CreateBackendRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateBackendRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateBackendRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBackendRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateBackendResponse wrapper for the CreateBackend operation type CreateBackendResponse struct { @@ -54,3 +68,8 @@ type CreateBackendResponse struct { func (response CreateBackendResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateBackendResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go index 2bf3acb40..171058a9f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go @@ -21,7 +21,7 @@ type CreateBackendSetDetails struct { // A friendly name for the backend set. It must be unique and it cannot be changed. // Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot // contain spaces. Avoid entering confidential information. - // Example: `My_backend_set` + // Example: `example_backend_set` Name *string `mandatory:"true" json:"name"` // The load balancer policy for the backend set. To get a list of available policies, use the diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go index 7617987a4..8f2576872 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go @@ -27,12 +27,26 @@ type CreateBackendSetRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateBackendSetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBackendSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateBackendSetResponse wrapper for the CreateBackendSet operation type CreateBackendSetResponse struct { @@ -50,3 +64,8 @@ type CreateBackendSetResponse struct { func (response CreateBackendSetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateBackendSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go index c7f4789bf..a84550c40 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go @@ -20,7 +20,7 @@ type CreateCertificateDetails struct { // A friendly name for the certificate bundle. It must be unique and it cannot be changed. // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `My_certificate_bundle` + // Example: `example_certificate_bundle` CertificateName *string `mandatory:"true" json:"certificateName"` // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. @@ -35,7 +35,6 @@ type CreateCertificateDetails struct { CaCertificate *string `mandatory:"false" json:"caCertificate"` // A passphrase for encrypted private keys. This is needed only if you created your certificate with a passphrase. - // Example: `Mysecretunlockingcode42!1!` Passphrase *string `mandatory:"false" json:"passphrase"` // The SSL private key for your certificate, in PEM format. @@ -52,10 +51,10 @@ type CreateCertificateDetails struct { // The public certificate, in PEM format, that you received from your SSL certificate provider. // Example: // -----BEGIN CERTIFICATE----- - // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG - // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE - // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl - // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw + // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbM..QswCQYDVQQGEwJKU + // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxE..TAPBgNVBAoTCEZyY + // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWB..gNVBAMTD0ZyYW5rN + // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmc..mFuazRkZC5jb20wH // ... // -----END CERTIFICATE----- PublicCertificate *string `mandatory:"false" json:"publicCertificate"` diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go index f92bd347e..fb6c01e99 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go @@ -11,10 +11,10 @@ import ( // CreateCertificateRequest wrapper for the CreateCertificate operation type CreateCertificateRequest struct { - // The details of the certificate to add. + // The details of the certificate bundle to add. CreateCertificateDetails `contributesTo:"body"` - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add the certificate. + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add the certificate bundle. LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -27,12 +27,26 @@ type CreateCertificateRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateCertificateRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateCertificateRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateCertificateResponse wrapper for the CreateCertificate operation type CreateCertificateResponse struct { @@ -50,3 +64,8 @@ type CreateCertificateResponse struct { func (response CreateCertificateResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go new file mode 100644 index 000000000..5bfbb4efb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateHostnameDetails The details of the hostname resource to add to a load balancer. +type CreateHostnameDetails struct { + + // A virtual hostname. For more information about virtual hostname string construction, see + // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). + // Example: `app.example.com` + Hostname *string `mandatory:"true" json:"hostname"` + + // A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential + // information. + // Example: `example_hostname_001` + Name *string `mandatory:"true" json:"name"` +} + +func (m CreateHostnameDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go new file mode 100644 index 000000000..16f3809d0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateHostnameRequest wrapper for the CreateHostname operation +type CreateHostnameRequest struct { + + // The details of the hostname resource to add to the specified load balancer. + CreateHostnameDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to add the hostname to. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateHostnameRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateHostnameRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreateHostnameResponse wrapper for the CreateHostname operation +type CreateHostnameResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateHostnameResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateHostnameResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go index 58e7b30d6..8734a6886 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go @@ -14,15 +14,16 @@ import ( // CreateListenerDetails The configuration details for adding a listener to a backend set. // For more information on listener configuration, see -// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managinglisteners.htm). +// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managinglisteners.htm). type CreateListenerDetails struct { // The name of the associated backend set. + // Example: `example_backend_set` DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` // A friendly name for the listener. It must be unique and it cannot be changed. // Avoid entering confidential information. - // Example: `My listener` + // Example: `example_listener` Name *string `mandatory:"true" json:"name"` // The communication port for the listener. @@ -35,6 +36,16 @@ type CreateListenerDetails struct { // Example: `HTTP` Protocol *string `mandatory:"true" json:"protocol"` + ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` + + // An array of hostname resource names. + HostnameNames []string `mandatory:"false" json:"hostnameNames"` + + // The name of the set of path-based routing rules, PathRouteSet, + // applied to this listener's traffic. + // Example: `example_path_route_set` + PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go index 9c9c9f570..fc461aebb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go @@ -27,12 +27,26 @@ type CreateListenerRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateListenerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateListenerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateListenerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateListenerResponse wrapper for the CreateListener operation type CreateListenerResponse struct { @@ -50,3 +64,8 @@ type CreateListenerResponse struct { func (response CreateListenerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateListenerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go index 5b08bf52a..c96321ea2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go @@ -20,7 +20,7 @@ type CreateLoadBalancerDetails struct { // A user-friendly name. It does not have to be unique, and it is changeable. // Avoid entering confidential information. - // Example: `My load balancer` + // Example: `example_load_balancer` DisplayName *string `mandatory:"true" json:"displayName"` // A template that determines the total pre-provisioned bandwidth (ingress plus egress). @@ -36,6 +36,8 @@ type CreateLoadBalancerDetails struct { Certificates map[string]CertificateDetails `mandatory:"false" json:"certificates"` + Hostnames map[string]HostnameDetails `mandatory:"false" json:"hostnames"` + // Whether the load balancer has a VCN-local (private) IP address. // If "true", the service assigns a private IP address to the load balancer. The load balancer requires only one subnet // to host both the primary and secondary load balancers. The private IP address is local to the subnet. The load balancer @@ -46,10 +48,12 @@ type CreateLoadBalancerDetails struct { // requires two subnets, each in a different Availability Domain. One subnet hosts the primary load balancer and the other // hosts the secondary (standby) load balancer. A public load balancer is accessible from the internet, depending on your // VCN's security list rules (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). - // Example: `false` + // Example: `true` IsPrivate *bool `mandatory:"false" json:"isPrivate"` Listeners map[string]ListenerDetails `mandatory:"false" json:"listeners"` + + PathRouteSets map[string]PathRouteSetDetails `mandatory:"false" json:"pathRouteSets"` } func (m CreateLoadBalancerDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go index 0ff053e4e..9f51806e1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go @@ -24,12 +24,26 @@ type CreateLoadBalancerRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateLoadBalancerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateLoadBalancerResponse wrapper for the CreateLoadBalancer operation type CreateLoadBalancerResponse struct { @@ -47,3 +61,8 @@ type CreateLoadBalancerResponse struct { func (response CreateLoadBalancerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateLoadBalancerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go new file mode 100644 index 000000000..f6a82fded --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreatePathRouteSetDetails A named set of path route rules to add to the load balancer. +type CreatePathRouteSetDetails struct { + + // The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering + // confidential information. + // Example: `example_path_route_set` + Name *string `mandatory:"true" json:"name"` + + // The set of path route rules. + PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` +} + +func (m CreatePathRouteSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go new file mode 100644 index 000000000..7f201241d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreatePathRouteSetRequest wrapper for the CreatePathRouteSet operation +type CreatePathRouteSetRequest struct { + + // The details of the path route set to add. + CreatePathRouteSetDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to add the path route set to. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePathRouteSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePathRouteSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// CreatePathRouteSetResponse wrapper for the CreatePathRouteSet operation +type CreatePathRouteSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreatePathRouteSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePathRouteSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go index acc746c90..df043dbd5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go @@ -15,22 +15,36 @@ type DeleteBackendRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set associated with the backend server. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The IP address and port of the backend server to remove. - // Example: `1.1.1.7:42` + // Example: `10.0.0.3:8080` BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteBackendRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteBackendRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBackendRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteBackendResponse wrapper for the DeleteBackend operation type DeleteBackendResponse struct { @@ -48,3 +62,8 @@ type DeleteBackendResponse struct { func (response DeleteBackendResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBackendResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go index 6a73967a2..4baa185aa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go @@ -15,18 +15,32 @@ type DeleteBackendSetRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set to delete. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteBackendSetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBackendSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteBackendSetResponse wrapper for the DeleteBackendSet operation type DeleteBackendSetResponse struct { @@ -44,3 +58,8 @@ type DeleteBackendSetResponse struct { func (response DeleteBackendSetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBackendSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go index db86b0637..5c159ab1a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go @@ -11,22 +11,37 @@ import ( // DeleteCertificateRequest wrapper for the DeleteCertificate operation type DeleteCertificateRequest struct { - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificate to be deleted. + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificate bundle + // to be deleted. LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - // The name of the certificate to delete. - // Example: `My_certificate_bundle` + // The name of the certificate bundle to delete. + // Example: `example_certificate_bundle` CertificateName *string `mandatory:"true" contributesTo:"path" name:"certificateName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteCertificateRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteCertificateRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteCertificateResponse wrapper for the DeleteCertificate operation type DeleteCertificateResponse struct { @@ -44,3 +59,8 @@ type DeleteCertificateResponse struct { func (response DeleteCertificateResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go new file mode 100644 index 000000000..a08c54af8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteHostnameRequest wrapper for the DeleteHostname operation +type DeleteHostnameRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the hostname to delete. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the hostname resource to delete. + // Example: `example_hostname_001` + Name *string `mandatory:"true" contributesTo:"path" name:"name"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteHostnameRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteHostnameRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeleteHostnameResponse wrapper for the DeleteHostname operation +type DeleteHostnameResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteHostnameResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteHostnameResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go index b5496e029..d03101f89 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go @@ -15,18 +15,32 @@ type DeleteListenerRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the listener to delete. - // Example: `My listener` + // Example: `example_listener` ListenerName *string `mandatory:"true" contributesTo:"path" name:"listenerName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteListenerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteListenerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteListenerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteListenerResponse wrapper for the DeleteListener operation type DeleteListenerResponse struct { @@ -44,3 +58,8 @@ type DeleteListenerResponse struct { func (response DeleteListenerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteListenerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go index 3e39b143c..3ff01a012 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go @@ -17,12 +17,26 @@ type DeleteLoadBalancerRequest struct { // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteLoadBalancerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteLoadBalancerResponse wrapper for the DeleteLoadBalancer operation type DeleteLoadBalancerResponse struct { @@ -40,3 +54,8 @@ type DeleteLoadBalancerResponse struct { func (response DeleteLoadBalancerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteLoadBalancerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go new file mode 100644 index 000000000..59f47c502 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeletePathRouteSetRequest wrapper for the DeletePathRouteSet operation +type DeletePathRouteSetRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the path route set to delete. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the path route set to delete. + // Example: `example_path_route_set` + PathRouteSetName *string `mandatory:"true" contributesTo:"path" name:"pathRouteSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePathRouteSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePathRouteSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// DeletePathRouteSetResponse wrapper for the DeletePathRouteSet operation +type DeletePathRouteSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeletePathRouteSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePathRouteSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go index 6216d7aa9..d89abad76 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go @@ -15,22 +15,36 @@ type GetBackendHealthRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set associated with the backend server to retrieve the health status for. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The IP address and port of the backend server to retrieve the health status for. - // Example: `1.1.1.7:42` + // Example: `10.0.0.3:8080` BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBackendHealthRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBackendHealthRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBackendHealthRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBackendHealthResponse wrapper for the GetBackendHealth operation type GetBackendHealthResponse struct { @@ -48,3 +62,8 @@ type GetBackendHealthResponse struct { func (response GetBackendHealthResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBackendHealthResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go index b795f0a4f..26c799c05 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go @@ -15,22 +15,36 @@ type GetBackendRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set that includes the backend server. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The IP address and port of the backend server to retrieve. - // Example: `1.1.1.7:42` + // Example: `10.0.0.3:8080` BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBackendRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBackendRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBackendRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBackendResponse wrapper for the GetBackend operation type GetBackendResponse struct { @@ -48,3 +62,8 @@ type GetBackendResponse struct { func (response GetBackendResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBackendResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go index 9c1952f17..85adf3cec 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go @@ -15,18 +15,32 @@ type GetBackendSetHealthRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set to retrieve the health status for. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBackendSetHealthRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBackendSetHealthRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBackendSetHealthRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBackendSetHealthResponse wrapper for the GetBackendSetHealth operation type GetBackendSetHealthResponse struct { @@ -44,3 +58,8 @@ type GetBackendSetHealthResponse struct { func (response GetBackendSetHealthResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBackendSetHealthResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go index 19b461368..8162ec428 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go @@ -15,18 +15,32 @@ type GetBackendSetRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set to retrieve. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBackendSetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBackendSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBackendSetResponse wrapper for the GetBackendSet operation type GetBackendSetResponse struct { @@ -44,3 +58,8 @@ type GetBackendSetResponse struct { func (response GetBackendSetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBackendSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go index 70cfdc6f6..d45f6efad 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go @@ -15,18 +15,32 @@ type GetHealthCheckerRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set associated with the health check policy to be retrieved. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetHealthCheckerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetHealthCheckerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetHealthCheckerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetHealthCheckerResponse wrapper for the GetHealthChecker operation type GetHealthCheckerResponse struct { @@ -44,3 +58,8 @@ type GetHealthCheckerResponse struct { func (response GetHealthCheckerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetHealthCheckerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go new file mode 100644 index 000000000..ea05a3859 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetHostnameRequest wrapper for the GetHostname operation +type GetHostnameRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the hostname resource to retrieve. + // Example: `example_hostname_001` + Name *string `mandatory:"true" contributesTo:"path" name:"name"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetHostnameRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetHostnameRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetHostnameResponse wrapper for the GetHostname operation +type GetHostnameResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Hostname instance + Hostname `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetHostnameResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetHostnameResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go index 03783ea3a..3b667eb6a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go @@ -17,12 +17,26 @@ type GetLoadBalancerHealthRequest struct { // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetLoadBalancerHealthRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetLoadBalancerHealthRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetLoadBalancerHealthRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetLoadBalancerHealthResponse wrapper for the GetLoadBalancerHealth operation type GetLoadBalancerHealthResponse struct { @@ -40,3 +54,8 @@ type GetLoadBalancerHealthResponse struct { func (response GetLoadBalancerHealthResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetLoadBalancerHealthResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go index 4f6347794..04e20a43a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go @@ -17,12 +17,26 @@ type GetLoadBalancerRequest struct { // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetLoadBalancerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetLoadBalancerResponse wrapper for the GetLoadBalancer operation type GetLoadBalancerResponse struct { @@ -40,3 +54,8 @@ type GetLoadBalancerResponse struct { func (response GetLoadBalancerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetLoadBalancerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go new file mode 100644 index 000000000..ab4c51879 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetPathRouteSetRequest wrapper for the GetPathRouteSet operation +type GetPathRouteSetRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the path route set to retrieve. + // Example: `example_path_route_set` + PathRouteSetName *string `mandatory:"true" contributesTo:"path" name:"pathRouteSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPathRouteSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPathRouteSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetPathRouteSetResponse wrapper for the GetPathRouteSet operation +type GetPathRouteSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PathRouteSet instance + PathRouteSet `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPathRouteSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPathRouteSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go index 5159bf9c7..702d609e8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go @@ -17,12 +17,26 @@ type GetWorkRequestRequest struct { // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetWorkRequestRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetWorkRequestResponse wrapper for the GetWorkRequest operation type GetWorkRequestResponse struct { @@ -40,3 +54,8 @@ type GetWorkRequestResponse struct { func (response GetWorkRequestResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go index 8c7a04152..529eb1ca6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go @@ -20,10 +20,10 @@ type HealthCheckResult struct { // The IP address of the health check status report provider. This identifier helps you differentiate same-subnet // (private) load balancers that report health check status. - // Example: `10.2.0.1` + // Example: `10.0.0.7` SourceIpAddress *string `mandatory:"true" json:"sourceIpAddress"` - // The OCID of the subnet hosting the load balancer that reported this health check status. + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the subnet hosting the load balancer that reported this health check status. SubnetId *string `mandatory:"true" json:"subnetId"` // The date and time the data was retrieved, in the format defined by RFC3339. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go index 5f5150076..7fd4d372e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go @@ -26,7 +26,7 @@ type HealthChecker struct { Protocol *string `mandatory:"true" json:"protocol"` // A regular expression for parsing the response body from the backend server. - // Example: `^(500|40[1348])$` + // Example: `^((?!false).|\s)*$` ResponseBodyRegex *string `mandatory:"true" json:"responseBodyRegex"` // The status code a healthy backend server should return. If you configure the health check policy to use the HTTP protocol, @@ -35,7 +35,7 @@ type HealthChecker struct { ReturnCode *int `mandatory:"true" json:"returnCode"` // The interval between health checks, in milliseconds. The default is 10000 (10 seconds). - // Example: `30000` + // Example: `10000` IntervalInMillis *int `mandatory:"false" json:"intervalInMillis"` // The number of retries to attempt before a backend server is considered "unhealthy". Defaults to 3. @@ -44,7 +44,7 @@ type HealthChecker struct { // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply // returns within this timeout period. Defaults to 3000 (3 seconds). - // Example: `6000` + // Example: `3000` TimeoutInMillis *int `mandatory:"false" json:"timeoutInMillis"` // The path against which to run the health check. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go index 29f9a90c8..d1ad1ac26 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go @@ -20,7 +20,7 @@ type HealthCheckerDetails struct { Protocol *string `mandatory:"true" json:"protocol"` // The interval between health checks, in milliseconds. - // Example: `30000` + // Example: `10000` IntervalInMillis *int `mandatory:"false" json:"intervalInMillis"` // The backend server port against which to run the health check. If the port is not specified, the load balancer uses the @@ -29,7 +29,7 @@ type HealthCheckerDetails struct { Port *int `mandatory:"false" json:"port"` // A regular expression for parsing the response body from the backend server. - // Example: `^(500|40[1348])$` + // Example: `^((?!false).|\s)*$` ResponseBodyRegex *string `mandatory:"false" json:"responseBodyRegex"` // The number of retries to attempt before a backend server is considered "unhealthy". @@ -42,7 +42,7 @@ type HealthCheckerDetails struct { // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply // returns within this timeout period. - // Example: `6000` + // Example: `3000` TimeoutInMillis *int `mandatory:"false" json:"timeoutInMillis"` // The path against which to run the health check. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go new file mode 100644 index 000000000..0f5ed18f3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Hostname A hostname resource associated with a load balancer for use by one or more listeners. +type Hostname struct { + + // A virtual hostname. For more information about virtual hostname string construction, see + // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). + // Example: `app.example.com` + Hostname *string `mandatory:"true" json:"hostname"` + + // A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential + // information. + // Example: `example_hostname_001` + Name *string `mandatory:"true" json:"name"` +} + +func (m Hostname) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go new file mode 100644 index 000000000..fa0e54486 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// HostnameDetails The details of a hostname resource associated with a load balancer. +type HostnameDetails struct { + + // A virtual hostname. For more information about virtual hostname string construction, see + // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). + // Example: `app.example.com` + Hostname *string `mandatory:"true" json:"hostname"` + + // The name of the hostname resource. + // Example: `example_hostname_001` + Name *string `mandatory:"true" json:"name"` +} + +func (m HostnameDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go index 04892809e..c598c5c94 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go @@ -16,7 +16,7 @@ import ( type IpAddress struct { // An IP address. - // Example: `128.148.10.20` + // Example: `192.168.0.3` IpAddress *string `mandatory:"true" json:"ipAddress"` // Whether the IP address is public or private. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go index 240a49811..d31a5a287 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go @@ -17,12 +17,26 @@ type ListBackendSetsRequest struct { // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListBackendSetsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListBackendSetsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBackendSetsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListBackendSetsResponse wrapper for the ListBackendSets operation type ListBackendSetsResponse struct { @@ -40,3 +54,8 @@ type ListBackendSetsResponse struct { func (response ListBackendSetsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListBackendSetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go index dd68c498a..b5752098f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go @@ -15,18 +15,32 @@ type ListBackendsRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set associated with the backend servers. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListBackendsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListBackendsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBackendsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListBackendsResponse wrapper for the ListBackends operation type ListBackendsResponse struct { @@ -44,3 +58,8 @@ type ListBackendsResponse struct { func (response ListBackendsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListBackendsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go index b5e62bc07..7c609b06a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go @@ -11,18 +11,33 @@ import ( // ListCertificatesRequest wrapper for the ListCertificates operation type ListCertificatesRequest struct { - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificates to be listed. + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificate bundles + // to be listed. LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListCertificatesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListCertificatesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCertificatesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListCertificatesResponse wrapper for the ListCertificates operation type ListCertificatesResponse struct { @@ -40,3 +55,8 @@ type ListCertificatesResponse struct { func (response ListCertificatesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListCertificatesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go new file mode 100644 index 000000000..39d2a58dc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListHostnamesRequest wrapper for the ListHostnames operation +type ListHostnamesRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the hostnames + // to retrieve. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListHostnamesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListHostnamesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListHostnamesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListHostnamesResponse wrapper for the ListHostnames operation +type ListHostnamesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Hostname instance + Items []Hostname `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListHostnamesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListHostnamesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go index 959153da0..b816939fb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go @@ -25,19 +25,33 @@ type ListLoadBalancerHealthsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. // Example: `3` Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListLoadBalancerHealthsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListLoadBalancerHealthsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListLoadBalancerHealthsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListLoadBalancerHealthsResponse wrapper for the ListLoadBalancerHealths operation type ListLoadBalancerHealthsResponse struct { // The underlying http response RawResponse *http.Response - // The []LoadBalancerHealthSummary instance + // A list of []LoadBalancerHealthSummary instances Items []LoadBalancerHealthSummary `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -53,3 +67,8 @@ type ListLoadBalancerHealthsResponse struct { func (response ListLoadBalancerHealthsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListLoadBalancerHealthsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go index 608697685..ed89da39a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go @@ -30,30 +30,47 @@ type ListLoadBalancersRequest struct { // Example: `full` Detail *string `mandatory:"false" contributesTo:"query" name:"detail"` - // The field to sort by. Only one sort order may be provided. Time created is default ordered as descending. Display name is default ordered as ascending. + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. + // Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. SortBy ListLoadBalancersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - // The sort order to use, either 'asc' or 'desc' + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive. SortOrder ListLoadBalancersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - // A filter to only return resources that match the given display name exactly. + // A filter to return only resources that match the given display name exactly. + // Example: `example_load_balancer` DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // A filter to only return resources that match the given lifecycle state. + // A filter to return only resources that match the given lifecycle state. + // Example: `SUCCEEDED` LifecycleState LoadBalancerLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListLoadBalancersRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListLoadBalancersRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListLoadBalancersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListLoadBalancersResponse wrapper for the ListLoadBalancers operation type ListLoadBalancersResponse struct { // The underlying http response RawResponse *http.Response - // The []LoadBalancer instance + // A list of []LoadBalancer instances Items []LoadBalancer `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -70,6 +87,11 @@ func (response ListLoadBalancersResponse) String() string { return common.PointerString(response) } +// HTTPResponse implements the OCIResponse interface +func (response ListLoadBalancersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + // ListLoadBalancersSortByEnum Enum with underlying type: string type ListLoadBalancersSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go new file mode 100644 index 000000000..55163bab4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListPathRouteSetsRequest wrapper for the ListPathRouteSets operation +type ListPathRouteSetsRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the path route sets + // to retrieve. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPathRouteSetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPathRouteSetsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPathRouteSetsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ListPathRouteSetsResponse wrapper for the ListPathRouteSets operation +type ListPathRouteSetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PathRouteSet instance + Items []PathRouteSet `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPathRouteSetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPathRouteSetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go index 197f32e5a..482cfd8e9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go @@ -25,19 +25,33 @@ type ListPoliciesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. // Example: `3` Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListPoliciesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListPoliciesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListPoliciesResponse wrapper for the ListPolicies operation type ListPoliciesResponse struct { // The underlying http response RawResponse *http.Response - // The []LoadBalancerPolicy instance + // A list of []LoadBalancerPolicy instances Items []LoadBalancerPolicy `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -53,3 +67,8 @@ type ListPoliciesResponse struct { func (response ListPoliciesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go index d6e9c4e30..01d46c111 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go @@ -25,19 +25,33 @@ type ListProtocolsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. // Example: `3` Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListProtocolsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListProtocolsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListProtocolsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListProtocolsResponse wrapper for the ListProtocols operation type ListProtocolsResponse struct { // The underlying http response RawResponse *http.Response - // The []LoadBalancerProtocol instance + // A list of []LoadBalancerProtocol instances Items []LoadBalancerProtocol `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -53,3 +67,8 @@ type ListProtocolsResponse struct { func (response ListProtocolsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListProtocolsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go index 0db13f617..326ba2808 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go @@ -25,19 +25,33 @@ type ListShapesRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. // Example: `3` Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListShapesRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListShapesRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListShapesResponse wrapper for the ListShapes operation type ListShapesResponse struct { // The underlying http response RawResponse *http.Response - // The []LoadBalancerShape instance + // A list of []LoadBalancerShape instances Items []LoadBalancerShape `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -53,3 +67,8 @@ type ListShapesResponse struct { func (response ListShapesResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go index 13018c150..8fbe738f4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go @@ -25,19 +25,33 @@ type ListWorkRequestsRequest struct { // The value of the `opc-next-page` response header from the previous "List" call. // Example: `3` Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListWorkRequestsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListWorkRequestsResponse wrapper for the ListWorkRequests operation type ListWorkRequestsResponse struct { // The underlying http response RawResponse *http.Response - // The []WorkRequest instance + // A list of []WorkRequest instances Items []WorkRequest `presentIn:"body"` // For pagination of a list of items. When paging through a list, if this header appears in the response, @@ -53,3 +67,8 @@ type ListWorkRequestsResponse struct { func (response ListWorkRequestsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go index 31110fd5e..d4ca0c8fa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go @@ -14,14 +14,15 @@ import ( // Listener The listener's configuration. // For more information on backend set configuration, see -// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managinglisteners.htm). +// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managinglisteners.htm). type Listener struct { // The name of the associated backend set. + // Example: `example_backend_set` DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` // A friendly name for the listener. It must be unique and it cannot be changed. - // Example: `My listener` + // Example: `example_listener` Name *string `mandatory:"true" json:"name"` // The communication port for the listener. @@ -34,6 +35,16 @@ type Listener struct { // Example: `HTTP` Protocol *string `mandatory:"true" json:"protocol"` + ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` + + // An array of hostname resource names. + HostnameNames []string `mandatory:"false" json:"hostnameNames"` + + // The name of the set of path-based routing rules, PathRouteSet, + // applied to this listener's traffic. + // Example: `example_path_route_set` + PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` + SslConfiguration *SslConfiguration `mandatory:"false" json:"sslConfiguration"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go index 15b4e5d9a..dfbad5032 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go @@ -16,6 +16,7 @@ import ( type ListenerDetails struct { // The name of the associated backend set. + // Example: `example_backend_set` DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` // The communication port for the listener. @@ -28,6 +29,16 @@ type ListenerDetails struct { // Example: `HTTP` Protocol *string `mandatory:"true" json:"protocol"` + ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` + + // An array of hostname resource names. + HostnameNames []string `mandatory:"false" json:"hostnameNames"` + + // The name of the set of path-based routing rules, PathRouteSet, + // applied to this listener's traffic. + // Example: `example_path_route_set` + PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go index bf621e4a9..3d138dbe7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go @@ -26,7 +26,7 @@ type LoadBalancer struct { CompartmentId *string `mandatory:"true" json:"compartmentId"` // A user-friendly name. It does not have to be unique, and it is changeable. - // Example: `My load balancer` + // Example: `example_load_balancer` DisplayName *string `mandatory:"true" json:"displayName"` // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer. @@ -49,6 +49,8 @@ type LoadBalancer struct { Certificates map[string]Certificate `mandatory:"false" json:"certificates"` + Hostnames map[string]Hostname `mandatory:"false" json:"hostnames"` + // An array of IP addresses. IpAddresses []IpAddress `mandatory:"false" json:"ipAddresses"` @@ -62,10 +64,13 @@ type LoadBalancer struct { // requires two subnets, each in a different Availability Domain. One subnet hosts the primary load balancer and the other // hosts the secondary (standby) load balancer. A public load balancer is accessible from the internet, depending on your // VCN's security list rules (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). + // Example: `true` IsPrivate *bool `mandatory:"false" json:"isPrivate"` Listeners map[string]Listener `mandatory:"false" json:"listeners"` + PathRouteSets map[string]PathRouteSet `mandatory:"false" json:"pathRouteSets"` + // An array of subnet OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). SubnetIds []string `mandatory:"false" json:"subnetIds"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go index ab7de4a9d..5a62e7cc0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go @@ -19,7 +19,7 @@ type LoadBalancerHealth struct { // A list of backend sets that are currently in the `CRITICAL` health state. The list identifies each backend set by the // friendly name you assigned when you created it. - // Example: `My_backend_set` + // Example: `example_backend_set` CriticalStateBackendSetNames []string `mandatory:"true" json:"criticalStateBackendSetNames"` // The overall health status of the load balancer. @@ -41,12 +41,12 @@ type LoadBalancerHealth struct { // A list of backend sets that are currently in the `UNKNOWN` health state. The list identifies each backend set by the // friendly name you assigned when you created it. - // Example: `Backend_set2` + // Example: `example_backend_set2` UnknownStateBackendSetNames []string `mandatory:"true" json:"unknownStateBackendSetNames"` // A list of backend sets that are currently in the `WARNING` health state. The list identifies each backend set by the // friendly name you assigned when you created it. - // Example: `Backend_set3` + // Example: `example_backend_set3` WarningStateBackendSetNames []string `mandatory:"true" json:"warningStateBackendSetNames"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go index 610a970b8..7a0ce46e6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go @@ -17,7 +17,8 @@ import ( // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). type LoadBalancerPolicy struct { - // The name of the load balancing policy. + // The name of a load balancing policy. + // Example: 'LEAST_CONNECTIONS' Name *string `mandatory:"true" json:"name"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go index 91be70bb7..68e9a45f2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go @@ -12,10 +12,11 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// LoadBalancerProtocol The protocol that defines the type of traffic accepted by a listener. +// LoadBalancerProtocol A protocol that defines the type of traffic accepted by a listener. type LoadBalancerProtocol struct { - // The name of the protocol. + // The name of a protocol. + // Example: 'HTTP' Name *string `mandatory:"true" json:"name"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go index de82ebb47..5ecc28117 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go @@ -19,6 +19,7 @@ import ( type LoadBalancerShape struct { // The name of the shape. + // Example: `100Mbps` Name *string `mandatory:"true" json:"name"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go index cb408565e..c7fcd931d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go @@ -48,8 +48,8 @@ func (client *LoadBalancerClient) setConfigurationProvider(configProvider common // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -60,74 +60,198 @@ func (client *LoadBalancerClient) ConfigurationProvider() *common.ConfigurationP // CreateBackend Adds a backend server to a backend set. func (client LoadBalancerClient) CreateBackend(ctx context.Context, request CreateBackendRequest) (response CreateBackendResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createBackend, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateBackendResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBackendResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createBackend implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) createBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends") + if err != nil { + return nil, err + } + + var response CreateBackendResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateBackendSet Adds a backend set to a load balancer. func (client LoadBalancerClient) CreateBackendSet(ctx context.Context, request CreateBackendSetRequest) (response CreateBackendSetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createBackendSet, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(CreateBackendSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBackendSetResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// CreateCertificate Creates an asynchronous request to add an SSL certificate. -func (client LoadBalancerClient) CreateCertificate(ctx context.Context, request CreateCertificateRequest) (response CreateCertificateResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/certificates", request) +// createBackendSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) createBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response CreateBackendSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateCertificate Creates an asynchronous request to add an SSL certificate bundle. +func (client LoadBalancerClient) CreateCertificate(ctx context.Context, request CreateCertificateRequest) (response CreateCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createCertificate, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCertificateResponse") + } return } +// createCertificate implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) createCertificate(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/certificates") + if err != nil { + return nil, err + } + + var response CreateCertificateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateHostname Adds a hostname resource to the specified load balancer. For more information, see +// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). +func (client LoadBalancerClient) CreateHostname(ctx context.Context, request CreateHostnameRequest) (response CreateHostnameResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createHostname, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateHostnameResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateHostnameResponse") + } + return +} + +// createHostname implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) createHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/hostnames") + if err != nil { + return nil, err + } + + var response CreateHostnameResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateListener Adds a listener to a load balancer. func (client LoadBalancerClient) CreateListener(ctx context.Context, request CreateListenerRequest) (response CreateListenerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/listeners", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createListener, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateListenerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateListenerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createListener implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) createListener(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/listeners") + if err != nil { + return nil, err + } + + var response CreateListenerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CreateLoadBalancer Creates a new load balancer in the specified compartment. For general information about load balancers, @@ -152,505 +276,1452 @@ func (client LoadBalancerClient) CreateListener(ctx context.Context, request Cre // When you create a load balancer, the system assigns an IP address. // To get the IP address, use the GetLoadBalancer operation. func (client LoadBalancerClient) CreateLoadBalancer(ctx context.Context, request CreateLoadBalancerRequest) (response CreateLoadBalancerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createLoadBalancer, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(CreateLoadBalancerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateLoadBalancerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// createLoadBalancer implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) createLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers") + if err != nil { + return nil, err + } + + var response CreateLoadBalancerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePathRouteSet Adds a path route set to a load balancer. For more information, see +// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). +func (client LoadBalancerClient) CreatePathRouteSet(ctx context.Context, request CreatePathRouteSetRequest) (response CreatePathRouteSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createPathRouteSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreatePathRouteSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePathRouteSetResponse") + } return } +// createPathRouteSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) createPathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/pathRouteSets") + if err != nil { + return nil, err + } + + var response CreatePathRouteSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteBackend Removes a backend server from a given load balancer and backend set. func (client LoadBalancerClient) DeleteBackend(ctx context.Context, request DeleteBackendRequest) (response DeleteBackendResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBackend, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteBackendResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBackendResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteBackend implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) deleteBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}") + if err != nil { + return nil, err + } + + var response DeleteBackendResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteBackendSet Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer. // Before you can delete a backend set, you must remove it from any active listeners. func (client LoadBalancerClient) DeleteBackendSet(ctx context.Context, request DeleteBackendSetRequest) (response DeleteBackendSetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBackendSet, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(DeleteBackendSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBackendSetResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// DeleteCertificate Deletes an SSL certificate from a load balancer. -func (client LoadBalancerClient) DeleteCertificate(ctx context.Context, request DeleteCertificateRequest) (response DeleteCertificateResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/certificates/{certificateName}", request) +// deleteBackendSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) deleteBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response DeleteBackendSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCertificate Deletes an SSL certificate bundle from a load balancer. +func (client LoadBalancerClient) DeleteCertificate(ctx context.Context, request DeleteCertificateRequest) (response DeleteCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCertificate, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCertificateResponse") + } return } +// deleteCertificate implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) deleteCertificate(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/certificates/{certificateName}") + if err != nil { + return nil, err + } + + var response DeleteCertificateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteHostname Deletes a hostname resource from the specified load balancer. +func (client LoadBalancerClient) DeleteHostname(ctx context.Context, request DeleteHostnameRequest) (response DeleteHostnameResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteHostname, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeleteHostnameResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteHostnameResponse") + } + return +} + +// deleteHostname implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) deleteHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/hostnames/{name}") + if err != nil { + return nil, err + } + + var response DeleteHostnameResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteListener Deletes a listener from a load balancer. func (client LoadBalancerClient) DeleteListener(ctx context.Context, request DeleteListenerRequest) (response DeleteListenerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteListener, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteListenerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteListenerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteListener implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) deleteListener(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}") + if err != nil { + return nil, err + } + + var response DeleteListenerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteLoadBalancer Stops a load balancer and removes it from service. func (client LoadBalancerClient) DeleteLoadBalancer(ctx context.Context, request DeleteLoadBalancerRequest) (response DeleteLoadBalancerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteLoadBalancer, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteLoadBalancerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteLoadBalancerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteLoadBalancer implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) deleteLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}") + if err != nil { + return nil, err + } + + var response DeleteLoadBalancerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePathRouteSet Deletes a path route set from the specified load balancer. +// To delete a path route rule from a path route set, use the +// UpdatePathRouteSet operation. +func (client LoadBalancerClient) DeletePathRouteSet(ctx context.Context, request DeletePathRouteSetRequest) (response DeletePathRouteSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePathRouteSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeletePathRouteSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePathRouteSetResponse") + } return } +// deletePathRouteSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) deletePathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}") + if err != nil { + return nil, err + } + + var response DeletePathRouteSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetBackend Gets the specified backend server's configuration information. func (client LoadBalancerClient) GetBackend(ctx context.Context, request GetBackendRequest) (response GetBackendResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBackend, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetBackendResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBackendResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getBackend implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}") + if err != nil { + return nil, err + } + + var response GetBackendResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetBackendHealth Gets the current health status of the specified backend server. func (client LoadBalancerClient) GetBackendHealth(ctx context.Context, request GetBackendHealthRequest) (response GetBackendHealthResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}/health", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBackendHealth, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetBackendHealthResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBackendHealthResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getBackendHealth implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getBackendHealth(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}/health") + if err != nil { + return nil, err + } + + var response GetBackendHealthResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetBackendSet Gets the specified backend set's configuration information. func (client LoadBalancerClient) GetBackendSet(ctx context.Context, request GetBackendSetRequest) (response GetBackendSetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBackendSet, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetBackendSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBackendSetResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getBackendSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}") + if err != nil { + return nil, err + } + + var response GetBackendSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetBackendSetHealth Gets the health status for the specified backend set. func (client LoadBalancerClient) GetBackendSetHealth(ctx context.Context, request GetBackendSetHealthRequest) (response GetBackendSetHealthResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/health", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBackendSetHealth, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetBackendSetHealthResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBackendSetHealthResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getBackendSetHealth implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getBackendSetHealth(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/health") + if err != nil { + return nil, err + } + + var response GetBackendSetHealthResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetHealthChecker Gets the health check policy information for a given load balancer and backend set. func (client LoadBalancerClient) GetHealthChecker(ctx context.Context, request GetHealthCheckerRequest) (response GetHealthCheckerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getHealthChecker, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetHealthCheckerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetHealthCheckerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getHealthChecker implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getHealthChecker(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker") + if err != nil { + return nil, err + } + + var response GetHealthCheckerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetHostname Gets the specified hostname resource's configuration information. +func (client LoadBalancerClient) GetHostname(ctx context.Context, request GetHostnameRequest) (response GetHostnameResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getHostname, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetHostnameResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetHostnameResponse") + } return } +// getHostname implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/hostnames/{name}") + if err != nil { + return nil, err + } + + var response GetHostnameResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetLoadBalancer Gets the specified load balancer's configuration information. func (client LoadBalancerClient) GetLoadBalancer(ctx context.Context, request GetLoadBalancerRequest) (response GetLoadBalancerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getLoadBalancer, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetLoadBalancerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetLoadBalancerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getLoadBalancer implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}") + if err != nil { + return nil, err + } + + var response GetLoadBalancerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // GetLoadBalancerHealth Gets the health status for the specified load balancer. func (client LoadBalancerClient) GetLoadBalancerHealth(ctx context.Context, request GetLoadBalancerHealthRequest) (response GetLoadBalancerHealthResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/health", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getLoadBalancerHealth, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetLoadBalancerHealthResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetLoadBalancerHealthResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getLoadBalancerHealth implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getLoadBalancerHealth(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/health") + if err != nil { + return nil, err + } + + var response GetLoadBalancerHealthResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPathRouteSet Gets the specified path route set's configuration information. +func (client LoadBalancerClient) GetPathRouteSet(ctx context.Context, request GetPathRouteSetRequest) (response GetPathRouteSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPathRouteSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetPathRouteSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPathRouteSetResponse") + } return } +// getPathRouteSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getPathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}") + if err != nil { + return nil, err + } + + var response GetPathRouteSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetWorkRequest Gets the details of a work request. func (client LoadBalancerClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerWorkRequests/{workRequestId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) getWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerWorkRequests/{workRequestId}") + if err != nil { + return nil, err + } + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListBackendSets Lists all backend sets associated with a given load balancer. func (client LoadBalancerClient) ListBackendSets(ctx context.Context, request ListBackendSetsRequest) (response ListBackendSetsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBackendSets, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListBackendSetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBackendSetsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listBackendSets implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listBackendSets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets") + if err != nil { + return nil, err + } + + var response ListBackendSetsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListBackends Lists the backend servers for a given load balancer and backend set. func (client LoadBalancerClient) ListBackends(ctx context.Context, request ListBackendsRequest) (response ListBackendsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBackends, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(ListBackendsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBackendsResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// ListCertificates Lists all SSL certificates associated with a given load balancer. -func (client LoadBalancerClient) ListCertificates(ctx context.Context, request ListCertificatesRequest) (response ListCertificatesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/certificates", request) +// listBackends implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listBackends(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response ListBackendsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCertificates Lists all SSL certificates bundles associated with a given load balancer. +func (client LoadBalancerClient) ListCertificates(ctx context.Context, request ListCertificatesRequest) (response ListCertificatesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCertificates, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListCertificatesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCertificatesResponse") + } return } +// listCertificates implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listCertificates(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/certificates") + if err != nil { + return nil, err + } + + var response ListCertificatesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListHostnames Lists all hostname resources associated with the specified load balancer. +func (client LoadBalancerClient) ListHostnames(ctx context.Context, request ListHostnamesRequest) (response ListHostnamesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listHostnames, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListHostnamesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListHostnamesResponse") + } + return +} + +// listHostnames implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listHostnames(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/hostnames") + if err != nil { + return nil, err + } + + var response ListHostnamesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListLoadBalancerHealths Lists the summary health statuses for all load balancers in the specified compartment. func (client LoadBalancerClient) ListLoadBalancerHealths(ctx context.Context, request ListLoadBalancerHealthsRequest) (response ListLoadBalancerHealthsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerHealths", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listLoadBalancerHealths, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListLoadBalancerHealthsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListLoadBalancerHealthsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listLoadBalancerHealths implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listLoadBalancerHealths(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerHealths") + if err != nil { + return nil, err + } + + var response ListLoadBalancerHealthsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListLoadBalancers Lists all load balancers in the specified compartment. func (client LoadBalancerClient) ListLoadBalancers(ctx context.Context, request ListLoadBalancersRequest) (response ListLoadBalancersResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listLoadBalancers, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListLoadBalancersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListLoadBalancersResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listLoadBalancers implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listLoadBalancers(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers") + if err != nil { + return nil, err + } + + var response ListLoadBalancersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPathRouteSets Lists all path route sets associated with the specified load balancer. +func (client LoadBalancerClient) ListPathRouteSets(ctx context.Context, request ListPathRouteSetsRequest) (response ListPathRouteSetsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPathRouteSets, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListPathRouteSetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPathRouteSetsResponse") + } return } +// listPathRouteSets implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listPathRouteSets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/pathRouteSets") + if err != nil { + return nil, err + } + + var response ListPathRouteSetsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListPolicies Lists the available load balancer policies. func (client LoadBalancerClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerPolicies", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPolicies, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListPoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPoliciesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listPolicies implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listPolicies(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerPolicies") + if err != nil { + return nil, err + } + + var response ListPoliciesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListProtocols Lists all supported traffic protocols. func (client LoadBalancerClient) ListProtocols(ctx context.Context, request ListProtocolsRequest) (response ListProtocolsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerProtocols", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listProtocols, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListProtocolsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListProtocolsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listProtocols implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listProtocols(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerProtocols") + if err != nil { + return nil, err + } + + var response ListProtocolsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListShapes Lists the valid load balancer shapes. func (client LoadBalancerClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerShapes", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listShapes, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListShapesResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listShapes implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerShapes") + if err != nil { + return nil, err + } + + var response ListShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListWorkRequests Lists the work requests for a given load balancer. func (client LoadBalancerClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/workRequests", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) listWorkRequests(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/workRequests") + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateBackend Updates the configuration of a backend server within the specified backend set. func (client LoadBalancerClient) UpdateBackend(ctx context.Context, request UpdateBackendRequest) (response UpdateBackendResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBackend, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateBackendResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBackendResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateBackend implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) updateBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}") + if err != nil { + return nil, err + } + + var response UpdateBackendResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateBackendSet Updates a backend set. func (client LoadBalancerClient) UpdateBackendSet(ctx context.Context, request UpdateBackendSetRequest) (response UpdateBackendSetResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBackendSet, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateBackendSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBackendSetResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateBackendSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) updateBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}") + if err != nil { + return nil, err + } + + var response UpdateBackendSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateHealthChecker Updates the health check policy for a given load balancer and backend set. func (client LoadBalancerClient) UpdateHealthChecker(ctx context.Context, request UpdateHealthCheckerRequest) (response UpdateHealthCheckerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateHealthChecker, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateHealthCheckerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateHealthCheckerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateHealthChecker implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) updateHealthChecker(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker") + if err != nil { + return nil, err + } + + var response UpdateHealthCheckerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateHostname Overwrites an existing hostname resource on the specified load balancer. Use this operation to change a +// virtual hostname. +func (client LoadBalancerClient) UpdateHostname(ctx context.Context, request UpdateHostnameRequest) (response UpdateHostnameResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateHostname, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateHostnameResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateHostnameResponse") + } return } +// updateHostname implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) updateHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/hostnames/{name}") + if err != nil { + return nil, err + } + + var response UpdateHostnameResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateListener Updates a listener for a given load balancer. func (client LoadBalancerClient) UpdateListener(ctx context.Context, request UpdateListenerRequest) (response UpdateListenerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateListener, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateListenerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateListenerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateListener implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) updateListener(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}") + if err != nil { + return nil, err + } + + var response UpdateListenerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // UpdateLoadBalancer Updates a load balancer's configuration. func (client LoadBalancerClient) UpdateLoadBalancer(ctx context.Context, request UpdateLoadBalancerRequest) (response UpdateLoadBalancerResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateLoadBalancer, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateLoadBalancerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateLoadBalancerResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateLoadBalancer implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) updateLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}") + if err != nil { + return nil, err + } + + var response UpdateLoadBalancerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePathRouteSet Overwrites an existing path route set on the specified load balancer. Use this operation to add, delete, or alter +// path route rules in a path route set. +// To add a new path route rule to a path route set, the `pathRoutes` in the +// UpdatePathRouteSetDetails object must include +// both the new path route rule to add and the existing path route rules to retain. +func (client LoadBalancerClient) UpdatePathRouteSet(ctx context.Context, request UpdatePathRouteSetRequest) (response UpdatePathRouteSetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePathRouteSet, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdatePathRouteSetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePathRouteSetResponse") + } return } + +// updatePathRouteSet implements the OCIOperation interface (enables retrying operations) +func (client LoadBalancerClient) updatePathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}") + if err != nil { + return nil, err + } + + var response UpdatePathRouteSetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go new file mode 100644 index 000000000..291c84472 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PathMatchType The type of matching to apply to incoming URIs. +type PathMatchType struct { + + // Specifies how the load balancing service compares a PathRoute + // object's `path` string against the incoming URI. + // * **EXACT_MATCH** - Looks for a `path` string that exactly matches the incoming URI path. + // * **FORCE_LONGEST_PREFIX_MATCH** - Looks for the `path` string with the best, longest match of the beginning + // portion of the incoming URI path. + // * **PREFIX_MATCH** - Looks for a `path` string that matches the beginning portion of the incoming URI path. + // * **SUFFIX_MATCH** - Looks for a `path` string that matches the ending portion of the incoming URI path. + // For a full description of how the system handles `matchType` in a path route set containing multiple rules, see + // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). + MatchType PathMatchTypeMatchTypeEnum `mandatory:"true" json:"matchType"` +} + +func (m PathMatchType) String() string { + return common.PointerString(m) +} + +// PathMatchTypeMatchTypeEnum Enum with underlying type: string +type PathMatchTypeMatchTypeEnum string + +// Set of constants representing the allowable values for PathMatchTypeMatchType +const ( + PathMatchTypeMatchTypeExactMatch PathMatchTypeMatchTypeEnum = "EXACT_MATCH" + PathMatchTypeMatchTypeForceLongestPrefixMatch PathMatchTypeMatchTypeEnum = "FORCE_LONGEST_PREFIX_MATCH" + PathMatchTypeMatchTypePrefixMatch PathMatchTypeMatchTypeEnum = "PREFIX_MATCH" + PathMatchTypeMatchTypeSuffixMatch PathMatchTypeMatchTypeEnum = "SUFFIX_MATCH" +) + +var mappingPathMatchTypeMatchType = map[string]PathMatchTypeMatchTypeEnum{ + "EXACT_MATCH": PathMatchTypeMatchTypeExactMatch, + "FORCE_LONGEST_PREFIX_MATCH": PathMatchTypeMatchTypeForceLongestPrefixMatch, + "PREFIX_MATCH": PathMatchTypeMatchTypePrefixMatch, + "SUFFIX_MATCH": PathMatchTypeMatchTypeSuffixMatch, +} + +// GetPathMatchTypeMatchTypeEnumValues Enumerates the set of values for PathMatchTypeMatchType +func GetPathMatchTypeMatchTypeEnumValues() []PathMatchTypeMatchTypeEnum { + values := make([]PathMatchTypeMatchTypeEnum, 0) + for _, v := range mappingPathMatchTypeMatchType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go new file mode 100644 index 000000000..752f86218 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PathRoute A "path route rule" to evaluate an incoming URI path, and then route a matching request to the specified backend set. +// Path route rules apply only to HTTP and HTTPS requests. They have no effect on TCP requests. +type PathRoute struct { + + // The name of the target backend set for requests where the incoming URI matches the specified path. + // Example: `example_backend_set` + BackendSetName *string `mandatory:"true" json:"backendSetName"` + + // The path string to match against the incoming URI path. + // * Path strings are case-insensitive. + // * Asterisk (*) wildcards are not supported. + // * Regular expressions are not supported. + // Example: `/example/video/123` + Path *string `mandatory:"true" json:"path"` + + // The type of matching to apply to incoming URIs. + PathMatchType *PathMatchType `mandatory:"true" json:"pathMatchType"` +} + +func (m PathRoute) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go new file mode 100644 index 000000000..6eb21bfb2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PathRouteSet A named set of path route rules. For more information, see +// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). +type PathRouteSet struct { + + // The unique name for this set of path route rules. Avoid entering confidential information. + // Example: `example_path_route_set` + Name *string `mandatory:"true" json:"name"` + + // The set of path route rules. + PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` +} + +func (m PathRouteSet) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go new file mode 100644 index 000000000..5fa988dc6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PathRouteSetDetails A set of path route rules. +type PathRouteSetDetails struct { + + // The set of path route rules. + PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` +} + +func (m PathRouteSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go index a83e81d99..dd2c515b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go @@ -23,12 +23,12 @@ type SessionPersistenceConfigurationDetails struct { // The name of the cookie used to detect a session initiated by the backend server. Use '*' to specify // that any cookie set by the backend causes the session to persist. - // Example: `myCookieName` + // Example: `example_cookie` CookieName *string `mandatory:"true" json:"cookieName"` // Whether the load balancer is prevented from directing traffic from a persistent session client to // a different backend server if the original server is unavailable. Defaults to false. - // Example: `true` + // Example: `false` DisableFallback *bool `mandatory:"false" json:"disableFallback"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go index 5f9c102dc..f60f7c14d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go @@ -19,7 +19,7 @@ type SslConfiguration struct { // A friendly name for the certificate bundle. It must be unique and it cannot be changed. // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `My_certificate_bundle` + // Example: `example_certificate_bundle` CertificateName *string `mandatory:"true" json:"certificateName"` // The maximum depth for peer certificate chain verification. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go index 7b083fcf7..f74f266fe 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go @@ -18,7 +18,7 @@ type SslConfigurationDetails struct { // A friendly name for the certificate bundle. It must be unique and it cannot be changed. // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `My_certificate_bundle` + // Example: `example_certificate_bundle` CertificateName *string `mandatory:"true" json:"certificateName"` // The maximum depth for peer certificate chain verification. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go index 56efca6d9..1409a72e6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go @@ -17,17 +17,17 @@ type UpdateBackendDetails struct { // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `true` + // Example: `false` Backup *bool `mandatory:"true" json:"backup"` // Whether the load balancer should drain this server. Servers marked "drain" receive no new // incoming traffic. - // Example: `true` + // Example: `false` Drain *bool `mandatory:"true" json:"drain"` // Whether the load balancer should treat this server as offline. Offline servers receive no incoming // traffic. - // Example: `true` + // Example: `false` Offline *bool `mandatory:"true" json:"offline"` // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go index 0d9915a19..0199b6217 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go @@ -18,11 +18,11 @@ type UpdateBackendRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set associated with the backend server. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The IP address and port of the backend server to update. - // Example: `1.1.1.7:42` + // Example: `10.0.0.3:8080` BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -35,12 +35,26 @@ type UpdateBackendRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateBackendRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateBackendRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBackendRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateBackendResponse wrapper for the UpdateBackend operation type UpdateBackendResponse struct { @@ -58,3 +72,8 @@ type UpdateBackendResponse struct { func (response UpdateBackendResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBackendResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go index e099e1db4..b7f43477f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go @@ -18,7 +18,7 @@ type UpdateBackendSetRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set to update. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -31,12 +31,26 @@ type UpdateBackendSetRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateBackendSetRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBackendSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateBackendSetResponse wrapper for the UpdateBackendSet operation type UpdateBackendSetResponse struct { @@ -54,3 +68,8 @@ type UpdateBackendSetResponse struct { func (response UpdateBackendSetResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBackendSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go index 5e2e8cda8..85750f118 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go @@ -16,7 +16,7 @@ import ( type UpdateHealthCheckerDetails struct { // The interval between health checks, in milliseconds. - // Example: `30000` + // Example: `10000` IntervalInMillis *int `mandatory:"true" json:"intervalInMillis"` // The backend server port against which to run the health check. @@ -28,7 +28,7 @@ type UpdateHealthCheckerDetails struct { Protocol *string `mandatory:"true" json:"protocol"` // A regular expression for parsing the response body from the backend server. - // Example: `^(500|40[1348])$` + // Example: `^((?!false).|\s)*$` ResponseBodyRegex *string `mandatory:"true" json:"responseBodyRegex"` // The number of retries to attempt before a backend server is considered "unhealthy". @@ -41,7 +41,7 @@ type UpdateHealthCheckerDetails struct { // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply // returns within this timeout period. - // Example: `6000` + // Example: `3000` TimeoutInMillis *int `mandatory:"true" json:"timeoutInMillis"` // The path against which to run the health check. diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go index 54ddccbbe..f18e0a45f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go @@ -18,7 +18,7 @@ type UpdateHealthCheckerRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the backend set associated with the health check policy to be retrieved. - // Example: `My_backend_set` + // Example: `example_backend_set` BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -31,12 +31,26 @@ type UpdateHealthCheckerRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateHealthCheckerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateHealthCheckerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateHealthCheckerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateHealthCheckerResponse wrapper for the UpdateHealthChecker operation type UpdateHealthCheckerResponse struct { @@ -54,3 +68,8 @@ type UpdateHealthCheckerResponse struct { func (response UpdateHealthCheckerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateHealthCheckerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go new file mode 100644 index 000000000..4effa8a86 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateHostnameDetails The configuration details for updating a virtual hostname. +// For more information on virtual hostnames, see +// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). +type UpdateHostnameDetails struct { + + // The virtual hostname to update. For more information about virtual hostname string construction, see + // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). + // Example: `app.example.com` + Hostname *string `mandatory:"false" json:"hostname"` +} + +func (m UpdateHostnameDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go new file mode 100644 index 000000000..6ca227e26 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateHostnameRequest wrapper for the UpdateHostname operation +type UpdateHostnameRequest struct { + + // The configuration details to update a virtual hostname. + UpdateHostnameDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the virtual hostname + // to update. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the hostname resource to update. + // Example: `example_hostname_001` + Name *string `mandatory:"true" contributesTo:"path" name:"name"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateHostnameRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateHostnameRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateHostnameResponse wrapper for the UpdateHostname operation +type UpdateHostnameResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateHostnameResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateHostnameResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go index c935eac54..54141760e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go @@ -16,6 +16,7 @@ import ( type UpdateListenerDetails struct { // The name of the associated backend set. + // Example: `example_backend_set` DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` // The communication port for the listener. @@ -28,6 +29,16 @@ type UpdateListenerDetails struct { // Example: `HTTP` Protocol *string `mandatory:"true" json:"protocol"` + ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` + + // An array of hostname resource names. + HostnameNames []string `mandatory:"false" json:"hostnameNames"` + + // The name of the set of path-based routing rules, PathRouteSet, + // applied to this listener's traffic. + // Example: `example_path_route_set` + PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go index b07a7a250..aead08301 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go @@ -18,7 +18,7 @@ type UpdateListenerRequest struct { LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` // The name of the listener to update. - // Example: `My listener` + // Example: `example_listener` ListenerName *string `mandatory:"true" contributesTo:"path" name:"listenerName"` // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -31,12 +31,26 @@ type UpdateListenerRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateListenerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateListenerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateListenerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateListenerResponse wrapper for the UpdateListener operation type UpdateListenerResponse struct { @@ -54,3 +68,8 @@ type UpdateListenerResponse struct { func (response UpdateListenerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateListenerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go index 8a66761f4..7ab1175a1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go @@ -17,7 +17,7 @@ type UpdateLoadBalancerDetails struct { // The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable. // Avoid entering confidential information. - // Example: `My load balancer` + // Example: `example_load_balancer` DisplayName *string `mandatory:"true" json:"displayName"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go index 15101ba1c..00589d0c3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go @@ -27,12 +27,26 @@ type UpdateLoadBalancerRequest struct { // has been deleted and purged from the system, then a retry of the original creation request // may be rejected). OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateLoadBalancerRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateLoadBalancerResponse wrapper for the UpdateLoadBalancer operation type UpdateLoadBalancerResponse struct { @@ -50,3 +64,8 @@ type UpdateLoadBalancerResponse struct { func (response UpdateLoadBalancerResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateLoadBalancerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go new file mode 100644 index 000000000..d4f924b14 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdatePathRouteSetDetails An updated set of path route rules that overwrites the existing set of rules. +type UpdatePathRouteSetDetails struct { + + // The set of path route rules. + PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` +} + +func (m UpdatePathRouteSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go new file mode 100644 index 000000000..0c0f2d5dd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdatePathRouteSetRequest wrapper for the UpdatePathRouteSet operation +type UpdatePathRouteSetRequest struct { + + // The configuration details to update a path route set. + UpdatePathRouteSetDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the path route set to update. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the path route set to update. + // Example: `example_path_route_set` + PathRouteSetName *string `mandatory:"true" contributesTo:"path" name:"pathRouteSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePathRouteSetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePathRouteSetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdatePathRouteSetResponse wrapper for the UpdatePathRouteSet operation +type UpdatePathRouteSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdatePathRouteSetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePathRouteSetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go index 0a8a007f4..9d8543c43 100644 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go @@ -43,6 +43,7 @@ type WorkRequest struct { TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` // The type of action the work request represents. + // Example: `CreateListener` Type *string `mandatory:"true" json:"type"` // The date and time the work request was completed, in the format defined by RFC3339. diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go index 8858e1066..b1acb9a62 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go @@ -14,11 +14,11 @@ type AbortMultipartUploadRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -27,12 +27,26 @@ type AbortMultipartUploadRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request AbortMultipartUploadRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request AbortMultipartUploadRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AbortMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // AbortMultipartUploadResponse wrapper for the AbortMultipartUpload operation type AbortMultipartUploadResponse struct { @@ -43,10 +57,15 @@ type AbortMultipartUploadResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } func (response AbortMultipartUploadResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response AbortMultipartUploadResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go index 81462ba1a..2fc78c1ea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -12,7 +12,10 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// Bucket To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// Bucket A bucket is a container for storing objects in a compartment within a namespace. A bucket is associated with a single compartment. +// The compartment has policies that indicate what actions a user can perform on a bucket and all the objects in the bucket. For more +// information, see Managing Buckets (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingbuckets.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, // talk to an administrator. If you're an administrator who needs to write policies to give users access, see // Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). type Bucket struct { @@ -20,7 +23,8 @@ type Bucket struct { // The namespace in which the bucket lives. Namespace *string `mandatory:"true" json:"namespace"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. + // Example: my-new-bucket1 Name *string `mandatory:"true" json:"name"` // The compartment ID in which the bucket is authorized. @@ -32,17 +36,34 @@ type Bucket struct { // The OCID of the user who created the bucket. CreatedBy *string `mandatory:"true" json:"createdBy"` - // The date and time at which the bucket was created. + // The date and time the bucket was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` // The entity tag for the bucket. Etag *string `mandatory:"true" json:"etag"` - // The type of public access available on this bucket. Allows authenticated caller to access the bucket or - // contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - // when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - // When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + // The type of public access enabled on this bucket. + // A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + // bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + // `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled on the + // bucket, public access is allowed for the `GetObject` and `HeadObject` operations. PublicAccessType BucketPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` + + // The type of storage tier of this bucket. + // A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. + // When 'Archive' tier type is set explicitly, the bucket is put in the archive storage tier. The 'storageTier' + // property is immutable after bucket is created. + StorageTier BucketStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m Bucket) String() string { @@ -54,13 +75,15 @@ type BucketPublicAccessTypeEnum string // Set of constants representing the allowable values for BucketPublicAccessType const ( - BucketPublicAccessTypeNopublicaccess BucketPublicAccessTypeEnum = "NoPublicAccess" - BucketPublicAccessTypeObjectread BucketPublicAccessTypeEnum = "ObjectRead" + BucketPublicAccessTypeNopublicaccess BucketPublicAccessTypeEnum = "NoPublicAccess" + BucketPublicAccessTypeObjectread BucketPublicAccessTypeEnum = "ObjectRead" + BucketPublicAccessTypeObjectreadwithoutlist BucketPublicAccessTypeEnum = "ObjectReadWithoutList" ) var mappingBucketPublicAccessType = map[string]BucketPublicAccessTypeEnum{ - "NoPublicAccess": BucketPublicAccessTypeNopublicaccess, - "ObjectRead": BucketPublicAccessTypeObjectread, + "NoPublicAccess": BucketPublicAccessTypeNopublicaccess, + "ObjectRead": BucketPublicAccessTypeObjectread, + "ObjectReadWithoutList": BucketPublicAccessTypeObjectreadwithoutlist, } // GetBucketPublicAccessTypeEnumValues Enumerates the set of values for BucketPublicAccessType @@ -71,3 +94,26 @@ func GetBucketPublicAccessTypeEnumValues() []BucketPublicAccessTypeEnum { } return values } + +// BucketStorageTierEnum Enum with underlying type: string +type BucketStorageTierEnum string + +// Set of constants representing the allowable values for BucketStorageTier +const ( + BucketStorageTierStandard BucketStorageTierEnum = "Standard" + BucketStorageTierArchive BucketStorageTierEnum = "Archive" +) + +var mappingBucketStorageTier = map[string]BucketStorageTierEnum{ + "Standard": BucketStorageTierStandard, + "Archive": BucketStorageTierArchive, +} + +// GetBucketStorageTierEnumValues Enumerates the set of values for BucketStorageTier +func GetBucketStorageTierEnumValues() []BucketStorageTierEnum { + values := make([]BucketStorageTierEnum, 0) + for _, v := range mappingBucketStorageTier { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go index 028177a52..bee2aa055 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -20,7 +20,8 @@ type BucketSummary struct { // The namespace in which the bucket lives. Namespace *string `mandatory:"true" json:"namespace"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. + // Example: my-new-bucket1 Name *string `mandatory:"true" json:"name"` // The compartment ID in which the bucket is authorized. @@ -29,11 +30,21 @@ type BucketSummary struct { // The OCID of the user who created the bucket. CreatedBy *string `mandatory:"true" json:"createdBy"` - // The date and time at which the bucket was created. + // The date and time the bucket was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` // The entity tag for the bucket. Etag *string `mandatory:"true" json:"etag"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m BucketSummary) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go index c285f7383..0d09fa852 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go index a4d053b37..b23c10a0d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go index 101834254..f4851abde 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go @@ -14,11 +14,11 @@ type CommitMultipartUploadRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -33,18 +33,31 @@ type CommitMultipartUploadRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CommitMultipartUploadRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CommitMultipartUploadRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CommitMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CommitMultipartUploadResponse wrapper for the CommitMultipartUpload operation type CommitMultipartUploadResponse struct { @@ -55,13 +68,14 @@ type CommitMultipartUploadResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // Base-64 representation of the multipart object hash. // The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, // concatenating the binary representation of those hashes in order of their part numbers, - // and then calculating the MD5 hash of the concatenated values. + // and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed + // by a hyphen and the total number of parts (for example, '-6'). OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` // The entity tag for the object. @@ -74,3 +88,8 @@ type CommitMultipartUploadResponse struct { func (response CommitMultipartUploadResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CommitMultipartUploadResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go index b6be2982c..755d7da27 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -18,7 +18,8 @@ import ( type CreateBucketDetails struct { // The name of the bucket. Valid characters are uppercase or lowercase letters, - // numbers, and dashes. Bucket names must be unique within the namespace. + // numbers, and dashes. Bucket names must be unique within the namespace. Avoid entering confidential information. + // example: Example: my-new-bucket1 Name *string `mandatory:"true" json:"name"` // The ID of the compartment in which to create the bucket. @@ -27,11 +28,28 @@ type CreateBucketDetails struct { // Arbitrary string, up to 4KB, of keys and values for user-defined metadata. Metadata map[string]string `mandatory:"false" json:"metadata"` - // The type of public access available on this bucket. Allows authenticated caller to access the bucket or - // contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - // when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - // When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + // The type of public access enabled on this bucket. + // A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + // bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + // `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled on the bucket, + // public access is allowed for the `GetObject` and `HeadObject` operations. PublicAccessType CreateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` + + // The type of storage tier of this bucket. + // A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. + // When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' + // property is immutable after bucket is created. + StorageTier CreateBucketDetailsStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m CreateBucketDetails) String() string { @@ -43,13 +61,15 @@ type CreateBucketDetailsPublicAccessTypeEnum string // Set of constants representing the allowable values for CreateBucketDetailsPublicAccessType const ( - CreateBucketDetailsPublicAccessTypeNopublicaccess CreateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" - CreateBucketDetailsPublicAccessTypeObjectread CreateBucketDetailsPublicAccessTypeEnum = "ObjectRead" + CreateBucketDetailsPublicAccessTypeNopublicaccess CreateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" + CreateBucketDetailsPublicAccessTypeObjectread CreateBucketDetailsPublicAccessTypeEnum = "ObjectRead" + CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist CreateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList" ) var mappingCreateBucketDetailsPublicAccessType = map[string]CreateBucketDetailsPublicAccessTypeEnum{ - "NoPublicAccess": CreateBucketDetailsPublicAccessTypeNopublicaccess, - "ObjectRead": CreateBucketDetailsPublicAccessTypeObjectread, + "NoPublicAccess": CreateBucketDetailsPublicAccessTypeNopublicaccess, + "ObjectRead": CreateBucketDetailsPublicAccessTypeObjectread, + "ObjectReadWithoutList": CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist, } // GetCreateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for CreateBucketDetailsPublicAccessType @@ -60,3 +80,26 @@ func GetCreateBucketDetailsPublicAccessTypeEnumValues() []CreateBucketDetailsPub } return values } + +// CreateBucketDetailsStorageTierEnum Enum with underlying type: string +type CreateBucketDetailsStorageTierEnum string + +// Set of constants representing the allowable values for CreateBucketDetailsStorageTier +const ( + CreateBucketDetailsStorageTierStandard CreateBucketDetailsStorageTierEnum = "Standard" + CreateBucketDetailsStorageTierArchive CreateBucketDetailsStorageTierEnum = "Archive" +) + +var mappingCreateBucketDetailsStorageTier = map[string]CreateBucketDetailsStorageTierEnum{ + "Standard": CreateBucketDetailsStorageTierStandard, + "Archive": CreateBucketDetailsStorageTierArchive, +} + +// GetCreateBucketDetailsStorageTierEnumValues Enumerates the set of values for CreateBucketDetailsStorageTier +func GetCreateBucketDetailsStorageTierEnumValues() []CreateBucketDetailsStorageTierEnum { + values := make([]CreateBucketDetailsStorageTierEnum, 0) + for _, v := range mappingCreateBucketDetailsStorageTier { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go index 00a7aa13c..f5dd58212 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go @@ -19,12 +19,26 @@ type CreateBucketRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateBucketRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateBucketRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateBucketResponse wrapper for the CreateBucket operation type CreateBucketResponse struct { @@ -38,7 +52,7 @@ type CreateBucketResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The entity tag for the bucket that was created. @@ -51,3 +65,8 @@ type CreateBucketResponse struct { func (response CreateBucketResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go index f21262d54..4e451a153 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -17,20 +17,21 @@ import ( // Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). type CreateMultipartUploadDetails struct { - // the name of the object to which this multi-part upload is targetted. + // The name of the object to which this multi-part upload is targeted. Avoid entering confidential information. + // Example: test/object1.log Object *string `mandatory:"true" json:"object"` - // the content type of the object to upload. + // The content type of the object to upload. ContentType *string `mandatory:"false" json:"contentType"` - // the content language of the object to upload. + // The content language of the object to upload. ContentLanguage *string `mandatory:"false" json:"contentLanguage"` - // the content encoding of the object to upload. + // The content encoding of the object to upload. ContentEncoding *string `mandatory:"false" json:"contentEncoding"` // Arbitrary string keys and values for the user-defined metadata for the object. - // Keys must be in "opc-meta-*" format. + // Keys must be in "opc-meta-*" format. Avoid entering confidential information. Metadata map[string]string `mandatory:"false" json:"metadata"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go index ca790ade0..09022258f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go @@ -14,7 +14,7 @@ type CreateMultipartUploadRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` @@ -26,18 +26,31 @@ type CreateMultipartUploadRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreateMultipartUploadRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreateMultipartUploadRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreateMultipartUploadResponse wrapper for the CreateMultipartUpload operation type CreateMultipartUploadResponse struct { @@ -51,7 +64,7 @@ type CreateMultipartUploadResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The full path to the new upload. @@ -61,3 +74,8 @@ type CreateMultipartUploadResponse struct { func (response CreateMultipartUploadResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreateMultipartUploadResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go index 498dc6dd4..b5f796ddc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -15,17 +15,16 @@ import ( // CreatePreauthenticatedRequestDetails The representation of CreatePreauthenticatedRequestDetails type CreatePreauthenticatedRequestDetails struct { - // user specified name for pre-authenticated request. Helpful for management purposes. + // A user-specified name for the pre-authenticated request. Helpful for management purposes. Name *string `mandatory:"true" json:"name"` - // the operation that can be performed on this resource e.g PUT or GET. + // The operation that can be performed on this resource. AccessType CreatePreauthenticatedRequestDetailsAccessTypeEnum `mandatory:"true" json:"accessType"` - // The expiration date after which the pre-authenticated request will no longer be valid per spec - // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` - // Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + // The name of object that is being granted access to by the pre-authenticated request. This can be null and if it is, the pre-authenticated request grants access to the entire bucket. ObjectName *string `mandatory:"false" json:"objectName"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go index f0580b6d1..3788579d4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go @@ -14,21 +14,35 @@ type CreatePreauthenticatedRequestRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // details for creating the pre-authenticated request. + // Information needed to create the pre-authenticated request. CreatePreauthenticatedRequestDetails `contributesTo:"body"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request CreatePreauthenticatedRequestRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request CreatePreauthenticatedRequestRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // CreatePreauthenticatedRequestResponse wrapper for the CreatePreauthenticatedRequest operation type CreatePreauthenticatedRequestResponse struct { @@ -42,10 +56,15 @@ type CreatePreauthenticatedRequestResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } func (response CreatePreauthenticatedRequestResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response CreatePreauthenticatedRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go index 71385a147..b53656096 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go @@ -14,7 +14,7 @@ type DeleteBucketRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` @@ -24,12 +24,26 @@ type DeleteBucketRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteBucketRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteBucketRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteBucketResponse wrapper for the DeleteBucket operation type DeleteBucketResponse struct { @@ -40,10 +54,15 @@ type DeleteBucketResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } func (response DeleteBucketResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go index ae33f3a61..f0acd4db8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go @@ -14,11 +14,11 @@ type DeleteObjectRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -28,12 +28,26 @@ type DeleteObjectRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeleteObjectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeleteObjectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeleteObjectResponse wrapper for the DeleteObject operation type DeleteObjectResponse struct { @@ -44,7 +58,7 @@ type DeleteObjectResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The time the object was deleted, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. @@ -54,3 +68,8 @@ type DeleteObjectResponse struct { func (response DeleteObjectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeleteObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go index 675d24927..05fb86826 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go @@ -14,22 +14,36 @@ type DeletePreauthenticatedRequestRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR - // such as GET or DELETE the PAR + // The unique identifier for the pre-authenticated request. This can be used to manage operations against + // the pre-authenticated request, such as GET or DELETE. ParId *string `mandatory:"true" contributesTo:"path" name:"parId"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request DeletePreauthenticatedRequestRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request DeletePreauthenticatedRequestRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // DeletePreauthenticatedRequestResponse wrapper for the DeletePreauthenticatedRequest operation type DeletePreauthenticatedRequestResponse struct { @@ -40,10 +54,15 @@ type DeletePreauthenticatedRequestResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } func (response DeletePreauthenticatedRequestResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response DeletePreauthenticatedRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go index 4284a4a56..1525adc61 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go @@ -14,7 +14,7 @@ type GetBucketRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` @@ -23,18 +23,31 @@ type GetBucketRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetBucketRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetBucketRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetBucketResponse wrapper for the GetBucket operation type GetBucketResponse struct { @@ -48,7 +61,7 @@ type GetBucketResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The current entity tag for the bucket. @@ -64,3 +77,8 @@ type GetBucketResponse struct { func (response GetBucketResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go new file mode 100644 index 000000000..539bb91e3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetNamespaceMetadataRequest wrapper for the GetNamespaceMetadata operation +type GetNamespaceMetadataRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNamespaceMetadataRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNamespaceMetadataRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNamespaceMetadataRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// GetNamespaceMetadataResponse wrapper for the GetNamespaceMetadata operation +type GetNamespaceMetadataResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NamespaceMetadata instance + NamespaceMetadata `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNamespaceMetadataResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNamespaceMetadataResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go index 043ae9c99..ccdcefcfb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go @@ -13,12 +13,26 @@ type GetNamespaceRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetNamespaceRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNamespaceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetNamespaceResponse wrapper for the GetNamespace operation type GetNamespaceResponse struct { @@ -32,3 +46,8 @@ type GetNamespaceResponse struct { func (response GetNamespaceResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetNamespaceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go index f75e36b74..5510197ce 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go @@ -15,11 +15,11 @@ type GetObjectRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -28,22 +28,35 @@ type GetObjectRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` // Optional byte range to fetch, as described in RFC 7233 (https://tools.ietf.org/rfc/rfc7233), section 2.1. - // Note, only a single range of bytes is supported. + // Note that only a single range of bytes is supported. Range *string `mandatory:"false" contributesTo:"header" name:"range"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetObjectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetObjectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetObjectResponse wrapper for the GetObject operation type GetObjectResponse struct { @@ -57,7 +70,7 @@ type GetObjectResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The entity tag for the object. @@ -95,6 +108,12 @@ type GetObjectResponse struct { // The object modification time, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + // The current state of the object. + ArchivalState GetObjectArchivalStateEnum `presentIn:"header" name:"archival-state"` + + // Time that the object is returned to the archived state. This field is only present for restored objects. + TimeOfArchival *common.SDKTime `presentIn:"header" name:"time-of-archival"` + // Flag to indicate whether or not the object was modified. If this is true, // the getter for the object itself will return null. Callers should check this // if they specified one of the request params that might result in a conditional @@ -105,3 +124,35 @@ type GetObjectResponse struct { func (response GetObjectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetObjectArchivalStateEnum Enum with underlying type: string +type GetObjectArchivalStateEnum string + +// Set of constants representing the allowable values for GetObjectArchivalState +const ( + GetObjectArchivalStateAvailable GetObjectArchivalStateEnum = "AVAILABLE" + GetObjectArchivalStateArchived GetObjectArchivalStateEnum = "ARCHIVED" + GetObjectArchivalStateRestoring GetObjectArchivalStateEnum = "RESTORING" + GetObjectArchivalStateRestored GetObjectArchivalStateEnum = "RESTORED" +) + +var mappingGetObjectArchivalState = map[string]GetObjectArchivalStateEnum{ + "AVAILABLE": GetObjectArchivalStateAvailable, + "ARCHIVED": GetObjectArchivalStateArchived, + "RESTORING": GetObjectArchivalStateRestoring, + "RESTORED": GetObjectArchivalStateRestored, +} + +// GetGetObjectArchivalStateEnumValues Enumerates the set of values for GetObjectArchivalState +func GetGetObjectArchivalStateEnumValues() []GetObjectArchivalStateEnum { + values := make([]GetObjectArchivalStateEnum, 0) + for _, v := range mappingGetObjectArchivalState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go index 0e41fff80..2feec1362 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go @@ -14,22 +14,36 @@ type GetPreauthenticatedRequestRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR - // such as GET or DELETE the PAR + // The unique identifier for the pre-authenticated request. This can be used to manage operations against + // the pre-authenticated request, such as GET or DELETE. ParId *string `mandatory:"true" contributesTo:"path" name:"parId"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request GetPreauthenticatedRequestRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request GetPreauthenticatedRequestRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // GetPreauthenticatedRequestResponse wrapper for the GetPreauthenticatedRequest operation type GetPreauthenticatedRequestResponse struct { @@ -43,10 +57,15 @@ type GetPreauthenticatedRequestResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } func (response GetPreauthenticatedRequestResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response GetPreauthenticatedRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go index cca2efc72..f12383727 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go @@ -14,7 +14,7 @@ type HeadBucketRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` @@ -23,18 +23,31 @@ type HeadBucketRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request HeadBucketRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request HeadBucketRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request HeadBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // HeadBucketResponse wrapper for the HeadBucket operation type HeadBucketResponse struct { @@ -45,7 +58,7 @@ type HeadBucketResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The current entity tag for the bucket. @@ -61,3 +74,8 @@ type HeadBucketResponse struct { func (response HeadBucketResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response HeadBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go index b058a2d01..1f63e0e85 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go @@ -14,11 +14,11 @@ type HeadObjectRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -27,18 +27,31 @@ type HeadObjectRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request HeadObjectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request HeadObjectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request HeadObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // HeadObjectResponse wrapper for the HeadObject operation type HeadObjectResponse struct { @@ -49,7 +62,7 @@ type HeadObjectResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The entity tag for the object. @@ -84,6 +97,12 @@ type HeadObjectResponse struct { // The object modification time, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + // The current state of the object. + ArchivalState HeadObjectArchivalStateEnum `presentIn:"header" name:"archival-state"` + + // Time that the object is returned to the archived state. This field is only present for restored objects. + TimeOfArchival *common.SDKTime `presentIn:"header" name:"time-of-archival"` + // Flag to indicate whether or not the object was modified. If this is true, // the getter for the object itself will return null. Callers should check this // if they specified one of the request params that might result in a conditional @@ -94,3 +113,35 @@ type HeadObjectResponse struct { func (response HeadObjectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response HeadObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// HeadObjectArchivalStateEnum Enum with underlying type: string +type HeadObjectArchivalStateEnum string + +// Set of constants representing the allowable values for HeadObjectArchivalState +const ( + HeadObjectArchivalStateAvailable HeadObjectArchivalStateEnum = "AVAILABLE" + HeadObjectArchivalStateArchived HeadObjectArchivalStateEnum = "ARCHIVED" + HeadObjectArchivalStateRestoring HeadObjectArchivalStateEnum = "RESTORING" + HeadObjectArchivalStateRestored HeadObjectArchivalStateEnum = "RESTORED" +) + +var mappingHeadObjectArchivalState = map[string]HeadObjectArchivalStateEnum{ + "AVAILABLE": HeadObjectArchivalStateAvailable, + "ARCHIVED": HeadObjectArchivalStateArchived, + "RESTORING": HeadObjectArchivalStateRestoring, + "RESTORED": HeadObjectArchivalStateRestored, +} + +// GetHeadObjectArchivalStateEnumValues Enumerates the set of values for HeadObjectArchivalState +func GetHeadObjectArchivalStateEnumValues() []HeadObjectArchivalStateEnum { + values := make([]HeadObjectArchivalStateEnum, 0) + for _, v := range mappingHeadObjectArchivalState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go index 09474ba93..cefcedfbe 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go @@ -14,7 +14,7 @@ type ListBucketsRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The ID of the compartment in which to create the bucket. + // The ID of the compartment in which to list buckets. CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` // The maximum number of items to return. @@ -23,28 +23,47 @@ type ListBucketsRequest struct { // The page at which to start retrieving results. Page *string `mandatory:"false" contributesTo:"query" name:"page"` + // Bucket summary in list of buckets includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', + // and 'etag' fields. This parameter can also include 'tags' (freeformTags and definedTags). The only supported value + // of this parameter is 'tags' for now. Example 'tags'. + Fields []ListBucketsFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"csv"` + // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListBucketsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListBucketsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBucketsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListBucketsResponse wrapper for the ListBuckets operation type ListBucketsResponse struct { // The underlying http response RawResponse *http.Response - // The []BucketSummary instance + // A list of []BucketSummary instances Items []BucketSummary `presentIn:"body"` // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For pagination of a list of `Bucket`s. If this header appears in the response, then this @@ -57,3 +76,29 @@ type ListBucketsResponse struct { func (response ListBucketsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListBucketsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBucketsFieldsEnum Enum with underlying type: string +type ListBucketsFieldsEnum string + +// Set of constants representing the allowable values for ListBucketsFields +const ( + ListBucketsFieldsTags ListBucketsFieldsEnum = "tags" +) + +var mappingListBucketsFields = map[string]ListBucketsFieldsEnum{ + "tags": ListBucketsFieldsTags, +} + +// GetListBucketsFieldsEnumValues Enumerates the set of values for ListBucketsFields +func GetListBucketsFieldsEnumValues() []ListBucketsFieldsEnum { + values := make([]ListBucketsFieldsEnum, 0) + for _, v := range mappingListBucketsFields { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go index 367ea7af7..bb35eea34 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go @@ -14,11 +14,11 @@ type ListMultipartUploadPartsRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -33,26 +33,40 @@ type ListMultipartUploadPartsRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListMultipartUploadPartsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListMultipartUploadPartsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMultipartUploadPartsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListMultipartUploadPartsResponse wrapper for the ListMultipartUploadParts operation type ListMultipartUploadPartsResponse struct { // The underlying http response RawResponse *http.Response - // The []MultipartUploadPartSummary instance + // A list of []MultipartUploadPartSummary instances Items []MultipartUploadPartSummary `presentIn:"body"` // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For pagination of a list of `MultipartUploadPartSummary`s. If this header appears in the response, @@ -65,3 +79,8 @@ type ListMultipartUploadPartsResponse struct { func (response ListMultipartUploadPartsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListMultipartUploadPartsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go index 259e0630e..b81cc98e4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go @@ -14,7 +14,7 @@ type ListMultipartUploadsRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` @@ -26,35 +26,53 @@ type ListMultipartUploadsRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListMultipartUploadsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListMultipartUploadsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMultipartUploadsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListMultipartUploadsResponse wrapper for the ListMultipartUploads operation type ListMultipartUploadsResponse struct { // The underlying http response RawResponse *http.Response - // The []MultipartUpload instance + // A list of []MultipartUpload instances Items []MultipartUpload `presentIn:"body"` // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For pagination of a list of `MultipartUpload`s. If this header appears in the response, then // this is a partial list of multipart uploads. Include this value as the `page` parameter in a subsequent - // GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). + // GET request. For information about pagination, see List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` } func (response ListMultipartUploadsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListMultipartUploadsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go index aa216e61d..8bc96caa2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -24,7 +24,8 @@ type ListObjects struct { Prefixes []string `mandatory:"false" json:"prefixes"` // The name of the object to use in the 'startWith' parameter to obtain the next page of - // a truncated ListObjects response. + // a truncated ListObjects response. Avoid entering confidential information. + // Example: test/object1.log NextStartWith *string `mandatory:"false" json:"nextStartWith"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go index 0cca1b1c6..05599aca3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go @@ -14,7 +14,7 @@ type ListObjectsRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` @@ -31,10 +31,10 @@ type ListObjectsRequest struct { Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` // When this parameter is set, only objects whose names do not contain the delimiter character - // (after an optionally specified prefix) are returned. Scanned objects whose names contain the - // delimiter have part of their name up to the last occurrence of the delimiter (after the optional - // prefix) returned as a set of prefixes. Note that only '/' is a supported delimiter character at - // this time. + // (after an optionally specified prefix) are returned in the objects key of the response body. + // Scanned objects whose names contain the delimiter have the part of their name up to the first + // occurrence of the delimiter (including the optional prefix) returned as a set of prefixes. + // Note that only '/' is a supported delimiter character at this time. Delimiter *string `mandatory:"false" contributesTo:"query" name:"delimiter"` // Object summary in list of objects includes the 'name' field. This parameter can also include 'size' @@ -45,12 +45,26 @@ type ListObjectsRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListObjectsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListObjectsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListObjectsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListObjectsResponse wrapper for the ListObjects operation type ListObjectsResponse struct { @@ -64,10 +78,15 @@ type ListObjectsResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } func (response ListObjectsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go index 4adcbe26a..3a5682137 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go @@ -14,11 +14,11 @@ type ListPreauthenticatedRequestsRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // Pre-authenticated requests returned by the list must have object names starting with prefix + // User-specified object name prefixes can be used to query and return a list of pre-authenticated requests. ObjectNamePrefix *string `mandatory:"false" contributesTo:"query" name:"objectNamePrefix"` // The maximum number of items to return. @@ -29,26 +29,40 @@ type ListPreauthenticatedRequestsRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request ListPreauthenticatedRequestsRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request ListPreauthenticatedRequestsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPreauthenticatedRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // ListPreauthenticatedRequestsResponse wrapper for the ListPreauthenticatedRequests operation type ListPreauthenticatedRequestsResponse struct { // The underlying http response RawResponse *http.Response - // The []PreauthenticatedRequestSummary instance + // A list of []PreauthenticatedRequestSummary instances Items []PreauthenticatedRequestSummary `presentIn:"body"` // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For pagination of a list of pre-authenticated requests, if this header appears in the response, @@ -61,3 +75,8 @@ type ListPreauthenticatedRequestsResponse struct { func (response ListPreauthenticatedRequestsResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response ListPreauthenticatedRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go index 00cad6055..30a6b6cea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -12,7 +12,12 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// MultipartUpload To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// MultipartUpload Multipart uploads provide efficient and resilient uploads, especially for large objects. Multipart uploads also accommodate +// objects that are too large for a single upload operation. With multipart uploads, individual parts of an object can be +// uploaded in parallel to reduce the amount of time you spend uploading. Multipart uploads can also minimize the impact +// of network failures by letting you retry a failed part upload instead of requiring you to retry an entire object upload. +// See Managing Multipart Uploads (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingmultipartuploads.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, // talk to an administrator. If you're an administrator who needs to write policies to give users access, see // Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). type MultipartUpload struct { @@ -29,7 +34,7 @@ type MultipartUpload struct { // The unique identifier for the in-progress multipart upload. UploadId *string `mandatory:"true" json:"uploadId"` - // The date and time when the upload was created. + // The date and time the upload was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go index 05f9aff44..be1e9a5e4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -12,21 +12,22 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// MultipartUploadPartSummary To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// MultipartUploadPartSummary Get summary information about multipart uploads. +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, +// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). type MultipartUploadPartSummary struct { - // the current entity tag for the part. + // The current entity tag for the part. Etag *string `mandatory:"true" json:"etag"` - // the MD5 hash of the bytes of the part. + // The MD5 hash of the bytes of the part. Md5 *string `mandatory:"true" json:"md5"` - // the size of the part in bytes. + // The size of the part in bytes. Size *int `mandatory:"true" json:"size"` - // the part number for this part. + // The part number for this part. PartNumber *int `mandatory:"true" json:"partNumber"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go new file mode 100644 index 000000000..7863b211f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Common set of Object and Archive Storage APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// NamespaceMetadata A NamespaceMetadta is a map for storing namespace and defaultS3CompartmentId, defaultSwiftCompartmentId. +type NamespaceMetadata struct { + + // The namespace to which the metadata belongs. + Namespace *string `mandatory:"true" json:"namespace"` + + // The default compartment ID for an S3 client. + DefaultS3CompartmentId *string `mandatory:"true" json:"defaultS3CompartmentId"` + + // The default compartment ID for a Swift client. + DefaultSwiftCompartmentId *string `mandatory:"true" json:"defaultSwiftCompartmentId"` +} + +func (m NamespaceMetadata) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go index c1cf92ba8..318aa0c60 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -17,7 +17,8 @@ import ( // Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). type ObjectSummary struct { - // The name of the object. + // The name of the object. Avoid entering confidential information. + // Example: test/object1.log Name *string `mandatory:"true" json:"name"` // Size of the object in bytes. @@ -26,7 +27,7 @@ type ObjectSummary struct { // Base64-encoded MD5 hash of the object data. Md5 *string `mandatory:"false" json:"md5"` - // Date and time of object creation. + // The date and time the object was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go index eaf8bdfb6..5c07820ca 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -21,16 +21,6 @@ type ObjectStorageClient struct { config *common.ConfigurationProvider } -func buildSigner(configProvider common.ConfigurationProvider) common.HTTPRequestSigner { - objStorageHeaders := []string{"date", "(request-target)", "host"} - defaultBodyHeaders := []string{"content-length", "content-type", "x-content-sha256"} - shouldHashBody := func(r *http.Request) bool { - return r.Method == http.MethodPost - } - signer := common.RequestSignerWithBodyHashingPredicate(configProvider, objStorageHeaders, defaultBodyHeaders, shouldHashBody) - return signer -} - // NewObjectStorageClientWithConfigurationProvider Creates a new default ObjectStorage client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewObjectStorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ObjectStorageClient, err error) { @@ -38,7 +28,6 @@ func NewObjectStorageClientWithConfigurationProvider(configProvider common.Confi if err != nil { return } - baseClient.Signer = buildSigner(configProvider) client = ObjectStorageClient{BaseClient: baseClient} err = client.setConfigurationProvider(configProvider) @@ -58,8 +47,8 @@ func (client *ObjectStorageClient) setConfigurationProvider(configProvider commo // Error has been checked already region, _ := configProvider.Region() - client.config = &configProvider client.SetRegion(region) + client.config = &configProvider return nil } @@ -70,257 +59,590 @@ func (client *ObjectStorageClient) ConfigurationProvider() *common.Configuration // AbortMultipartUpload Aborts an in-progress multipart upload and deletes all parts that have been uploaded. func (client ObjectStorageClient) AbortMultipartUpload(ctx context.Context, request AbortMultipartUploadRequest) (response AbortMultipartUploadResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.abortMultipartUpload, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(AbortMultipartUploadResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AbortMultipartUploadResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// abortMultipartUpload implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) abortMultipartUpload(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") + if err != nil { + return nil, err + } + + var response AbortMultipartUploadResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // CommitMultipartUpload Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object. func (client ObjectStorageClient) CommitMultipartUpload(ctx context.Context, request CommitMultipartUploadRequest) (response CommitMultipartUploadResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.commitMultipartUpload, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(CommitMultipartUploadResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CommitMultipartUploadResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// CreateBucket Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. -// To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -func (client ObjectStorageClient) CreateBucket(ctx context.Context, request CreateBucketRequest) (response CreateBucketResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/", request) +// commitMultipartUpload implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) commitMultipartUpload(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response CommitMultipartUploadResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateBucket Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. +func (client ObjectStorageClient) CreateBucket(ctx context.Context, request CreateBucketRequest) (response CreateBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createBucket, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreateBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBucketResponse") + } return } +// createBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/") + if err != nil { + return nil, err + } + + var response CreateBucketResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateMultipartUpload Starts a new multipart upload to a specific object in the given bucket in the given namespace. func (client ObjectStorageClient) CreateMultipartUpload(ctx context.Context, request CreateMultipartUploadRequest) (response CreateMultipartUploadResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createMultipartUpload, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(CreateMultipartUploadResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMultipartUploadResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// CreatePreauthenticatedRequest Create a pre-authenticated request specific to the bucket -func (client ObjectStorageClient) CreatePreauthenticatedRequest(ctx context.Context, request CreatePreauthenticatedRequestRequest) (response CreatePreauthenticatedRequestResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/p/", request) +// createMultipartUpload implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createMultipartUpload(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response CreateMultipartUploadResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePreauthenticatedRequest Creates a pre-authenticated request specific to the bucket. +func (client ObjectStorageClient) CreatePreauthenticatedRequest(ctx context.Context, request CreatePreauthenticatedRequestRequest) (response CreatePreauthenticatedRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createPreauthenticatedRequest, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(CreatePreauthenticatedRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePreauthenticatedRequestResponse") + } return } +// createPreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createPreauthenticatedRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/p/") + if err != nil { + return nil, err + } + + var response CreatePreauthenticatedRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteBucket Deletes a bucket if it is already empty. If the bucket is not empty, use DeleteObject first. func (client ObjectStorageClient) DeleteBucket(ctx context.Context, request DeleteBucketRequest) (response DeleteBucketResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBucket, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(DeleteBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBucketResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// deleteBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deleteBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/") + if err != nil { + return nil, err + } + + var response DeleteBucketResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // DeleteObject Deletes an object. func (client ObjectStorageClient) DeleteObject(ctx context.Context, request DeleteObjectRequest) (response DeleteObjectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteObject, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(DeleteObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteObjectResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// DeletePreauthenticatedRequest Deletes the bucket level pre-authenticateted request -func (client ObjectStorageClient) DeletePreauthenticatedRequest(ctx context.Context, request DeletePreauthenticatedRequestRequest) (response DeletePreauthenticatedRequestResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/p/{parId}", request) +// deleteObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deleteObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response DeleteObjectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePreauthenticatedRequest Deletes the pre-authenticated request for the bucket. +func (client ObjectStorageClient) DeletePreauthenticatedRequest(ctx context.Context, request DeletePreauthenticatedRequestRequest) (response DeletePreauthenticatedRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePreauthenticatedRequest, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(DeletePreauthenticatedRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePreauthenticatedRequestResponse") + } return } +// deletePreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deletePreauthenticatedRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/p/{parId}") + if err != nil { + return nil, err + } + + var response DeletePreauthenticatedRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetBucket Gets the current representation of the given bucket in the given namespace. func (client ObjectStorageClient) GetBucket(ctx context.Context, request GetBucketRequest) (response GetBucketResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBucket, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(GetBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBucketResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// GetNamespace Gets the name of the namespace for the user making the request. An account name must be unique, must start with a -// letter, and can have up to 15 lowercase letters and numbers. You cannot use spaces or special characters. -func (client ObjectStorageClient) GetNamespace(ctx context.Context, request GetNamespaceRequest) (response GetNamespaceResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/", request) +// getBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response GetBucketResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNamespace Namespaces are unique. Namespaces are either the tenancy name or a random string automatically generated during +// account creation. You cannot edit a namespace. +func (client ObjectStorageClient) GetNamespace(ctx context.Context, request GetNamespaceRequest) (response GetNamespaceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNamespace, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetNamespaceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNamespaceResponse") + } return } +// getNamespace implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/") + if err != nil { + return nil, err + } + + var response GetNamespaceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNamespaceMetadata Get the metadata for the namespace, which contains defaultS3CompartmentId and defaultSwiftCompartmentId. +// Any user with the NAMESPACE_READ permission will be able to see the current metadata. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write +// policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +func (client ObjectStorageClient) GetNamespaceMetadata(ctx context.Context, request GetNamespaceMetadataRequest) (response GetNamespaceMetadataResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNamespaceMetadata, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(GetNamespaceMetadataResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNamespaceMetadataResponse") + } + return +} + +// getNamespaceMetadata implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getNamespaceMetadata(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}") + if err != nil { + return nil, err + } + + var response GetNamespaceMetadataResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetObject Gets the metadata and body of an object. func (client ObjectStorageClient) GetObject(ctx context.Context, request GetObjectRequest) (response GetObjectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getObject, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(GetObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetObjectResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// GetPreauthenticatedRequest Get the bucket level pre-authenticateted request +// getObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") + if err != nil { + return nil, err + } + + var response GetObjectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPreauthenticatedRequest Gets the pre-authenticated request for the bucket. func (client ObjectStorageClient) GetPreauthenticatedRequest(ctx context.Context, request GetPreauthenticatedRequestRequest) (response GetPreauthenticatedRequestResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/{parId}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPreauthenticatedRequest, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(GetPreauthenticatedRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPreauthenticatedRequestResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// HeadBucket Efficiently checks if a bucket exists and gets the current ETag for the bucket. -func (client ObjectStorageClient) HeadBucket(ctx context.Context, request HeadBucketRequest) (response HeadBucketResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/", request) +// getPreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getPreauthenticatedRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/{parId}") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response GetPreauthenticatedRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// HeadBucket Efficiently checks to see if a bucket exists and gets the current ETag for the bucket. +func (client ObjectStorageClient) HeadBucket(ctx context.Context, request HeadBucketRequest) (response HeadBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.headBucket, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(HeadBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into HeadBucketResponse") + } return } +// headBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) headBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/") + if err != nil { + return nil, err + } + + var response HeadBucketResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // HeadObject Gets the user-defined metadata and entity tag for an object. func (client ObjectStorageClient) HeadObject(ctx context.Context, request HeadObjectRequest) (response HeadObjectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.headObject, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(HeadObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into HeadObjectResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// headObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) headObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") + if err != nil { + return nil, err + } + + var response HeadObjectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListBuckets Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket @@ -329,56 +651,119 @@ func (client ObjectStorageClient) HeadObject(ctx context.Context, request HeadOb // talk to an administrator. If you're an administrator who needs to write policies to give users access, see // Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). func (client ObjectStorageClient) ListBuckets(ctx context.Context, request ListBucketsRequest) (response ListBucketsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBuckets, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListBucketsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBucketsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listBuckets implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listBuckets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/") + if err != nil { + return nil, err + } + + var response ListBucketsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListMultipartUploadParts Lists the parts of an in-progress multipart upload. func (client ObjectStorageClient) ListMultipartUploadParts(ctx context.Context, request ListMultipartUploadPartsRequest) (response ListMultipartUploadPartsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listMultipartUploadParts, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListMultipartUploadPartsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMultipartUploadPartsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listMultipartUploadParts implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listMultipartUploadParts(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") + if err != nil { + return nil, err + } + + var response ListMultipartUploadPartsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListMultipartUploads Lists all in-progress multipart uploads for the given bucket in the given namespace. func (client ObjectStorageClient) ListMultipartUploads(ctx context.Context, request ListMultipartUploadsRequest) (response ListMultipartUploadsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listMultipartUploads, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(ListMultipartUploadsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMultipartUploadsResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// listMultipartUploads implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listMultipartUploads(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u") + if err != nil { + return nil, err + } + + var response ListMultipartUploadsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } // ListObjects Lists the objects in a bucket. @@ -386,93 +771,318 @@ func (client ObjectStorageClient) ListMultipartUploads(ctx context.Context, requ // talk to an administrator. If you're an administrator who needs to write policies to give users access, see // Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). func (client ObjectStorageClient) ListObjects(ctx context.Context, request ListObjectsRequest) (response ListObjectsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listObjects, policy) if err != nil { return } - - httpResponse, err := client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return + if convertedResponse, ok := ociResponse.(ListObjectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListObjectsResponse") } - - err = common.UnmarshalResponse(httpResponse, &response) return } -// ListPreauthenticatedRequests List pre-authenticated requests for the bucket -func (client ObjectStorageClient) ListPreauthenticatedRequests(ctx context.Context, request ListPreauthenticatedRequestsRequest) (response ListPreauthenticatedRequestsResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/", request) +// listObjects implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listObjects(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o") if err != nil { - return + return nil, err } - httpResponse, err := client.Call(ctx, &httpRequest) + var response ListObjectsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPreauthenticatedRequests Lists pre-authenticated requests for the bucket. +func (client ObjectStorageClient) ListPreauthenticatedRequests(ctx context.Context, request ListPreauthenticatedRequestsRequest) (response ListPreauthenticatedRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPreauthenticatedRequests, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(ListPreauthenticatedRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPreauthenticatedRequestsResponse") + } return } +// listPreauthenticatedRequests implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listPreauthenticatedRequests(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/") + if err != nil { + return nil, err + } + + var response ListPreauthenticatedRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // PutObject Creates a new object or overwrites an existing one. -// To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). func (client ObjectStorageClient) PutObject(ctx context.Context, request PutObjectRequest) (response PutObjectResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + client.Signer = common.RequestSignerExcludeBody(*client.config) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.putObject, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(PutObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PutObjectResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// putObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) putObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") + if err != nil { + return nil, err + } + + var response PutObjectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RenameObject Rename an object from source key to target key in the given namespace. +func (client ObjectStorageClient) RenameObject(ctx context.Context, request RenameObjectRequest) (response RenameObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.renameObject, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(RenameObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RenameObjectResponse") + } return } +// renameObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) renameObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/renameObject") + if err != nil { + return nil, err + } + + var response RenameObjectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RestoreObjects Restore one or more objects specified by objectName parameter. +// By default object will be restored for 24 hours.Duration can be configured using hours parameter. +func (client ObjectStorageClient) RestoreObjects(ctx context.Context, request RestoreObjectsRequest) (response RestoreObjectsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.restoreObjects, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(RestoreObjectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RestoreObjectsResponse") + } + return +} + +// restoreObjects implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) restoreObjects(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/restoreObjects") + if err != nil { + return nil, err + } + + var response RestoreObjectsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateBucket Performs a partial or full update of a bucket's user-defined metadata. func (client ObjectStorageClient) UpdateBucket(ctx context.Context, request UpdateBucketRequest) (response UpdateBucketResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/", request) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBucket, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UpdateBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBucketResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// updateBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) updateBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/") + if err != nil { + return nil, err + } + + var response UpdateBucketResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateNamespaceMetadata Change the default Swift/S3 compartmentId of user's namespace into the user-defined compartmentId. Upon doing +// this, all subsequent bucket creations will use the new default compartment, but no previously created +// buckets will be modified. A user must have the NAMESPACE_UPDATE permission to make changes to the default +// compartments for S3 and Swift. +func (client ObjectStorageClient) UpdateNamespaceMetadata(ctx context.Context, request UpdateNamespaceMetadataRequest) (response UpdateNamespaceMetadataResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateNamespaceMetadata, policy) + if err != nil { + return + } + if convertedResponse, ok := ociResponse.(UpdateNamespaceMetadataResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateNamespaceMetadataResponse") + } return } +// updateNamespaceMetadata implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) updateNamespaceMetadata(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}") + if err != nil { + return nil, err + } + + var response UpdateNamespaceMetadataResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UploadPart Uploads a single part of a multipart upload. func (client ObjectStorageClient) UploadPart(ctx context.Context, request UploadPartRequest) (response UploadPartResponse, err error) { - httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + client.Signer = common.RequestSignerExcludeBody(*client.config) + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.uploadPart, policy) if err != nil { return } + if convertedResponse, ok := ociResponse.(UploadPartResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UploadPartResponse") + } + return +} - httpResponse, err := client.Call(ctx, &httpRequest) +// uploadPart implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) uploadPart(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") + if err != nil { + return nil, err + } + + var response UploadPartResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - return + return response, err } err = common.UnmarshalResponse(httpResponse, &response) - return + return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go index 54e4d2430..fdf12fd9b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -12,30 +12,35 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// PreauthenticatedRequest The representation of PreauthenticatedRequest +// PreauthenticatedRequest Pre-authenticated requests provide a way to let users access a bucket or an object without having their own credentials. +// When you create a pre-authenticated request, a unique URL is generated. Users in your organization, partners, or third +// parties can use this URL to access the targets identified in the pre-authenticated request. See Managing Access to Buckets and Objects (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. +// If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). type PreauthenticatedRequest struct { - // the unique identifier to use when directly addressing the pre-authenticated request + // The unique identifier to use when directly addressing the pre-authenticated request. Id *string `mandatory:"true" json:"id"` - // the user supplied name of the pre-authenticated request. + // The user-provided name of the pre-authenticated request. Name *string `mandatory:"true" json:"name"` - // the uri to embed in the url when using the pre-authenticated request. + // The URI to embed in the URL when using the pre-authenticated request. AccessUri *string `mandatory:"true" json:"accessUri"` - // the operation that can be performed on this resource e.g PUT or GET. + // The operation that can be performed on this resource. AccessType PreauthenticatedRequestAccessTypeEnum `mandatory:"true" json:"accessType"` - // the expiration date after which the pre authenticated request will no longer be valid as per spec - // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` - // the date when the pre-authenticated request was created as per spec - // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + // The date when the pre-authenticated request was created as per specification + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339). TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + // The name of the object that is being granted access to by the pre-authenticated request. This can be null and + // if so, the pre-authenticated request grants access to the entire bucket. Avoid entering confidential information. + // Example: test/object1.log ObjectName *string `mandatory:"false" json:"objectName"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go index f293237bc..04b5440ad 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -12,27 +12,25 @@ import ( "github.com/oracle/oci-go-sdk/common" ) -// PreauthenticatedRequestSummary The representation of PreauthenticatedRequestSummary +// PreauthenticatedRequestSummary Get summary information about pre-authenticated requests. type PreauthenticatedRequestSummary struct { - // the unique identifier to use when directly addressing the pre-authenticated request + // The unique identifier to use when directly addressing the pre-authenticated request. Id *string `mandatory:"true" json:"id"` - // the user supplied name of the pre-authenticated request + // The user-provided name of the pre-authenticated request. Name *string `mandatory:"true" json:"name"` - // the operation that can be performed on this resource e.g PUT or GET. + // The operation that can be performed on this resource. AccessType PreauthenticatedRequestSummaryAccessTypeEnum `mandatory:"true" json:"accessType"` - // the expiration date after which the pre authenticated request will no longer be valid as per spec - // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` - // the date when the pre-authenticated request was created as per spec - // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + // The date when the pre-authenticated request was created as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + // The name of object that is being granted access to by the pre-authenticated request. This can be null and if it is, the pre-authenticated request grants access to the entire bucket. ObjectName *string `mandatory:"false" json:"objectName"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go index 3652da5fc..f112573cc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go @@ -15,11 +15,11 @@ type PutObjectRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -34,8 +34,7 @@ type PutObjectRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // The client request ID for tracing. @@ -58,12 +57,26 @@ type PutObjectRequest struct { // Optional user-defined metadata key and value. OpcMeta map[string]string `mandatory:"false" contributesTo:"header-collection" prefix:"opc-meta-"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request PutObjectRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request PutObjectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // PutObjectResponse wrapper for the PutObject operation type PutObjectResponse struct { @@ -74,7 +87,7 @@ type PutObjectResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The base-64 encoded MD5 hash of the request body as computed by the server. @@ -90,3 +103,8 @@ type PutObjectResponse struct { func (response PutObjectResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response PutObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go new file mode 100644 index 000000000..99cce0816 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Common set of Object and Archive Storage APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RenameObjectDetails To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type RenameObjectDetails struct { + + // The name of the source object to be renamed. + SourceName *string `mandatory:"true" json:"sourceName"` + + // The new name of the source object. + NewName *string `mandatory:"true" json:"newName"` + + // The if-match entity tag of the source object. + SrcObjIfMatchETag *string `mandatory:"false" json:"srcObjIfMatchETag"` + + // The if-match entity tag of the new object. + NewObjIfMatchETag *string `mandatory:"false" json:"newObjIfMatchETag"` + + // The if-none-match entity tag of the new object. + NewObjIfNoneMatchETag *string `mandatory:"false" json:"newObjIfNoneMatchETag"` +} + +func (m RenameObjectDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go new file mode 100644 index 000000000..633e990aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// RenameObjectRequest wrapper for the RenameObject operation +type RenameObjectRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The sourceName and newName of rename operation. + RenameObjectDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RenameObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RenameObjectRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RenameObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// RenameObjectResponse wrapper for the RenameObject operation +type RenameObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag for the object. + ETag *string `presentIn:"header" name:"etag"` + + // The time the object was modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` +} + +func (response RenameObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RenameObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go new file mode 100644 index 000000000..b7b41e704 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Common set of Object and Archive Storage APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RestoreObjectsDetails The representation of RestoreObjectsDetails +type RestoreObjectsDetails struct { + + // A object which was in an archived state and need to be restored. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The number of hours for which this object will be restored. + // By default object will be restored for 24 hours.It can be configured using hours parameter. + Hours *int `mandatory:"false" json:"hours"` +} + +func (m RestoreObjectsDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go new file mode 100644 index 000000000..413581b36 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// RestoreObjectsRequest wrapper for the RestoreObjects operation +type RestoreObjectsRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Request to restore objects. + RestoreObjectsDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RestoreObjectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RestoreObjectsRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RestoreObjectsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// RestoreObjectsResponse wrapper for the RestoreObjects operation +type RestoreObjectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RestoreObjectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RestoreObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go index a3cf083a5..1f778b7ba 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go @@ -3,7 +3,7 @@ // Object Storage Service API // -// APIs for managing buckets and objects. +// Common set of Object and Archive Storage APIs for managing buckets and objects. // package objectstorage @@ -20,17 +20,31 @@ type UpdateBucketDetails struct { // The namespace in which the bucket lives. Namespace *string `mandatory:"false" json:"namespace"` - // The name of the bucket. + // The compartmentId for the compartment to which the bucket is targeted to move to. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The name of the bucket. Avoid entering confidential information. + // Example: my-new-bucket1 Name *string `mandatory:"false" json:"name"` // Arbitrary string, up to 4KB, of keys and values for user-defined metadata. Metadata map[string]string `mandatory:"false" json:"metadata"` - // The type of public access available on this bucket. Allows authenticated caller to access the bucket or - // contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - // when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - // When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + // The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an + // authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access + // is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled + // on the bucket, public access is allowed for the `GetObject` and `HeadObject` operations. PublicAccessType UpdateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}} + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } func (m UpdateBucketDetails) String() string { @@ -42,13 +56,15 @@ type UpdateBucketDetailsPublicAccessTypeEnum string // Set of constants representing the allowable values for UpdateBucketDetailsPublicAccessType const ( - UpdateBucketDetailsPublicAccessTypeNopublicaccess UpdateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" - UpdateBucketDetailsPublicAccessTypeObjectread UpdateBucketDetailsPublicAccessTypeEnum = "ObjectRead" + UpdateBucketDetailsPublicAccessTypeNopublicaccess UpdateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" + UpdateBucketDetailsPublicAccessTypeObjectread UpdateBucketDetailsPublicAccessTypeEnum = "ObjectRead" + UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist UpdateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList" ) var mappingUpdateBucketDetailsPublicAccessType = map[string]UpdateBucketDetailsPublicAccessTypeEnum{ - "NoPublicAccess": UpdateBucketDetailsPublicAccessTypeNopublicaccess, - "ObjectRead": UpdateBucketDetailsPublicAccessTypeObjectread, + "NoPublicAccess": UpdateBucketDetailsPublicAccessTypeNopublicaccess, + "ObjectRead": UpdateBucketDetailsPublicAccessTypeObjectread, + "ObjectReadWithoutList": UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist, } // GetUpdateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for UpdateBucketDetailsPublicAccessType diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go index a352d64fe..cbc62a506 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go @@ -14,7 +14,7 @@ type UpdateBucketRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` @@ -27,12 +27,26 @@ type UpdateBucketRequest struct { // The client request ID for tracing. OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UpdateBucketRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UpdateBucketRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UpdateBucketResponse wrapper for the UpdateBucket operation type UpdateBucketResponse struct { @@ -46,7 +60,7 @@ type UpdateBucketResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The entity tag for the updated bucket. @@ -56,3 +70,8 @@ type UpdateBucketResponse struct { func (response UpdateBucketResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go new file mode 100644 index 000000000..967d993cc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Common set of Object and Archive Storage APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateNamespaceMetadataDetails An UpdateNamespaceMetadataDetails is used for update NamespaceMetadata. To be able to upate the NamespaceMetadata, a user +// must have NAMESPACE_UPDATE permission. +type UpdateNamespaceMetadataDetails struct { + + // The update compartment id for an S3 client if this field is set. + DefaultS3CompartmentId *string `mandatory:"false" json:"defaultS3CompartmentId"` + + // The update compartment id for a Swift client if this field is set. + DefaultSwiftCompartmentId *string `mandatory:"false" json:"defaultSwiftCompartmentId"` +} + +func (m UpdateNamespaceMetadataDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go new file mode 100644 index 000000000..0af117c02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateNamespaceMetadataRequest wrapper for the UpdateNamespaceMetadata operation +type UpdateNamespaceMetadataRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // Request object for update NamespaceMetadata. + UpdateNamespaceMetadataDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateNamespaceMetadataRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateNamespaceMetadataRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateNamespaceMetadataRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// UpdateNamespaceMetadataResponse wrapper for the UpdateNamespaceMetadata operation +type UpdateNamespaceMetadataResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NamespaceMetadata instance + NamespaceMetadata `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateNamespaceMetadataResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateNamespaceMetadataResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go index 9a48fa05c..da83c4cca 100644 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go @@ -15,11 +15,11 @@ type UploadPartRequest struct { // The top-level namespace used for the request. NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - // The name of the bucket. + // The name of the bucket. Avoid entering confidential information. // Example: `my-new-bucket1` BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - // The name of the object. + // The name of the object. Avoid entering confidential information. // Example: `test/object1.log` ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` @@ -43,8 +43,7 @@ type UploadPartRequest struct { IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - // of the target part. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` // 100-continue @@ -52,12 +51,26 @@ type UploadPartRequest struct { // The base-64 encoded MD5 hash of the body. ContentMD5 *string `mandatory:"false" contributesTo:"header" name:"Content-MD5"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata } func (request UploadPartRequest) String() string { return common.PointerString(request) } +// HTTPRequest implements the OCIRequest interface +func (request UploadPartRequest) HTTPRequest(method, path string) (http.Request, error) { + return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UploadPartRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + // UploadPartResponse wrapper for the UploadPart operation type UploadPartResponse struct { @@ -68,7 +81,7 @@ type UploadPartResponse struct { OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, please provide this request ID. + // request, provide this request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The base64-encoded MD5 hash of the request body, as computed by the server. @@ -81,3 +94,8 @@ type UploadPartResponse struct { func (response UploadPartResponse) String() string { return common.PointerString(response) } + +// HTTPResponse implements the OCIResponse interface +func (response UploadPartResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/oci.go b/vendor/github.com/oracle/oci-go-sdk/oci.go index 47fcef9c6..396634535 100644 --- a/vendor/github.com/oracle/oci-go-sdk/oci.go +++ b/vendor/github.com/oracle/oci-go-sdk/oci.go @@ -1,4 +1,3 @@ - /* This is the official Go SDK for Oracle Cloud Infrastructure @@ -186,7 +185,7 @@ Pagination When calling a list operation, the operation will retrieve a page of results. To retrieve more data, call the list operation again, passing in the value of the most recent response's OpcNextPage as the value of Page in the next list operation call. -When there is no more data the OpcNextPage field will be nil. An example of pagination using this logic can be found here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_core_test.go#L86 +When there is no more data the OpcNextPage field will be nil. An example of pagination using this logic can be found here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_core_pagination_test.go Logging and Debugging @@ -195,6 +194,35 @@ requests, responses and potential errors when (un)marshalling request and respon To expose debugging logs, set the environment variable "OCI_GO_SDK_DEBUG" to "1", or some other non empty string. +Retry + +Sometimes you may need to wait until an attribute of a resource, such as an instance or a VCN, reaches a certain state. +An example of this would be launching an instance and then waiting for the instance to become available, or waiting until a subnet in a VCN has been terminated. +You might also want to retry the same operation again if there's network issue etc... +This can be accomplished by using the RequestMetadata.RetryPolicy. You can find the examples here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_retry_test.go + +Using the SDK with a proxy server + +The GO SDK uses the net/http package to make calls to OCI services. If your environment requires you to use a proxy server for outgoing HTTP requests +then you can set this up in the following ways: + +1. Configuring environment variable as described here https://golang.org/pkg/net/http/#ProxyFromEnvironment +2. Modifying the underlying Transport struct for a service client + +In order to modify the underlying Transport struct in HttpClient, you can do something similar to (sample code for audit service client): + // create audit service client + client, clerr := audit.NewAuditClientWithConfigurationProvider(common.DefaultConfigProvider()) + + // create a proxy url + proxyURL, err := url.Parse("http(s)://[username]:[password]@[ip address]:[port]") + + client.HTTPClient = &http.Client{ + // adding the proxy settings to the http.Transport + Transport: &http.Transport{ + Proxy: http.ProxyURL(proxyURL), + }, + } + Forward Compatibility @@ -226,7 +254,7 @@ Please refer to this link: https://github.com/oracle/oci-go-sdk#help - */ +*/ package oci //go:generate go run cmd/genver/main.go cmd/genver/version_template.go --output common/version.go diff --git a/vendor/vendor.json b/vendor/vendor.json index 6f419bdf1..9b9ab7aba 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1304,11 +1304,13 @@ "revisionTime": "2018-01-05T11:11:33Z" }, { - "checksumSHA1": "/LfGOK58LAN5bN/kVhyjw6prFuw=", + "checksumSHA1": "UZa8q/rQfhBJLutg8KA7Sq9H2S8=", "path": "github.com/oracle/oci-go-sdk", - "revision": "36126af3da60f6d2053487efed8801aa794f7605", - "revisionTime": "2018-03-02T19:49:46Z", - "tree": true + "revision": "a2ded717dc4bb4916c0416ec79f81718b576dbc4", + "revisionTime": "2018-06-28T21:12:36Z", + "tree": true, + "version": "v2.0.0", + "versionExact": "v2.0.0" }, { "checksumSHA1": "/NoE6t3UkW4/iKAtbf59GGv6tF8=",